mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-15 22:34:21 +03:00
* Move fedora ansible python install to bootstrap-os
* /bin/dir is set in bootstrap-os
* Removing ansible_os_family workarounds
Support for these distributions was merged in Ansible, no need to
override it ourselves now.
https://github.com/ansible/ansible/pull/69324 openEuler
https://github.com/ansible/ansible/pull/77275/ UnionTech OS Server 20
https://github.com/ansible/ansible/pull/78232/ Kylin
* Don't unconditionnaly set VARIANT_ID=coreos in os-release
WTF, this is so wrong.
Furthermore, is_fedora_coreos is already handled in boostrap-os
* Handle Clearlinux generically
Followup of 4eec302e86 (since we're using
package module anyway, let's get rid of the custom task)
78 lines
2.2 KiB
YAML
78 lines
2.2 KiB
YAML
---
|
|
- name: Update package management cache (zypper) - SUSE
|
|
command: zypper -n --gpg-auto-import-keys ref
|
|
register: make_cache_output
|
|
until: make_cache_output is succeeded
|
|
retries: 4
|
|
delay: "{{ retry_stagger | random + 3 }}"
|
|
when:
|
|
- ansible_pkg_mgr == 'zypper'
|
|
tags: bootstrap-os
|
|
|
|
- name: Add debian 10 required repos
|
|
when:
|
|
- ansible_distribution == "Debian"
|
|
- ansible_distribution_version == "10"
|
|
tags:
|
|
- bootstrap-os
|
|
block:
|
|
- name: Add Debian Backports apt repo
|
|
apt_repository:
|
|
repo: "deb http://deb.debian.org/debian {{ ansible_distribution_release }}-backports main"
|
|
state: present
|
|
filename: debian-backports
|
|
|
|
- name: Set libseccomp2 pin priority to apt_preferences on Debian buster
|
|
copy:
|
|
content: |
|
|
Package: libseccomp2
|
|
Pin: release a={{ ansible_distribution_release }}-backports
|
|
Pin-Priority: 1001
|
|
dest: "/etc/apt/preferences.d/libseccomp2"
|
|
owner: "root"
|
|
mode: 0644
|
|
|
|
- name: Update package management cache (APT)
|
|
apt:
|
|
update_cache: yes
|
|
cache_valid_time: 3600
|
|
when: ansible_os_family == "Debian"
|
|
tags:
|
|
- bootstrap-os
|
|
|
|
- name: Remove legacy docker repo file
|
|
file:
|
|
path: "{{ yum_repo_dir }}/docker.repo"
|
|
state: absent
|
|
when:
|
|
- ansible_os_family == "RedHat"
|
|
- not is_fedora_coreos
|
|
|
|
- name: Install epel-release on RHEL derivatives
|
|
package:
|
|
name: epel-release
|
|
state: present
|
|
when:
|
|
- ansible_os_family == "RedHat"
|
|
- not is_fedora_coreos
|
|
- epel_enabled | bool
|
|
tags:
|
|
- bootstrap-os
|
|
|
|
- name: Update common_required_pkgs with ipvsadm when kube_proxy_mode is ipvs
|
|
set_fact:
|
|
common_required_pkgs: "{{ common_required_pkgs | default([]) + ['ipvsadm', 'ipset'] }}"
|
|
when: kube_proxy_mode == 'ipvs'
|
|
|
|
- name: Install packages requirements
|
|
package:
|
|
name: "{{ required_pkgs | default([]) | union(common_required_pkgs | default([])) }}"
|
|
state: present
|
|
register: pkgs_task_result
|
|
until: pkgs_task_result is succeeded
|
|
retries: "{{ pkg_install_retries }}"
|
|
delay: "{{ retry_stagger | random + 3 }}"
|
|
when: not (ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] or is_fedora_coreos)
|
|
tags:
|
|
- bootstrap-os
|