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:
parent
b66c724109
commit
af6c3dd12a
@ -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', '>=')
|
||||
|
@ -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', '>=')
|
||||
|
Loading…
Reference in New Issue
Block a user