fix: "all" group are now compose with host and we remove duplicated hostname

This commit is contained in:
egarette@silique.fr 2025-09-08 16:53:15 +02:00
parent 5c0f7ba0bd
commit 242a4a9635
1312 changed files with 6262 additions and 2525 deletions

View file

@ -91,7 +91,8 @@ class RougailOutputAnsible(RougailOutputJson):
self.config.property.read_write()
def json_to_ansible(self):
ret = {"_meta": {"hostvars": {}}, "all": {"children": ["ungrouped"]}}
ret = {"_meta": {"hostvars": {}}, "all": {"children": ["ungrouped"], "hosts": []}}
all_children = []
if "_warnings" in self.dico:
_warnings = self.dico.pop("_warnings")
if self.export_warnings:
@ -141,8 +142,10 @@ class RougailOutputAnsible(RougailOutputJson):
ret.setdefault(name, {}).setdefault("hosts", []).append(
host_name
)
if host not in all_children:
all_children.append(host)
ret["all"]["hosts"].append(host_name)
else:
ret["all"]["children"].append(name)
ret[name] = hosts
for hosts in ret_hosts.values():
for host, domain_name in hosts.items():

View file

@ -11,8 +11,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -13,8 +13,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -13,8 +13,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -13,8 +13,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -23,8 +23,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -35,8 +35,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -29,8 +29,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -21,8 +21,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -31,8 +31,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -27,8 +27,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -27,8 +27,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -27,8 +27,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -29,8 +29,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -33,8 +33,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -27,8 +27,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -27,8 +27,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -21,8 +21,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -21,8 +21,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -27,8 +27,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -33,8 +33,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -25,8 +25,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -21,8 +21,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -23,8 +23,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -23,8 +23,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -25,8 +25,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -31,8 +31,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -23,8 +23,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -27,8 +27,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -23,8 +23,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -63,8 +63,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -31,8 +31,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -63,8 +63,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -63,8 +63,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -25,8 +25,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -75,8 +75,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -21,8 +21,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -21,8 +21,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -21,8 +21,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -25,8 +25,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -27,8 +27,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -21,8 +21,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -21,8 +21,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -21,8 +21,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -21,8 +21,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -37,8 +37,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -21,8 +21,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -27,8 +27,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -21,8 +21,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -21,8 +21,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -21,8 +21,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -17,8 +17,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -19,8 +19,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -23,8 +23,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

View file

@ -23,8 +23,11 @@
},
"all": {
"children": [
"ungrouped",
"groups"
"ungrouped"
],
"hosts": [
"GROUP1_01",
"GROUP2_01"
]
},
"group1": {

Some files were not shown because too many files have changed in this diff Show more