So, 1.7.1 is the latest version of ansible, you are running an older
version which we realistically can't answer questions about here.
That being said, in each case, you have said to insert at the start of the
file.
That all being said, there's never been a bug where that array has been
processed
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