1 |
--- |
--- |
2 |
|
|
|
# Iptables Setup |
|
|
|
|
|
- name: add iptables config |
|
|
template: |
|
|
src: iptables.j2 |
|
|
dest: "/etc/sysconfig/iptables" |
|
|
owner: "root" |
|
|
group: "root" |
|
|
mode: 0600 |
|
|
backup: yes |
|
|
notify: restart iptables |
|
|
# register: iptables_config |
|
|
|
|
|
#- name: restart iptables |
|
|
# service: name=iptables state=restarted enabled=yes |
|
|
# when: iptables_config.changed |
|
|
|
|
|
- name: add ip6tables config |
|
|
template: |
|
|
src: ip6tables.j2 |
|
|
dest: "/etc/sysconfig/ip6tables" |
|
|
owner: "root" |
|
|
group: "root" |
|
|
mode: 0600 |
|
|
backup: yes |
|
|
notify: restart ip6tables |
|
|
# register: ip6tables_config |
|
|
|
|
|
#- name: restart ip6tables |
|
|
# service: name=ip6tables state=restarted enabled=yes |
|
|
# when: ip6tables_config.changed |
|
|
|
|
|
#- name: restart networking |
|
|
# service: name=network state=restarted enabled=yes |
|
|
# when: iptables_config.changed or ip6tables_config.changed |
|
|
|
|
3 |
# Configure access to machine with authconfig |
# Configure access to machine with authconfig |
4 |
|
|
5 |
- name: add access.conf file |
- name: add access.conf file |