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:
1) 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
--
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/956117c2-a4e0-48c9-a58a-96ed9ae41c80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.