[/etc/crans/services] Extraction d'informations pour generate
This commit is contained in:
parent
67eec5f7a9
commit
ba7c942899
2 changed files with 21 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
<Bundle name="generate">
|
||||
<Python name="/etc/cron.d/generate"/>
|
||||
<Python name="/etc/crans/services.py"/>
|
||||
</Bundle>
|
||||
|
|
20
Python/etc/crans/services.py
Normal file
20
Python/etc/crans/services.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# -*- mode: python; encoding: utf-8 -*-
|
||||
|
||||
info["owner"] = "root"
|
||||
info["group"] = "root"
|
||||
info["perms"] = 0644
|
||||
|
||||
comment_start = "#"
|
||||
|
||||
header("Services configuré sur la machine")
|
||||
|
||||
#print metadata.query.names_by_groups(['firewall'])
|
||||
|
||||
print "services = {"
|
||||
groups = list(metadata.groups)
|
||||
groups.sort()
|
||||
for group in groups:
|
||||
names = [ name.split('.', 1)[0] for name in metadata.query.names_by_groups([group])]
|
||||
names.sort()
|
||||
print " '%s':%s," % (group, names)
|
||||
print "}"
|
Loading…
Add table
Add a link
Reference in a new issue