Signed-off-by: Andrei Stepanov astepano@redhat.com
I wonder if instead of checking the release the interpreter can't be set to /usr/bin/python3 when /usr/bin/python3 exists.
/usr/bin/python3
Answer 1: on Fedora even /usr/bin/python3 exists STR works good. No need. This is specific RHEL8 bug. Answer 2: to check the existence of /usr/bin/python3 we need to run Ansible plugin/task/step. We cannot run any Ansible before we do not set ansible_python_interpreter. Like chicken / egg issue.
ansible_python_interpreter
Answer 1: on Fedora even /usr/bin/python3 exists STR works good. No need. This is specific RHEL8 bug.
It works on Fedora as long Fedora ships python2, right? I see no reason why not set python3 on Fedora if python3 is available there.
Answer 2: to check the existence of /usr/bin/python3 we need to run Ansible plugin/task/step. We cannot run any Ansible before we do not set ansible_python_interpreter. Like chicken / egg issue.
There is nothing like lookup to check if file exists?
We do not want to change default Ansible behaviour. It works out of the box. It could be that Ansible has some internal logic. Fix only in broken place.
One more thing. I know there is no document of acceptance of PR to STR. But. Let's follow next rules.
For example: There is nothing like lookup to check if file exists? -- this question can be ignored. It doesn't facilitate PR process. It has only speculation, about author doesn't sure.
I will add this to contribution file.
OK. Jenkins test was successful : https://jenkins-fedora-atomic-process.apps.ci.centos.org/job/str_pr_test/319/console. It didn't receive update.
Commit e0475f94 fixes this pull-request
Pull-Request has been merged by astepano
Signed-off-by: Andrei Stepanov astepano@redhat.com