Hi Guys,
how to debug an ansible module ? I find
http://docs.ansible.com/ansible/dev_guide/developing_modules.html,
but failed to run it as following.
how do you do testing when develop one module ?
[root@server120 ansible-module]# ansible/hacking/test-module -m
./kolla_docker.py
* including generated source, if any, saving to:
/root/.ansible_module_generated
* ansiballz module detected; extracted module source to:
/root/debug_dir
***********************************
RAW OUTPUT
{"msg": "missing required arguments: action", "failed": true,
"invocation": {"module_args": {"cap_add": [], "graceful_timeout":
10, "common_options": {}, "labels": {}, "remove_on_exit": true,
"tls_verify": false, "restart_retries": 10, "detach": true,
"security_opt": [], "privileged": false, "api_version": "auto"}}}
***********************************
PARSED OUTPUT
{
"failed": true,
"invocation": {
"module_args": {
"api_version": "auto",
"cap_add": [],
"common_options": {},
"detach": true,
"graceful_timeout": 10,
"labels": {},
"privileged": false,
"remove_on_exit": true,
"restart_retries": 10,
"security_opt": [],
"tls_verify": false
}
},
"msg": "missing required arguments: action"
}