Update package cache before installing packages
i.e. like Georg suggested by mail:
diff --git a/ansible/roles/configure/tasks/main.yml b/ansible/roles/configure/tasks/main.yml
index 42c47db..7148794 100644
--- a/ansible/roles/configure/tasks/main.yml
+++ b/ansible/roles/configure/tasks/main.yml
@@ -6,12 +6,14 @@
- name: Install snapd, git and curl
# curl and git is needed for helm plugin install
- package:
+ apt:
state: present
name:
- snapd
- curl
- git
+ cache_valid_time: 1209600
+ update_cache: yes
However, I'd like to use pre_task
that does the same once, so we can still keep using the more generic package
resource.