From 705400460a66ce188edf495c98ef34b98608079f Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Tue, 5 Jul 2016 13:15:57 +0200 Subject: [PATCH] Update apt cache as for prerequisites as well The task kubernetes/preinstall : Install packages requirements shall not fail Signed-off-by: Bogdan Dobrelya --- roles/kubernetes/preinstall/tasks/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/kubernetes/preinstall/tasks/main.yml b/roles/kubernetes/preinstall/tasks/main.yml index 95cd134ce..5c8c99c15 100644 --- a/roles/kubernetes/preinstall/tasks/main.yml +++ b/roles/kubernetes/preinstall/tasks/main.yml @@ -68,8 +68,12 @@ yum: update_cache=yes name='*' when: ansible_pkg_mgr == 'yum' +- name: Update package management cache (APT) + apt: update_cache=yes name='*' cache_valid_time=3600 + when: ansible_pkg_mgr == 'apt' + - name: Install latest version of python-apt for Debian distribs - apt: name=python-apt state=latest update_cache=yes cache_valid_time=3600 + apt: name=python-apt state=latest when: ansible_os_family == "Debian" - name: Install python-dnf for latest RedHat versions