-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert ansible interpreter #32
base: master
Are you sure you want to change the base?
Conversation
- name: "Revert python interpreter" | ||
set_fact: | ||
ansible_python_interpreter: "{{ ansible_facts['discovered_interpreter_python'] }}" | ||
when: revert_python_interpreter is defined and revert_python_interpreter == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about changing the when
condition to when: ansible_os_family in ['RedHat', 'Darwin']
to match the when
condition for when the virtualenv tasks are executed? That way, we don't need to use a custom fact.
@@ -33,7 +33,7 @@ | |||
- name: setuptools>44.0.0,<45.0.0 | |||
state: present | |||
- name: pyOpenSSL | |||
- name: boto | |||
- name: boto3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RHEL/CentOS 7 won't have Python 3 installed and boto3 now only supports Python 3. Could you please pin to version 1.17.112
when using RHEL/CentOS 7?
@jsmcnair are you planning on addressing the feedback in the PR? |
This is probably a bit of an edge case, but I noticed an issue when using this role.
To replicate the issue, you would have to have a playbook that delegates a task to localhost once the plays in this role have completed. I was getting a permission denied on the path to the python in the virtualenv, presumably because it doesn't exist on localhost.
The fix is to flag that the interpreter has been changed and revert to the 'discovered' python interpreter at the end of the plays in the role.