I used the test-module script to debug modules in ansible but i am getting 
a strange error:

1 Here is the example i followed: 

So i executed this command

ansible/hacking/test-module -I ansible_python_interpreter=/usr/bin/python 
-m ./custom_modules/timetest.py 

*BUT I am getting this error :*

[vagrant@db3 vagrant]$ ansible/hacking/test-module -I 
ansible_python_interpreter=/usr/bin/python -m ./custom_modules/timetest.py 
Traceback (most recent call last):
  File "ansible/hacking/test-module", line 270, in <module>
  File "ansible/hacking/test-module", line 251, in main
    (modfile, modname, module_style) = 
boilerplate_module(options.module_path, options.module_args, interpreters, 
options.check, options.filename)
  File "ansible/hacking/test-module", line 154, in boilerplate_module
TypeError: modify_module() got multiple values for keyword argument 

*Here is details my ansible *

[vagrant@db3 vagrant]$ ansible --version
ansible 2.5.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = 
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Aug  4 2017, 00:39:18) [GCC 4.8.5 
20150623 (Red Hat 4.8.5-16)]

When i checked the modify_module function in module_common.py i see that 
task_vars is in position 4

def modify_module(module_name, module_path, module_args, task_vars=None, 
templar=None, module_compression='ZIP_STORED', async_timeout=0, become=False,
                  become_method=None, become_user=None, become_password=None, 
become_flags=None, environment=None):

*but when it is used in the test-module it is not on position 4  but 
Templar is:*

    (module_data, module_style, shebang) = module_common.modify_module(

*Please is this a bug? and if it is, how to make this work?Regards,Sessy*

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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to