ansible_python_interpreter is empty unless it is set explicitly therefore it is not reliable way of knowing which version of python is used on remote host. Using binary name to know the version is not reliable either.
Fixing by using ansible_python.version.major provided by ansible.
This pr has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
ansible_python_interpreter is empty unless it is set explicitly therefore it is not reliable way of knowing which version of python is used on remote host. Using binary name to know the version is not reliable either.
Fixing by using ansible_python.version.major provided by ansible.