Skip to content

Commit

Permalink
Avoid python Azure package collision in SLES15
Browse files Browse the repository at this point in the history
15SP4 and 15SP5 move some Azure related Python packages to Python 3.11
  • Loading branch information
mpagot committed May 20, 2024
1 parent 3845a2a commit 714da1c
Showing 1 changed file with 39 additions and 7 deletions.
46 changes: 39 additions & 7 deletions ansible/playbooks/tasks/azure-cluster-bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,48 @@
- ansible_distribution_major_version == '15'
- public_cloud_module != 'Registered'

# TODO: Version Control
- name: Ensure Azure Python SDK and Azure Identity python modules are installed
# For SLES 12 a we need to force a downgrade of python-azure-core see https://www.suse.com/support/kb/doc/?id=000020716
- name: Ensure Azure Python SDK and Azure Identity python modules are installed [12sp5]
community.general.zypper:
name: "{{ item.package }}"
name: "{{ item }}"
state: present
loop:
# For SLES 12 a we need to force a downgrade of python-azure-core see https://www.suse.com/support/kb/doc/?id=000020716
- {'sles': '12', 'package': ['python-azure-mgmt-compute', 'python-azure-identity', 'python-azure-core==1.9.0-2.3.4']}
- {'sles': '15', 'package': ['python3-azure-mgmt-compute', 'python3-azure-identity']}
when: item.sles == ansible_distribution_major_version
- 'python-azure-mgmt-compute'
- 'python-azure-identity'
- 'python-azure-core==1.9.0-2.3.4'
when:
- ansible_distribution_major_version == 12
register: result
until: result is succeeded
retries: 3
delay: 60

- name: Ensure Azure Python SDK and Azure Identity python modules are installed [15 sp<4]
community.general.zypper:
name: "{{ item }}"
state: present
loop:
- 'python3-azure-mgmt-compute'
- 'python3-azure-identity'
when:
- ansible_distribution_major_version == 15
- ansible_distribution_release < 4
register: result
until: result is succeeded
retries: 3
delay: 60

# https://www.suse.com/c/incompatible-changes-ahead-for-public-cloud-sdks/
- name: Ensure Azure Python SDK and Azure Identity python modules are installed [15 sp>=4]
community.general.zypper:
name: "{{ item }}"
state: present
loop:
- 'python311-azure-mgmt-compute'
- 'python311-azure-identity'
when:
- ansible_distribution_major_version == 15
- ansible_distribution_release >= 4
register: result
until: result is succeeded
retries: 3
Expand Down

0 comments on commit 714da1c

Please sign in to comment.