From 39e48621be51ac5a7173860c1985b40c74780279 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Tue, 4 Apr 2017 18:34:40 +0300 Subject: Fix apt-transport-https installation We run virtual machines built from a disk image. The image has package lists downloaded, but from far ago. So we update them before installing the https transport. Then we install the transport. Then we fiddle with sources.lists, update package lists and then continue as needed. --- roles/sane_debian_system/tasks/apt.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'roles') diff --git a/roles/sane_debian_system/tasks/apt.yml b/roles/sane_debian_system/tasks/apt.yml index 8d57292..d6ef838 100644 --- a/roles/sane_debian_system/tasks/apt.yml +++ b/roles/sane_debian_system/tasks/apt.yml @@ -1,5 +1,15 @@ -# This is installed before updating sources lists, so that if they -# happen to use https URLs the package lists can still be update. +# First update package lists. The ones that come with the image may be +# badly out of date. +- name: update package lists + apt: + update_cache: yes + cache_valid_time: 0 + +# Now install https transport for APT. This is installed before +# changing sources lists, so that if they happen to use https URLs apt +# will still work. apt-transport-https is in the main Debian archive, +# and we assume those are in the sources.list that come with the +# image. - name: install apt-transport-https apt: name: apt-transport-https -- cgit v1.2.1