Browse Source
opensuse: move package installation to system_packages
No reason to special case
pull/12236/head
Max Gautier
4 months ago
Failed to extract signature
4 changed files with
12 additions and
30 deletions
-
roles/bootstrap_os/tasks/opensuse.yml
-
roles/system_packages/tasks/main.yml
-
roles/system_packages/vars/main.yml
-
scripts/assert-sorted-checksums.yml
|
|
@ -55,31 +55,3 @@ |
|
|
|
become: true |
|
|
|
tags: |
|
|
|
- facts |
|
|
|
|
|
|
|
# Without this package, the get_url module fails when trying to handle https |
|
|
|
- name: Install python-cryptography |
|
|
|
community.general.zypper: |
|
|
|
name: python-cryptography |
|
|
|
state: present |
|
|
|
update_cache: true |
|
|
|
become: true |
|
|
|
when: |
|
|
|
- ansible_distribution_version is version('15.4', '<') |
|
|
|
|
|
|
|
- name: Install python3-cryptography |
|
|
|
community.general.zypper: |
|
|
|
name: python3-cryptography |
|
|
|
state: present |
|
|
|
update_cache: true |
|
|
|
become: true |
|
|
|
when: |
|
|
|
- ansible_distribution_version is version('15.4', '>=') |
|
|
|
|
|
|
|
# Nerdctl needs some basic packages to get an environment up |
|
|
|
- name: Install basic dependencies |
|
|
|
community.general.zypper: |
|
|
|
name: |
|
|
|
- iptables |
|
|
|
- apparmor-parser |
|
|
|
state: present |
|
|
|
become: true |
|
|
@ -69,7 +69,8 @@ |
|
|
|
package: |
|
|
|
name: "{{ item.packages | dict2items | selectattr('value', 'ansible.builtin.all') | map(attribute='key') }}" |
|
|
|
state: "{{ item.state }}" |
|
|
|
update_cache: true |
|
|
|
update_cache: "{{ true if ansible_pkg_mgr in ['zypper', 'apt', 'dnf'] else omit }}" |
|
|
|
cache_valid_time: "{{ 86400 if ansible_pkg_mgr == 'apt' else omit }}" # 24h |
|
|
|
register: pkgs_task_result |
|
|
|
until: pkgs_task_result is succeeded |
|
|
|
retries: "{{ pkg_install_retries }}" |
|
|
|
|
|
@ -7,6 +7,8 @@ pkgs_to_remove: |
|
|
|
pkgs: |
|
|
|
apparmor: |
|
|
|
- "{{ ansible_os_family == 'Debian' }}" |
|
|
|
apparmor-parser: |
|
|
|
- "{{ ansible_os_family == 'Suse' }}" |
|
|
|
apt-transport-https: |
|
|
|
- "{{ ansible_os_family == 'Debian' }}" |
|
|
|
aufs-tools: |
|
|
@ -51,7 +53,7 @@ pkgs: |
|
|
|
- "{{ kube_proxy_mode != 'ipvs' }}" |
|
|
|
- "{{ 'k8s_cluster' in group_names }}" |
|
|
|
iptables: |
|
|
|
- "{{ ansible_os_family in ['Debian', 'RedHat'] }}" |
|
|
|
- "{{ ansible_os_family in ['Debian', 'RedHat', 'Suse'] }}" |
|
|
|
iputils: |
|
|
|
- "{{ not ansible_os_family in ['Flatcar', 'Flatcar Container Linux by Kinvolk', 'Debian'] }}" |
|
|
|
- "{{ main_access_ip is defined }}" |
|
|
@ -91,9 +93,15 @@ pkgs: |
|
|
|
python-apt: |
|
|
|
- "{{ ansible_os_family == 'Debian' }}" |
|
|
|
- "{{ ansible_distribution_major_version == '10' }}" |
|
|
|
python-cryptography: |
|
|
|
- "{{ ansible_os_family == 'Suse' }}" |
|
|
|
- "{{ ansible_distribution_version is version('15.4', '<') }}" |
|
|
|
python3-apt: |
|
|
|
- "{{ ansible_os_family == 'Debian' }}" |
|
|
|
- "{{ ansible_distribution_major_version != '10' }}" |
|
|
|
python3-cryptography: |
|
|
|
- "{{ ansible_os_family == 'Suse' }}" |
|
|
|
- "{{ ansible_distribution_version is version('15.4', '>=') }}" |
|
|
|
python3-libselinux: |
|
|
|
- "{{ ansible_distribution in ['RedHat', 'CentOS'] }}" |
|
|
|
rsync: [] |
|
|
|
|
|
@ -48,6 +48,7 @@ |
|
|
|
ansible_distribution: irrelevant |
|
|
|
ansible_distribution_major_version: irrelevant |
|
|
|
ansible_distribution_minor_version: irrelevant |
|
|
|
ansible_distribution_version: 1.0 |
|
|
|
ansible_os_family: irrelevant |
|
|
|
assert: |
|
|
|
that: "pkgs_lists | sort == pkgs_lists" |
|
|
|