make ipset.service import even if ipset already exists and then reload in main.yml

This commit is contained in:
staticsafe 2020-04-15 10:23:45 -04:00
parent 05176fb83e
commit dd4d335302
2 changed files with 3 additions and 4 deletions

View File

@ -6,10 +6,9 @@ Before=netfilter-persistent.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/sbin/ipset -f /etc/ipset.conf restore
ExecReload=/sbin/ipset -f /etc/ipset.conf restore
ExecStart=/sbin/ipset -! -f /etc/ipset.conf restore
ExecReload=/sbin/ipset -! -f /etc/ipset.conf restore
ExecStop=/sbin/ipset flush
ExectStopPost=/sbin/ipset destroy
[Install]
WantedBy=multi-user.target

View File

@ -17,7 +17,7 @@
src: "{{ ansible_fqdn }}.ipset"
dest: /etc/ipset.conf
- name: Restart ipset
- name: Restart ipset service
systemd:
name: ipset
state: restarted