Hello,
I’m testing ansible 2.1.0.0 built from the git repo.
The actual installed RPM package on CentOS 7.2.1511 is ``ansible-2.1.0.0-0.git201605271344.2452bd2.stable21.el7.centos.noarch
I'm trying to use blockinfile.
My basic playbook named test-blockinfile.yml has:
---
- hosts: localhost
connection: local
gather_facts: no
tasks:
- name: A very simple blockinfile test
blockinfile:
dest: ~/testfile
insertbefore: BOF
block: |
This is my block
This should work
It is very basic test
create: yes
Executing it with ansible-playbook -vvv test-blockinfile.yml results in:
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_lq3WNb/ansible_module_blockinfile.py", line 311, in <module>
main()
File "/tmp/ansible_lq3WNb/ansible_module_blockinfile.py", line 247, in main
if module.constants['ANSIBLE_VERSION'].startswith('1.'):
AttributeError: 'AnsibleModule' object has no attribute 'constants'
Can anyone else confirm that they are getting the error, too?
I've submitted 2348: https://github.com/ansible/ansible-modules-extras/issues/2348
Thank you.