c12s-kubespray/roles/kubernetes/preinstall/tasks/0070-system-packages.yml

93 lines
2.5 KiB
YAML
Raw Normal View History

2018-09-06 14:26:57 +00:00
---
2020-07-28 08:39:08 +00:00
- name: Update package management cache (zypper) - SUSE
command: zypper -n --gpg-auto-import-keys ref
2018-08-23 14:51:52 +00:00
register: make_cache_output
until: make_cache_output is succeeded
2018-08-23 14:51:52 +00:00
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
when:
- ansible_pkg_mgr == 'zypper'
tags: bootstrap-os
- 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_distribution in ["CentOS","RedHat","OracleLinux"]
- not is_fedora_coreos
2018-08-23 14:51:52 +00:00
- name: Install python-dnf for latest RedHat versions
command: dnf install -y python-dnf yum
register: dnf_task_result
until: dnf_task_result is succeeded
2018-08-23 14:51:52 +00:00
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
when:
- ansible_distribution == "Fedora"
- ansible_distribution_major_version|int > 21
- ansible_distribution_major_version|int <= 29
- not is_fedora_coreos
changed_when: False
tags:
- bootstrap-os
- name: Install python3-dnf for latest RedHat versions
command: dnf install -y python3-dnf
register: dnf_task_result
until: dnf_task_result is succeeded
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
when:
- ansible_distribution == "Fedora"
- ansible_distribution_major_version|int >= 30
- not is_fedora_coreos
2018-08-23 14:51:52 +00:00
changed_when: False
tags:
- bootstrap-os
- name: Install epel-release on RedHat/CentOS
yum:
name: epel-release
state: present
when:
- ansible_distribution in ["CentOS","RedHat"]
- not is_fedora_coreos
2018-08-23 14:51:52 +00:00
- 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'
2018-08-23 14:51:52 +00:00
- name: Install packages requirements
action:
module: "{{ ansible_pkg_mgr }}"
name: "{{ required_pkgs | default([]) | union(common_required_pkgs|default([])) }}"
2018-08-23 14:51:52 +00:00
state: latest
register: pkgs_task_result
until: pkgs_task_result is succeeded
[2.14] fix ci (#7021) * fix flake8 errors in Kubespray CI - tox-inventory-builder * fix flake8 errors in Kubespray CI - tox-inventory-builder * Invalidate CRI-O kubic repo's cache Signed-off-by: Victor Morales <v.morales@samsung.com> * add support to configure pkg install retries and use in CI job tf-ovh_ubuntu18-calico (due to it failing often) * Switch Calico and Cilium image repos to Quay.io Co-authored-by: Victor Morales <v.morales@samsung.com> Co-authored-by: Barry Melbourne <9964974+bmelbourne@users.noreply.github.com> Conflicts: roles/download/defaults/main.yml * up vagrant box to fedora/33-cloud-base in cri-o molecule tests (cherry picked from commit 06ec5393d770097c58a914ecf7a100251042bbd4) * add Google proxy-mirror-cache for docker hub to CI tests (cherry picked from commit d739a6bb2f935954510d6a83629584953db67fca) * containerd docker hub registry mirror support * containerd docker hub registry mirror support * add docs * fix typo * fix yamllint * fix indent in sample and ansible-playbook param in testcases_run * fix md * mv common vars to tests/common/_docker_hub_registry_mirror.yml * checkout vars to upgrade tests (cherry picked from commit 4a8a52bad9ecd89d3879b37601112200a62bfcd9) * Exclude .git/ from shellcheck If a branch name contains '.sh', current shellcheck checks the branch file under .git/ and outputs error because the format is not shell script one. This makes shellcheck exclude files under .git/ to avoid this issue. (cherry picked from commit e2467d87b65ad9050bea022a2d514172520e48f3) Co-authored-by: Hans Feldt <2808287+hafe@users.noreply.github.com> Co-authored-by: Sergey <s.bondarev@southbridge.ru> Co-authored-by: Kenichi Omichi <ken-oomichi@wx.jp.nec.com>
2020-12-17 16:07:09 +00:00
retries: "{{ pkg_install_retries }}"
2018-08-23 14:51:52 +00:00
delay: "{{ retry_stagger | random + 3 }}"
when: not (ansible_os_family in ["Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_fedora_coreos)
2018-08-23 14:51:52 +00:00
tags:
- bootstrap-os
- name: Install ipvsadm for ClearLinux
swupd:
name: ipvsadm
state: present
when:
- ansible_os_family in ["ClearLinux"]
- kube_proxy_mode == 'ipvs'