From f5508b179401dd6c7e915eb8e87bfcdad32839ac Mon Sep 17 00:00:00 2001 From: ant31 <2t.antoine@gmail.com> Date: Mon, 25 Jan 2016 02:06:34 +0100 Subject: [PATCH] Use update_cache when possible --- roles/kubernetes/preinstall/tasks/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/kubernetes/preinstall/tasks/main.yml b/roles/kubernetes/preinstall/tasks/main.yml index 91c7eb33f..93d332a2f 100644 --- a/roles/kubernetes/preinstall/tasks/main.yml +++ b/roles/kubernetes/preinstall/tasks/main.yml @@ -33,6 +33,12 @@ always_run: True tags: always +- name: Update package management cache + action: + module: "{{ ansible_pkg_mgr }}" + update_cache: yes + when: ansible_pkg_mgr in ['apt', 'yum'] + - name: Install python-apt for Debian distribs shell: apt-get install -y python-apt when: ansible_os_family == "Debian"