Hi,
I have written custom modules in python.
I am calling the modules from my task file like below:
- name: Collect logstash details
action: get_logstash_details path={{ logstash_path }}
register: result - name: Display the logstash details
debug: var=result
get_logstash_details is my custom module.
path is the parameter i want to pass to the custom module.
This paramter is accessed in custom module as mentioned below
path=sys.argv[1]
Queries:
- Is that the right way to send parameters to custom module?
I am getting the below error:
fatal: [172.19.10.31]: FAILED! => {“changed”: false, “failed”: true, “invocation”: {“module_args”: {“path”: “/opt/logstash_standalone/logstash-2.1.1/bin/logstash”}, “module_name”: “get_logstash_details”}, “msg”: “unsupported parameter for module: path”}
Thanks in advance,
Mona G