Running test-module against any module throwing FileNotFoundError

Hi

Running commands mentioned in test-module example throw errors:

https://github.com/ansible/ansible/blob/devel/hacking/test-module#L26

./hacking/test-module -m lib/ansible/modules/commands/command.py -a “/bin/sleep 3”

  • including generated source, if any, saving to: /home/user_name/.ansible_module_generated
    Traceback (most recent call last):
    File “./hacking/test-module”, line 271, in
    main()
    File “./hacking/test-module”, line 267, in main
    runtest(modfile, argspath, modname, module_style, interpreters)
    File “./hacking/test-module”, line 204, in runtest
    modfile, argspath = ansiballz_setup(modfile, modname, interpreters)
    File “./hacking/test-module”, line 182, in ansiballz_setup
    cmd = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    File “/usr/lib64/python3.6/subprocess.py”, line 709, in init
    restore_signals, start_new_session)
    File “/usr/lib64/python3.6/subprocess.py”, line 1344, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: ‘/home/user_name/.ansible_module_generated’: ‘/home/user_name/.ansible_module_generated’

Here is how my environment is setup:

git clone https://github.com/ansible/ansible.git
cd ansible
/usr/bin/python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
source hacking/env-setup

Python 3.6.6

ansible 2.8.0.dev0

Thanks
Isaak