So running into a few issues running blockinfile for a few tests.
I created a really basic playbook literally form the ansible doc example
- name: insert/update eth0 configuration stanza in /etc/network/interfaces
(it might be better to copy files into /etc/network/interfaces.d/)
blockinfile:
dest: /etc/network/interfaces
block: |
iface eth0 inet static
address 192.0.2.23
netmask 255.255.255.0
when I run it it throws a syntax error pointing to the blockinfile line
So I'm curious if it's not finding the module or I really have a syntax issue, so the reason I think that is that i had ansible-19.4-1.el6.noarch installed and it had no files for
blockinfile at all. I upgraded it to 2.1.10-1.el6.noarch and it added /usr/lib/python2.6/site-packages/ansible/modules/extras/files/blockinfile.py I even used the --module-path flag and still no joy.
It says the default module path is /usr/share/my_modules but that directory was never created by the RPM. However, other functions like passwd change works fine.
So is my install messed up or am I building playbooks incorrectly?