mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-15 18:20:02 -03:30
containerd,docker: use apt_repository instead of action
yum_repository expect really different params, so nothing to factor here
Ubuntu is not an ansible_os_family, the OS family for Ubuntu is Debian
Check for ansible_pkg_mgr == apt
Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
(cherry picked from commit a8e51e686e)
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
5e06ee6ea6
commit
b80f612d29
@@ -13,14 +13,11 @@
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
|
||||
- name: ensure containerd repository is enabled
|
||||
action: "{{ containerd_repo_info.pkg_repo }}"
|
||||
args:
|
||||
apt_repository:
|
||||
repo: "{{ item }}"
|
||||
state: present
|
||||
with_items: "{{ containerd_repo_info.repos }}"
|
||||
when:
|
||||
- ansible_os_family in ['Ubuntu', 'Debian']
|
||||
- containerd_repo_info.repos|length > 0
|
||||
when: ansible_pkg_mgr == 'apt'
|
||||
|
||||
- name: Configure containerd repository on Fedora
|
||||
template:
|
||||
|
||||
@@ -9,7 +9,6 @@ containerd_repo_key_info:
|
||||
- '{{ containerd_debian_repo_repokey }}'
|
||||
|
||||
containerd_repo_info:
|
||||
pkg_repo: apt_repository
|
||||
repos:
|
||||
- >
|
||||
deb {{ containerd_debian_repo_base_url }}
|
||||
|
||||
@@ -3,7 +3,3 @@ containerd_package_info:
|
||||
enablerepo: "docker-ce"
|
||||
pkgs:
|
||||
- "{{ containerd_versioned_pkg[containerd_version | string] }}"
|
||||
|
||||
containerd_repo_info:
|
||||
pkg_repo: ''
|
||||
repos: []
|
||||
|
||||
@@ -5,7 +5,3 @@ containerd_package: containerd
|
||||
containerd_package_info:
|
||||
pkgs:
|
||||
- "{{ containerd_package }}"
|
||||
|
||||
containerd_repo_info:
|
||||
pkg_repo: ''
|
||||
repos: []
|
||||
|
||||
@@ -9,7 +9,6 @@ containerd_repo_key_info:
|
||||
- '{{ containerd_ubuntu_repo_repokey }}'
|
||||
|
||||
containerd_repo_info:
|
||||
pkg_repo: apt_repository
|
||||
repos:
|
||||
- >
|
||||
deb {{ containerd_ubuntu_repo_base_url }}
|
||||
|
||||
Reference in New Issue
Block a user