2019-07-11 06:46:54 +00:00
|
|
|
---
|
|
|
|
- name: ensure containerd repository public key is installed
|
2021-01-08 21:24:55 +00:00
|
|
|
apt_key:
|
2019-07-11 06:46:54 +00: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 15:21:08 +00:00
|
|
|
environment: "{{ proxy_env }}"
|
2021-01-08 21:24:55 +00:00
|
|
|
when: ansible_pkg_mgr == 'apt'
|
2019-07-11 06:46:54 +00:00
|
|
|
|
|
|
|
- name: ensure containerd repository is enabled
|
2021-01-08 21:51:06 +00:00
|
|
|
apt_repository:
|
2019-07-11 06:46:54 +00:00
|
|
|
repo: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
with_items: "{{ containerd_repo_info.repos }}"
|
2021-01-08 21:51:06 +00:00
|
|
|
when: ansible_pkg_mgr == 'apt'
|
2019-07-11 06:46:54 +00:00
|
|
|
|
|
|
|
- name: Configure containerd repository on Fedora
|
|
|
|
template:
|
|
|
|
src: "fedora_containerd.repo.j2"
|
|
|
|
dest: "{{ yum_repo_dir }}/containerd.repo"
|
2020-03-17 21:31:27 +00:00
|
|
|
when: ansible_distribution == "Fedora"
|
2019-07-11 06:46:54 +00:00
|
|
|
|
2021-02-05 08:46:52 +00:00
|
|
|
- name: Configure containerd repository on RedHat/OracleLinux/CentOS
|
2019-07-11 06:46:54 +00:00
|
|
|
template:
|
|
|
|
src: "rh_containerd.repo.j2"
|
|
|
|
dest: "{{ yum_repo_dir }}/containerd.repo"
|
2021-02-05 08:46:52 +00:00
|
|
|
when: ansible_distribution in ["CentOS", "OracleLinux", "RedHat"]
|