make ipset.service import even if ipset already exists and then reload in main.yml
This commit is contained in:
parent
05176fb83e
commit
dd4d335302
@ -6,10 +6,9 @@ Before=netfilter-persistent.service
|
|||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStart=/sbin/ipset -f /etc/ipset.conf restore
|
ExecStart=/sbin/ipset -! -f /etc/ipset.conf restore
|
||||||
ExecReload=/sbin/ipset -f /etc/ipset.conf restore
|
ExecReload=/sbin/ipset -! -f /etc/ipset.conf restore
|
||||||
ExecStop=/sbin/ipset flush
|
ExecStop=/sbin/ipset flush
|
||||||
ExectStopPost=/sbin/ipset destroy
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
src: "{{ ansible_fqdn }}.ipset"
|
src: "{{ ansible_fqdn }}.ipset"
|
||||||
dest: /etc/ipset.conf
|
dest: /etc/ipset.conf
|
||||||
|
|
||||||
- name: Restart ipset
|
- name: Restart ipset service
|
||||||
systemd:
|
systemd:
|
||||||
name: ipset
|
name: ipset
|
||||||
state: restarted
|
state: restarted
|
||||||
|
Loading…
Reference in New Issue
Block a user