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

Avoid python Azure package collision in SLES15 #232

Merged
merged 1 commit into from
May 21, 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
45 changes: 38 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,47 @@
- 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_version is version('12.5', '==')
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_version is version('15.4', '<')
- ansible_distribution_version is version('12.5', '!=')
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_version is version('15.4', '>=')
register: result
until: result is succeeded
retries: 3
Expand Down
Loading