roles/common: Update cache in firewall playbook

cron-apt updates the system against the security-only databases at
night so many packages are "missing" unless you run apt update. We
need to update the cache on all apt tasks actually because I might
be running them by their tag and they currently only get updated at
the beginning of the playbook.
This commit is contained in:
Alan Orth 2021-07-28 14:46:58 +03:00
parent b66c724109
commit af6c3dd12a
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@
- python3-systemd
- name: Install firewall packages
apt: pkg={{ debian_firewall_packages }} state=present
apt: pkg={{ debian_firewall_packages }} state=present cache_valid_time=3600
- name: Start and enable nftables
when: ansible_distribution_major_version is version('11', '>=')

View File

@ -26,7 +26,7 @@
- python3-systemd
- name: Install firewall packages
apt: pkg={{ ubuntu_firewall_packages }} state=present
apt: pkg={{ ubuntu_firewall_packages }} state=present cache_valid_time=3600
- name: Remove ufw
when: ansible_distribution_version is version('16.04', '>=')