#317 Set ansible_python_interpreter to /usr/bin/python3 on RHEL8 as a test-runner
Merged by astepano. Opened by astepano.
python_on_rhel8  into  master

Download 317.patch

I wonder if instead of checking the release the interpreter can't be set to /usr/bin/python3 when /usr/bin/python3 exists.

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.

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?

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.

  1. 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.

  2. There is nothing like lookup to check if file exists?

  3. You can check. Try and send a new PR.
  4. As far as I know, and tested yesterday - answer is : NO

One more thing. I know there is no document of acceptance of PR to STR.
But. Let's follow next rules.

  1. Reviewers of PR must: facilitate PR process. Please respect others time.
  2. Reviewer may ask a question if:
    they have strong disagree with the proposed change
    OR
    they already know better solution
    OR
    they know some problems that PR can introduce.
  3. Reviewers can ask to explain current approach.
  4. Reviewer should avoid speculative questions and ideas. For example: he personally doesn't have strong feeling of his ideas.

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

Pull-Request has been merged by astepano

Metadata