2019-07-11 14:46:54 +08:00
|
|
|
---
|
|
|
|
- name: ensure containerd repository public key is installed
|
2021-01-09 05:24:55 +08:00
|
|
|
apt_key:
|
2019-07-11 14:46:54 +08:00
|
|
|
id: "{{ item }}"
|
|
|
|
url: "{{ containerd_repo_key_info.url }}"
|
|
|
|
state: present
|
|
|
|
register: keyserver_task_result
|
|
|
|
until: keyserver_task_result is succeeded
|
|
|
|
retries: 4
|
|
|
|
delay: "{{ retry_stagger | d(3) }}"
|
|
|
|
with_items: "{{ containerd_repo_key_info.repo_keys }}"
|
2021-01-11 23:21:08 +08:00
|
|
|
environment: "{{ proxy_env }}"
|
2021-01-09 05:24:55 +08:00
|
|
|
when: ansible_pkg_mgr == 'apt'
|
2019-07-11 14:46:54 +08:00
|
|
|
|
|
|
|
- name: ensure containerd repository is enabled
|
2021-01-09 05:51:06 +08:00
|
|
|
apt_repository:
|
2019-07-11 14:46:54 +08:00
|
|
|
repo: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
with_items: "{{ containerd_repo_info.repos }}"
|
2021-01-09 05:51:06 +08:00
|
|
|
when: ansible_pkg_mgr == 'apt'
|
2019-07-11 14:46:54 +08:00
|
|
|
|
|
|
|
- name: Configure containerd repository on Fedora
|
|
|
|
template:
|
|
|
|
src: "fedora_containerd.repo.j2"
|
|
|
|
dest: "{{ yum_repo_dir }}/containerd.repo"
|
2021-07-12 15:00:47 +08:00
|
|
|
mode: 0644
|
2020-03-18 05:31:27 +08:00
|
|
|
when: ansible_distribution == "Fedora"
|
2019-07-11 14:46:54 +08:00
|
|
|
|
2021-04-23 14:50:03 +08:00
|
|
|
- name: Configure containerd repository on RedHat/OracleLinux/CentOS/AlmaLinux
|
2019-07-11 14:46:54 +08:00
|
|
|
template:
|
|
|
|
src: "rh_containerd.repo.j2"
|
|
|
|
dest: "{{ yum_repo_dir }}/containerd.repo"
|
2021-07-12 15:00:47 +08:00
|
|
|
mode: 0644
|
2021-04-23 14:50:03 +08:00
|
|
|
when:
|
|
|
|
- ansible_os_family == "RedHat"
|
2021-05-11 10:25:36 +08:00
|
|
|
- ansible_distribution not in ["Fedora", "Amazon"]
|