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?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/2dfa6b93-a120-4fc8-8b90-ed5d9a1e18bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.