From ac6355f0ccc3cd637c2e1ec4c5693652ff5f3292 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 10 Aug 2017 16:56:17 -0700 Subject: [PATCH] Use shell for apt-get update The apt ansible module requires python-apt, but this command is trying to update the apt cache which is, by definition, out of date since we just changed the sources list. Just use the shell so we don't require anything extra on images. Change-Id: I41313af70193f97e2ef433d0ac0a0d274fafddb7 --- roles/configure-mirrors/tasks/mirror.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/roles/configure-mirrors/tasks/mirror.yaml b/roles/configure-mirrors/tasks/mirror.yaml index 1f041e396..d96d7ffc7 100644 --- a/roles/configure-mirrors/tasks/mirror.yaml +++ b/roles/configure-mirrors/tasks/mirror.yaml @@ -22,6 +22,5 @@ # Make sure OS does not have a stale package cache. - name: Update apt cache become: yes - apt: - update_cache: yes + command: apt-get update when: ansible_os_family == 'Debian'