ansible-playbooks/ubuntu/roles/ipset-deploy/tasks/main.yml

24 lines
425 B
YAML

---
# This role deploys ipset rulesets to Ubuntu hosts
- name: Copy ipset.service
copy:
src: ipset.service
dest: /etc/systemd/system/ipset.service
- name: Enable ipset.service
systemd:
name: ipset
enabled: yes
daemon_reload: yes
- name: Copy ipset rulesets
copy:
src: "{{ ansible_fqdn }}.ipset"
dest: /etc/ipset.conf
- name: Restart ipset
systemd:
name: ipset
state: restarted