2020-04-15 01:42:03 +00:00
|
|
|
---
|
|
|
|
# This role deploys ipset rulesets to Ubuntu hosts
|
|
|
|
|
|
|
|
- name: Copy ipset.service
|
|
|
|
copy:
|
|
|
|
src: ipset.service
|
|
|
|
dest: /etc/systemd/system/ipset.service
|
|
|
|
notify:
|
|
|
|
- reload systemd
|
|
|
|
|
|
|
|
- name: Enable ipset.service
|
|
|
|
systemd:
|
|
|
|
name: ipset
|
|
|
|
enabled: yes
|
|
|
|
|
|
|
|
- name: Copy ipset rulesets
|
|
|
|
copy:
|
2020-04-15 01:44:46 +00:00
|
|
|
src: "{{ ansible_fqdn }}.ipset"
|
2020-04-15 01:42:03 +00:00
|
|
|
dest: /etc/ipset.conf
|
|
|
|
|
|
|
|
- name: Flush any existing ipsets
|
|
|
|
shell:
|
|
|
|
cmd: /sbin/ipset destroy
|
|
|
|
|
|
|
|
- name: Start ipset.service
|
|
|
|
systemd:
|
|
|
|
name: ipset
|
|
|
|
state: started
|