Skip to content
Extraits de code Groupes Projets
save.yml 560 octets
Newer Older
Fanch's avatar
Fanch a validé
---

Fanch's avatar
Fanch a validé
- name: Save The Current ipv4 State
Fanch's avatar
Fanch a validé
  community.general.iptables_state:
Fanch's avatar
Fanch a validé
    ip_version: "ipv4"
Fanch's avatar
Fanch a validé
    state: saved
Fanch's avatar
Fanch a validé
    path: "/etc/iptables/iptables.rules"
  when:
    - '"ipv4" in iptables_ip_versions'
    - '"iptables" in iptables_services'
Fanch's avatar
Fanch a validé
  notify: Restart Iptables Services
Fanch's avatar
Fanch a validé

- name: Save The Current ipv6 State
  community.general.iptables_state:
    ip_version: "ipv6"
    state: saved
    path: "/etc/iptables/ip6tables.rules"
  when:
    - '"ipv6" in iptables_ip_versions'
    - '"ip6tables" in iptables_services'
Fanch's avatar
Fanch a validé
  notify: Restart Iptables Services