diff --git a/tasks/apt_cache.yml b/tasks/apt_cache.yml new file mode 100644 index 0000000..11e6d2c --- /dev/null +++ b/tasks/apt_cache.yml @@ -0,0 +1,5 @@ +--- +- name: Update apt cache + apt: + update_cache: true + register: noobient_apt_cache_updated diff --git a/tasks/deps.yml b/tasks/deps.yml index 730d42a..cf3385a 100644 --- a/tasks/deps.yml +++ b/tasks/deps.yml @@ -1,10 +1,4 @@ --- -# Fix dumb apt -- name: Update apt cache - apt: - update_cache: true - when: ansible_os_family == 'Debian' - # TODO On EL, cURL is installed by default. On top of that, on AlmaLinux 9, curl # is broken, and on Fedora, curl-minimal is broken. So just skip it altogether. # https://bugs.launchpad.net/tripleo/+bug/1953156 diff --git a/tasks/main2.yml b/tasks/main2.yml index 0e0c2f4..e58f816 100644 --- a/tasks/main2.yml +++ b/tasks/main2.yml @@ -1,4 +1,7 @@ --- +- include_tasks: apt_cache.yml + when: ansible_pkg_mgr == 'apt' and noobient_apt_cache_updated is not defined + - include_tasks: deps.yml when: installed_acme_deps is not defined