Skip to content
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

Fix recipe #1606

Merged
merged 4 commits into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions contextualization/conf-ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
# Ansible specific Version or "latest"
ANSIBLE_VERSION: 4.10.0
tasks:
- name: Set Ansible version from env if defined
set_fact: ANSIBLE_VERSION={{ lookup('env','ANSIBLE_VERSION') }}
when: lookup('env','ANSIBLE_VERSION') != ""

############## To avoid some issues with cloud-init and unattended upgrades ###############
- name: Avoid unattended upgrades
raw: |
Expand Down Expand Up @@ -168,8 +164,9 @@

- name: Install cryptography & pyOpenSSL in py3.11+
pip:
name: cryptography>36.0.0
name: pyOpenSSL>20.0
name:
- cryptography>36.0.0
- pyOpenSSL>20.0
executable: pip3
extra_args: "{{ extra_args }}"
when: ansible_python_version is version('3.11', '>=')
Expand All @@ -184,12 +181,21 @@
executable: pip3
extra_args: "{{ extra_args }}"

- name: Set Ansible newer version for python 3.12
- name: Set Ansible newer version for python 3.8+
set_fact:
ANSIBLE_VERSION: 6.7.0
when:
- ansible_python_version is version('3.8', '>=')

- name: Set Ansible newer version for python 3.9+
set_fact:
ANSIBLE_VERSION: 8.7.0
when:
- ansible_python_version is version('3.12', '>=')
- ANSIBLE_VERSION is version('8.7.0', '<')
- ansible_python_version is version('3.9', '>=')

- name: Set Ansible version from env if defined
set_fact: ANSIBLE_VERSION={{ lookup('env','ANSIBLE_VERSION') }}
when: lookup('env','ANSIBLE_VERSION') != ""

- name: Install ansible {{ ANSIBLE_VERSION }} with Pip
pip:
Expand Down