29 lines
506 B
YAML
29 lines
506 B
YAML
---
|
|
# This role deploys ipset rulesets to Ubuntu hosts
|
|
|
|
- name: Flush any existing ipsets
|
|
shell:
|
|
cmd: /sbin/ipset destroy
|
|
|
|
- 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:
|
|
src: "{{ ansible_fqdn }}.ipset"
|
|
dest: /etc/ipset.conf
|
|
|
|
- name: Restart ipset
|
|
systemd:
|
|
name: ipset
|
|
state: restarted
|