ansible 1.6.10
This stanza:
- name: Forward LDAP ports
lineinfile: dest=/etc/sysconfig/iptables
insertbefore=BOF
line=“{{item}}”
with_items: - “COMMIT”
- “-A OUTPUT -d 127.0.0.1/32 -p tcp -m tcp --dport 389 -j REDIRECT --to-ports 10389”
- “-A OUTPUT -d 127.0.0.1/32 -p tcp -m tcp --dport 636 -j REDIRECT --to-ports 10636”
- “:OUTPUT ACCEPT [0:0]”
- “:POSTROUTING ACCEPT [0:0]”
- “:PREROUTING ACCEPT [0:0]”
- “*nat”
Results in:
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A OUTPUT -d 127.0.0.1/32 -p tcp -m tcp --dport 636 -j REDIRECT --to-ports 10636
-A OUTPUT -d 127.0.0.1/32 -p tcp -m tcp --dport 389 -j REDIRECT --to-ports 10389
*nat
Whiskey Tango Foxtrot???
Why were two lines skipped, including the most innocuous line of the bunch? Why were they not done in order?
It would be really nice to see an ansible module to insert the contents of a file rather than just a line.