feat: release v1.1.0 - clean YAML, wildcard DNS protection, and tag/group/source filtering
Build and Publish Release / Build Packages and Publish (push) Successful in 9s
Build and Publish Release / Build Packages and Publish (push) Successful in 9s
This commit is contained in:
1 parent
5fedc44c6b
commit
598e5d7397
18 files changed
+318
-22
No files matched your search
@@ -73,5 +73,16 @@ class TestExtendedExporters(unittest.TestCase):
|
||||
self.assertIn("[proxmox_nodes]", output)
|
||||
self.assertIn("node0 ansible_host=192.168.0.101 ansible_user=root", output)
|
||||
|
||||
def test_yaml_exporters_no_anchors_or_aliases(self):
|
||||
from inventory_collector.exporters.ansible_yaml import AnsibleYamlExporter
|
||||
# Create inventory where multiple groups contain the exact same host
|
||||
ansible_out = AnsibleYamlExporter().export(self.inv)
|
||||
lc_out = LinuxConnectorExporter().export(self.inv)
|
||||
gen_out = GenericYamlExporter().export(self.inv)
|
||||
|
||||
for out in (ansible_out, lc_out, gen_out):
|
||||
self.assertNotIn("&id", out, "Found YAML anchor &id in output")
|
||||
self.assertNotIn("*id", out, "Found YAML alias *id in output")
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user