Check for firewalld
This commit is contained in:
parent
3140a4fc0c
commit
a97db40e73
1 changed files with 5 additions and 0 deletions
|
@ -32,6 +32,10 @@
|
||||||
name: sshd.service
|
name: sshd.service
|
||||||
state: restarted
|
state: restarted
|
||||||
when: changed_ssh_config.changed == true
|
when: changed_ssh_config.changed == true
|
||||||
|
- name: Check for firewalld
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: /usr/sbin/firewalld
|
||||||
|
register: firewalld
|
||||||
- name: Allow SSH through firewall
|
- name: Allow SSH through firewall
|
||||||
become: true
|
become: true
|
||||||
ansible.posix.firewalld:
|
ansible.posix.firewalld:
|
||||||
|
@ -39,3 +43,4 @@
|
||||||
permanent: yes
|
permanent: yes
|
||||||
state: enabled
|
state: enabled
|
||||||
immediate: yes
|
immediate: yes
|
||||||
|
when: firewalld.stat.exists
|
||||||
|
|
Loading…
Reference in a new issue