diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2023-11-14 14:19:55 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2023-11-14 14:19:55 +0100 |
commit | 4d471f0b706733624a845143cafb6dd8add90eed (patch) | |
tree | 417efc58964f8b43007dcbecf77e6b05a0bd6fa3 /6/bgp.py | |
parent | 6dca28918be80a3ef0c2959a99067337f59f5972 (diff) | |
download | prolog-firewall-4d471f0b706733624a845143cafb6dd8add90eed.tar.gz prolog-firewall-4d471f0b706733624a845143cafb6dd8add90eed.tar.bz2 prolog-firewall-4d471f0b706733624a845143cafb6dd8add90eed.tar.xz prolog-firewall-4d471f0b706733624a845143cafb6dd8add90eed.zip |
wip
Diffstat (limited to '6/bgp.py')
-rwxr-xr-x | 6/bgp.py | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -4,10 +4,9 @@ from swiplserver import PrologMQI, PrologThread import yaml import os -def to_ansible(kind, objs): - for o in objs: - host = o['host'] - print(f"k={host}") +def to_ansible(kind, hosts): + for host, o in hosts.items(): + print(f"host={host}") os.makedirs(f"group_vars/{host}", exist_ok=True) with open(f"group_vars/{host}/{kind}.yaml", "w") as f: f.write(yaml.dump(o)) |