containerd: use package instead of action
Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
(cherry picked from commit 1b88678cf3
)
This commit is contained in:
parent
b198cd23d0
commit
4de5a070e1
6 changed files with 18 additions and 22 deletions
|
@ -92,18 +92,22 @@
|
|||
when: ansible_pkg_mgr == 'apt'
|
||||
|
||||
- name: ensure containerd packages are installed
|
||||
action: "{{ containerd_package_info.pkg_mgr }}"
|
||||
args:
|
||||
pkg: "{{ item.name }}"
|
||||
force: "{{ item.force | default(omit) }}"
|
||||
package:
|
||||
name: "{{ containerd_package_info.pkgs }}"
|
||||
state: present
|
||||
update_cache: "{{ omit if ansible_distribution == 'Fedora' else True }}"
|
||||
enablerepo: "{{ item.repo | default(omit) }}"
|
||||
module_defaults:
|
||||
apt:
|
||||
update_cache: true
|
||||
dnf:
|
||||
enablerepo: "{{ containerd_package_info.enablerepo | default(omit) }}"
|
||||
yum:
|
||||
enablerepo: "{{ containerd_package_info.enablerepo | default(omit) }}"
|
||||
zypper:
|
||||
update_cache: true
|
||||
register: containerd_task_result
|
||||
until: containerd_task_result is succeeded
|
||||
retries: 4
|
||||
delay: "{{ retry_stagger | d(3) }}"
|
||||
with_items: "{{ containerd_package_info.pkgs }}"
|
||||
notify: restart containerd
|
||||
when:
|
||||
- not is_ostree
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
---
|
||||
containerd_package_info:
|
||||
pkg_mgr: apt
|
||||
pkgs:
|
||||
- name: "{{ containerd_versioned_pkg[containerd_version | string] }}"
|
||||
force: false
|
||||
- "{{ containerd_versioned_pkg[containerd_version | string] }}"
|
||||
|
||||
containerd_repo_key_info:
|
||||
pkg_key: apt_key
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
containerd_package_info:
|
||||
pkg_mgr: dnf
|
||||
enablerepo: "docker-ce"
|
||||
pkgs:
|
||||
- name: "{{ containerd_versioned_pkg[containerd_version | string] }}"
|
||||
repo: "docker-ce"
|
||||
- "{{ containerd_versioned_pkg[containerd_version | string] }}"
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
containerd_package_info:
|
||||
pkg_mgr: yum
|
||||
enablerepo: "docker-ce"
|
||||
pkgs:
|
||||
- name: "{{ containerd_versioned_pkg[containerd_version | string] }}"
|
||||
repo: "docker-ce"
|
||||
- "{{ containerd_versioned_pkg[containerd_version | string] }}"
|
||||
|
||||
containerd_repo_key_info:
|
||||
pkg_key: ''
|
||||
|
|
|
@ -3,10 +3,8 @@
|
|||
containerd_package: containerd
|
||||
|
||||
containerd_package_info:
|
||||
pkg_mgr: zypper
|
||||
pkgs:
|
||||
- name: "{{ containerd_package }}"
|
||||
state: latest
|
||||
- "{{ containerd_package }}"
|
||||
|
||||
containerd_repo_key_info:
|
||||
pkg_key: ''
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
---
|
||||
containerd_package_info:
|
||||
pkg_mgr: apt
|
||||
pkgs:
|
||||
- name: "{{ containerd_versioned_pkg[containerd_version | string] }}"
|
||||
force: false
|
||||
- "{{ containerd_versioned_pkg[containerd_version | string] }}"
|
||||
|
||||
containerd_repo_key_info:
|
||||
pkg_key: apt_key
|
||||
|
|
Loading…
Reference in a new issue