diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-02-25 11:28:44 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-02-25 11:33:08 +0200 |
commit | 1472f5299393950a66b942bb735388a0b0186edb (patch) | |
tree | 063ffc5e6ddf80531b50e1f8108f3b68962537f4 | |
parent | 1dee07175a764770184254ac7ffc408225c01b1e (diff) | |
download | debian-ansible-1472f5299393950a66b942bb735388a0b0186edb.tar.gz |
Add: if the initial apt setup, ignore the failure
This lets us get past a mistake in the sources.list, such as a badly
set debian_codename.
Add: ignore more apt errors in initial setup
-rw-r--r-- | roles/sane_debian_system/tasks/apt.yml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/roles/sane_debian_system/tasks/apt.yml b/roles/sane_debian_system/tasks/apt.yml index 497739e..84c6420 100644 --- a/roles/sane_debian_system/tasks/apt.yml +++ b/roles/sane_debian_system/tasks/apt.yml @@ -10,7 +10,11 @@ # First update package lists. The ones that come with the image may be # badly out of date. +# +# Ignore any error here so that later tasks can fix things such as a badly +# formed sources.list. - name: update package lists + ignore_errors: yes apt: update_cache: yes cache_valid_time: 0 @@ -20,7 +24,11 @@ # 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. +# +# Ignore any error here so that later tasks can fix things such as a badly +# formed sources.list. - name: install apt-transport-https + ignore_errors: yes apt: name: apt-transport-https |