2018-02-13 02:42:21 +00:00
|
|
|
- name: Disable firewalld service (OS's other than debuntu)
|
|
|
|
service:
|
|
|
|
name: firewalld
|
|
|
|
enabled: no
|
2017-05-27 23:10:45 +00:00
|
|
|
when: not is_debuntu
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2018-10-31 01:38:52 +00:00
|
|
|
# Likely no longer nec as of 2019
|
|
|
|
- name: Use larger hammer -- systemctl disable firewalld -- 2 symbolic links involved (OS's other than debuntu)
|
|
|
|
shell: systemctl disable firewalld.service
|
2017-05-27 23:10:45 +00:00
|
|
|
when: not is_debuntu
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2018-02-13 02:42:21 +00:00
|
|
|
- name: Mask firewalld service (OS's other than debuntu)
|
2018-10-31 01:38:52 +00:00
|
|
|
shell: systemctl mask firewalld
|
2017-05-27 18:09:50 +00:00
|
|
|
ignore_errors: yes
|
2017-05-27 23:10:45 +00:00
|
|
|
when: not installing and not is_debuntu
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2018-02-13 02:42:21 +00:00
|
|
|
- name: Stop firewalld service (OS's other than debuntu)
|
|
|
|
service:
|
|
|
|
name: firewalld
|
|
|
|
state: stopped
|
2017-05-27 18:09:50 +00:00
|
|
|
ignore_errors: yes
|
2017-05-27 23:10:45 +00:00
|
|
|
when: not installing and not is_debuntu
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2018-10-31 01:38:52 +00:00
|
|
|
- name: Remove /etc/systemd/system/iptables.service
|
2018-02-13 02:42:21 +00:00
|
|
|
file:
|
|
|
|
path: /etc/systemd/system/iptables.service
|
|
|
|
state: absent
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2020-12-08 10:20:42 +00:00
|
|
|
- name: Install package networkd-dispatcher (OS's other than RaspOS)
|
|
|
|
package:
|
|
|
|
name: networkd-dispatcher
|
|
|
|
state: present
|
|
|
|
when: not is_raspbian
|
|
|
|
|
2018-10-31 01:38:52 +00:00
|
|
|
- name: Install package iptables-persistent (debuntu)
|
2018-02-13 02:42:21 +00:00
|
|
|
package:
|
|
|
|
name: iptables-persistent
|
|
|
|
state: present
|
2020-10-16 20:46:19 +00:00
|
|
|
when: is_debuntu
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2018-10-31 01:38:52 +00:00
|
|
|
- name: Install package iptables-services (OS's other than debuntu)
|
2018-02-13 02:42:21 +00:00
|
|
|
package:
|
|
|
|
name: iptables-services
|
|
|
|
state: present
|
2017-05-27 23:10:45 +00:00
|
|
|
when: not is_debuntu
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2018-10-31 01:38:52 +00:00
|
|
|
- name: Install /etc/sysconfig/iptables-config from template
|
2018-02-13 02:42:21 +00:00
|
|
|
template:
|
2018-10-31 01:38:52 +00:00
|
|
|
src: iptables-config
|
2018-10-31 01:50:07 +00:00
|
|
|
dest: /etc/sysconfig/iptables-config
|
2020-01-14 01:41:03 +00:00
|
|
|
# owner: root
|
|
|
|
# group: root
|
|
|
|
# mode: '0644'
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2018-10-31 01:38:52 +00:00
|
|
|
- name: Install /etc/network/if-pre-up.d/iptables from template (debuntu)
|
2018-02-13 02:42:21 +00:00
|
|
|
template:
|
|
|
|
src: iptables
|
2018-10-31 01:50:07 +00:00
|
|
|
dest: /etc/network/if-pre-up.d/iptables
|
2020-01-14 01:41:03 +00:00
|
|
|
mode: '0755'
|
2020-10-16 20:46:19 +00:00
|
|
|
when: is_debuntu
|