test-runner is using "/usr/bin/python", it should use the correct ansible_python_interpreter. As other tasks do.
ansible_python_interpreter
<test-runner> EXEC /bin/sh -c '/usr/bin/python /root..."
Other tasks will do:
"<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python2 /root"
Example: using: ansible-playbook --tags classic tests.yml -vvv
ansible-playbook --tags classic tests.yml -vvv
TASK [str-common : Copy tests to test environment] **************************************************************************************************************************************************************** task path: /etc/ansible/roles/str-common/tasks/main.yml:22 Using module file /usr/lib/python2.7/site-packages/ansible/modules/files/synchronize.py <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root <127.0.0.1> EXEC /bin/sh -c 'echo ~ && sleep 0' <127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1518686496.63-179085471942595 `" && echo ansible-tmp-1518686496.63-179085471942595="` echo /root/.ansible/tmp/ansible-tmp-1518686496.63-179085471942595 `" ) && sleep 0' <127.0.0.1> PUT /tmp/tmpdjAney TO /root/.ansible/tmp/ansible-tmp-1518686496.63-179085471942595/synchronize.py <127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1518686496.63-179085471942595/ /root/.ansible/tmp/ansible-tmp-1518686496.63-179085471942595/synchronize.py && sleep 0' <127.0.0.1> EXEC /bin/sh -c '/usr/bin/python2 /root/.ansible/tmp/ansible-tmp-1518686496.63-179085471942595/synchronize.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1518686496.63-179085471942595/" > /dev/null 2>&1 && sleep 0'
*Using: /usr/bin/ansible-playbook-3 --tags classic tests.yml -vvv: *
/usr/bin/ansible-playbook-3 --tags classic tests.yml -vvv
TASK [str-common : Copy tests to test environment] **************************************************************************************************************************************************************** task path: /etc/ansible/roles/str-common/tasks/main.yml:22 Using module file /usr/lib/python3.6/site-packages/ansible/modules/files/synchronize.py <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root <127.0.0.1> EXEC /bin/sh -c 'echo ~ && sleep 0' <127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1518684748.8740962-143418688458065 `" && echo ansible-tmp-1518684748.8740962-143418688458065="` echo /root/.ansible/tmp/ansible-tmp-1518684748.8740962-143418688458065 `" ) && sleep 0' <127.0.0.1> PUT /tmp/tmpcirtheil TO /root/.ansible/tmp/ansible-tmp-1518684748.8740962-143418688458065/synchronize.py <127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1518684748.8740962-143418688458065/ /root/.ansible/tmp/ansible-tmp-1518684748.8740962-143418688458065/synchronize.py && sleep 0' <127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1518684748.8740962-143418688458065/synchronize.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1518684748.8740962-143418688458065/" > /dev/null 2>&1 && sleep 0'
Thanks for the bug report.
Metadata Update from @astepano: - Issue assigned to bgoncalv
related #122
Metadata Update from @astepano: - Issue status updated to: Closed (was: Open)