From 4271dd66453489588afa42fc0782fe16bdc6ef45 Mon Sep 17 00:00:00 2001 From: "teuto.net Netzdienste GmbH" Date: Wed, 30 Mar 2016 10:27:29 +0200 Subject: [PATCH] using apt module instead of command module to install python-apt --- roles/kubernetes/preinstall/tasks/main.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/roles/kubernetes/preinstall/tasks/main.yml b/roles/kubernetes/preinstall/tasks/main.yml index be9515a2d..6b13efd8e 100644 --- a/roles/kubernetes/preinstall/tasks/main.yml +++ b/roles/kubernetes/preinstall/tasks/main.yml @@ -61,16 +61,12 @@ - "/opt/cni/bin" when: kube_network_plugin == "calico" -- name: Update package management cache (APT) - apt: update_cache=yes - when: ansible_pkg_mgr == 'apt' - - name: Update package management cache (YUM) yum: update_cache=yes name='*' when: ansible_pkg_mgr == 'yum' -- name: Install python-apt for Debian distribs - command: apt-get install -y python-apt +- name: Install latest version of python-apt for Debian distribs + apt: name=python-apt state=latest update_cache=yes cache_valid_time=3600 when: ansible_os_family == "Debian" changed_when: False @@ -78,7 +74,6 @@ command: dnf install -y python-dnf yum when: ansible_distribution == "Fedora" and ansible_distribution_major_version > 21 - changed_when: False - name: Install epel-release on RHEL command: rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm