roles/common: Always restart nftables service

The "reload" capability only exists on Ubuntu, and it is exactly
the same as the "restart" functionality.
This commit is contained in:
Alan Orth 2021-08-01 14:23:00 +03:00
parent 98cc3a8c2e
commit b5ea575d8d
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 4 additions and 4 deletions

View File

@ -16,5 +16,5 @@
- name: reload systemd - name: reload systemd
systemd: daemon_reload=yes systemd: daemon_reload=yes
- name: reload nftables - name: restarted nftables
systemd: name=nftables state=reloaded systemd: name=nftables state=restarted

View File

@ -34,7 +34,7 @@
when: ansible_distribution_version is version('20.04', '>=') when: ansible_distribution_version is version('20.04', '>=')
template: src=nftables.conf.j2 dest=/etc/nftables.conf owner=root mode=0644 template: src=nftables.conf.j2 dest=/etc/nftables.conf owner=root mode=0644
notify: notify:
- reload nftables - restart nftables
- name: Create /etc/nftables extra config directory - name: Create /etc/nftables extra config directory
when: ansible_distribution_version is version('20.04', '>=') when: ansible_distribution_version is version('20.04', '>=')
@ -50,7 +50,7 @@
- abuseipdb-ipv4.nft - abuseipdb-ipv4.nft
- abuseipdb-ipv6.nft - abuseipdb-ipv6.nft
notify: notify:
- reload nftables - restart nftables
- name: Copy firewalld public zone file - name: Copy firewalld public zone file
when: ansible_distribution_version is version('18.04', '<=') when: ansible_distribution_version is version('18.04', '<=')