Hi all, I found out that the freezelist script did not work with ansible 2.7.10. Once the script changed to use the new api, it complained about 2 non valid yaml file (error syntax error: found character '\t' that cannot start any token) in the vars. So I replaced the tabs character by spaces. See the attached patch +1s ?
From d6d80dc631ecff1690f55a58e3bc8980d4bd9e5e Mon Sep 17 00:00:00 2001 From: Clement Verna <cverna@xxxxxxxxxxxx> Date: Thu, 18 Apr 2019 20:09:11 +0200 Subject: [PATCH] freezelist: Make sure the scripts runs with ansible 2.7. This commit fixes the freezelist script so that it works with ansible 2.7. It also replaces tabs by space in the the 2 vars files so that they are valid yaml Signed-off-by: Clement Verna <cverna@xxxxxxxxxxxx> --- inventory/group_vars/repospanner | 22 ++++---- .../pagure-proxy01.fedoraproject.org | 56 +++++++++---------- scripts/freezelist | 2 +- 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/inventory/group_vars/repospanner b/inventory/group_vars/repospanner index 54a8b321a..56c8a3503 100644 --- a/inventory/group_vars/repospanner +++ b/inventory/group_vars/repospanner @@ -10,16 +10,16 @@ csi_security_category: High csi_primary_contact: admin@xxxxxxxxxxxxxxxxx / sysadmin-main-members csi_purpose: repospanner git syncing host -custom_rules: [ '-A INPUT -p tcp -m tcp -s 8.43.84.211 --dport 8443:8445 -j ACCEPT', - '-A INPUT -p tcp -m tcp -s 8.43.84.212 --dport 8443:8445 -j ACCEPT', - '-A INPUT -p tcp -m tcp -s 8.43.85.76 --dport 8443:8445 -j ACCEPT', - '-A INPUT -p tcp -m tcp -s 140.211.169.210 --dport 8443:8445 -j ACCEPT', - '-A INPUT -p tcp -m tcp -s 209.132.181.20 --dport 8443:8445 -j ACCEPT', - '-A INPUT -p tcp -m tcp -s 192.168.1.180 --dport 8443:8445 -j ACCEPT', - '-A INPUT -p tcp -m tcp -s 192.168.1.184 --dport 8443:8445 -j ACCEPT', - '-A INPUT -p tcp -m tcp -s 192.168.1.185 --dport 8443:8445 -j ACCEPT', - '-A INPUT -p tcp -m tcp -s 10.5.126.23 --dport 8443:8445 -j ACCEPT', - '-A INPUT -p tcp -m tcp -s 192.168.1.41 --dport 8442:8443 -j ACCEPT', - '-A INPUT -p tcp -m tcp -s 192.168.100.8 --dport 8442:8443 -j ACCEPT'] +custom_rules: ['-A INPUT -p tcp -m tcp -s 8.43.84.211 --dport 8443:8445 -j ACCEPT', + '-A INPUT -p tcp -m tcp -s 8.43.84.212 --dport 8443:8445 -j ACCEPT', + '-A INPUT -p tcp -m tcp -s 8.43.85.76 --dport 8443:8445 -j ACCEPT', + '-A INPUT -p tcp -m tcp -s 140.211.169.210 --dport 8443:8445 -j ACCEPT', + '-A INPUT -p tcp -m tcp -s 209.132.181.20 --dport 8443:8445 -j ACCEPT', + '-A INPUT -p tcp -m tcp -s 192.168.1.180 --dport 8443:8445 -j ACCEPT', + '-A INPUT -p tcp -m tcp -s 192.168.1.184 --dport 8443:8445 -j ACCEPT', + '-A INPUT -p tcp -m tcp -s 192.168.1.185 --dport 8443:8445 -j ACCEPT', + '-A INPUT -p tcp -m tcp -s 10.5.126.23 --dport 8443:8445 -j ACCEPT', + '-A INPUT -p tcp -m tcp -s 192.168.1.41 --dport 8442:8443 -j ACCEPT', + '-A INPUT -p tcp -m tcp -s 192.168.100.8 --dport 8442:8443 -j ACCEPT'] ## End of file diff --git a/inventory/host_vars/pagure-proxy01.fedoraproject.org b/inventory/host_vars/pagure-proxy01.fedoraproject.org index ea6e9dffc..9836c2930 100644 --- a/inventory/host_vars/pagure-proxy01.fedoraproject.org +++ b/inventory/host_vars/pagure-proxy01.fedoraproject.org @@ -6,34 +6,34 @@ dns: 8.8.8.8 custom_rules: ['-A FORWARD -j ACCEPT'] nat_rules: [ - # SSH - '-A PREROUTING --dst 152.19.134.147 -p tcp --dport 22 -j DNAT --to-destination 140.211.169.204:22', - '-A POSTROUTING -p tcp --dst 140.211.169.204 --dport 22 -j SNAT --to-source 152.19.134.147', - '-A OUTPUT --dst 152.19.134.147 -p tcp --dport 22 -j DNAT --to-destination 140.211.169.204:22', - # SMTP - '-A PREROUTING --dst 152.19.134.147 -p tcp --dport 25 -j DNAT --to-destination 140.211.169.204:25', - '-A POSTROUTING -p tcp --dst 140.211.169.204 --dport 25 -j SNAT --to-source 152.19.134.147', - '-A OUTPUT --dst 152.19.134.147 -p tcp --dport 25 -j DNAT --to-destination 140.211.169.204:25', - # web-80 - '-A PREROUTING --dst 152.19.134.147 -p tcp --dport 80 -j DNAT --to-destination 140.211.169.204:80', - '-A POSTROUTING -p tcp --dst 140.211.169.204 --dport 80 -j SNAT --to-source 152.19.134.147', - '-A OUTPUT --dst 152.19.134.147 -p tcp --dport 80 -j DNAT --to-destination 140.211.169.204:80', - # web-443 - '-A PREROUTING --dst 152.19.134.147 -p tcp --dport 443 -j DNAT --to-destination 140.211.169.204:443', - '-A POSTROUTING -p tcp --dst 140.211.169.204 --dport 443 -j SNAT --to-source 152.19.134.147', - '-A OUTPUT --dst 152.19.134.147 -p tcp --dport 443 -j DNAT --to-destination 140.211.169.204:443', - # 9418 - '-A PREROUTING --dst 152.19.134.147 -p tcp --dport 9418 -j DNAT --to-destination 140.211.169.204:9418', - '-A POSTROUTING -p tcp --dst 140.211.169.204 --dport 9418 -j SNAT --to-source 152.19.134.147', - '-A OUTPUT --dst 152.19.134.147 -p tcp --dport 9418 -j DNAT --to-destination 140.211.169.204:9418', - # Eventsource - '-A PREROUTING --dst 152.19.134.147 -p tcp --dport 8088 -j DNAT --to-destination 140.211.169.204:8088', - '-A POSTROUTING -p tcp --dst 140.211.169.204 --dport 8088 -j SNAT --to-source 152.19.134.147', - '-A OUTPUT --dst 152.19.134.147 -p tcp --dport 8088 -j DNAT --to-destination 140.211.169.204:8088', - # Fedmsg - '-A PREROUTING --dst 152.19.134.147 -p tcp --dport 9940 -j DNAT --to-destination 140.211.169.204:9940', - '-A POSTROUTING -p tcp --dst 140.211.169.204 --dport 9940 -j SNAT --to-source 152.19.134.147', - '-A OUTPUT --dst 152.19.134.147 -p tcp --dport 9940 -j DNAT --to-destination 140.211.169.204:9940', + # SSH + '-A PREROUTING --dst 152.19.134.147 -p tcp --dport 22 -j DNAT --to-destination 140.211.169.204:22', + '-A POSTROUTING -p tcp --dst 140.211.169.204 --dport 22 -j SNAT --to-source 152.19.134.147', + '-A OUTPUT --dst 152.19.134.147 -p tcp --dport 22 -j DNAT --to-destination 140.211.169.204:22', + # SMTP + '-A PREROUTING --dst 152.19.134.147 -p tcp --dport 25 -j DNAT --to-destination 140.211.169.204:25', + '-A POSTROUTING -p tcp --dst 140.211.169.204 --dport 25 -j SNAT --to-source 152.19.134.147', + '-A OUTPUT --dst 152.19.134.147 -p tcp --dport 25 -j DNAT --to-destination 140.211.169.204:25', + # web-80 + '-A PREROUTING --dst 152.19.134.147 -p tcp --dport 80 -j DNAT --to-destination 140.211.169.204:80', + '-A POSTROUTING -p tcp --dst 140.211.169.204 --dport 80 -j SNAT --to-source 152.19.134.147', + '-A OUTPUT --dst 152.19.134.147 -p tcp --dport 80 -j DNAT --to-destination 140.211.169.204:80', + # web-443 + '-A PREROUTING --dst 152.19.134.147 -p tcp --dport 443 -j DNAT --to-destination 140.211.169.204:443', + '-A POSTROUTING -p tcp --dst 140.211.169.204 --dport 443 -j SNAT --to-source 152.19.134.147', + '-A OUTPUT --dst 152.19.134.147 -p tcp --dport 443 -j DNAT --to-destination 140.211.169.204:443', + # 9418 + '-A PREROUTING --dst 152.19.134.147 -p tcp --dport 9418 -j DNAT --to-destination 140.211.169.204:9418', + '-A POSTROUTING -p tcp --dst 140.211.169.204 --dport 9418 -j SNAT --to-source 152.19.134.147', + '-A OUTPUT --dst 152.19.134.147 -p tcp --dport 9418 -j DNAT --to-destination 140.211.169.204:9418', + # Eventsource + '-A PREROUTING --dst 152.19.134.147 -p tcp --dport 8088 -j DNAT --to-destination 140.211.169.204:8088', + '-A POSTROUTING -p tcp --dst 140.211.169.204 --dport 8088 -j SNAT --to-source 152.19.134.147', + '-A OUTPUT --dst 152.19.134.147 -p tcp --dport 8088 -j DNAT --to-destination 140.211.169.204:8088', + # Fedmsg + '-A PREROUTING --dst 152.19.134.147 -p tcp --dport 9940 -j DNAT --to-destination 140.211.169.204:9940', + '-A POSTROUTING -p tcp --dst 140.211.169.204 --dport 9940 -j SNAT --to-source 152.19.134.147', + '-A OUTPUT --dst 152.19.134.147 -p tcp --dport 9940 -j DNAT --to-destination 140.211.169.204:9940', ] diff --git a/scripts/freezelist b/scripts/freezelist index 2acab9023..b033c8413 100755 --- a/scripts/freezelist +++ b/scripts/freezelist @@ -25,7 +25,7 @@ variable_manager = VariableManager(loader=loader, inventory=inv) frozen = [] unfrozen = [] -for host in sorted(inv.get_hosts()): +for host in inv.get_hosts(order="sorted"): vars = variable_manager.get_vars(host=host) freezes = vars.get('freezes', None) -- 2.21.0
_______________________________________________ infrastructure mailing list -- infrastructure@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to infrastructure-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/infrastructure@xxxxxxxxxxxxxxxxxxxxxxx