Dear *,
trying to create a new plugin. It’s gonna be a variation of the lineinfile module, so I copied the code from there and placed it into my local action plugins folder, as configured in my ansible.cfg
I didn’t change anything yet, it is the original lineinfile.py so I’d expect the same behavior. Though instead I get an error I don’t understand:
TASK: [calling testmodule] ****************************************************************** {"msg": "this module requires key=value arguments (['<<INCLUDE_ANSIBLE_MODULE_ARGS>>'])", "failed": true}
This error happens when the AnsibleModule class is initiated. Obviously the replacement is not happening.
This is my task, which triggers my test module.
`
- name: calling testmodule
testmodule: dest=“some-file” line=“some-line”
`
The module gets called. A debug message at the beginning of the main() method gets shown on the command line when executed.
There is nothing wrong with the params definition. When I replace my “testmodule” with the original “lineinfile” it instantly works.
This is Ansible 1.8.2 but I tested it with other version too, down to 1.6.5 and I get the same error.
Why is Ansible failing to replace the INCLUDE_ANSIBLE_MODULE_ARGS? What am I missing, how to fix it?
Thanks,
Daniel