Merge "disable firewall in bootstrap-server"
This commit is contained in:
commit
b177f04fcc
@ -4,6 +4,28 @@
|
||||
become: True
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: Set firewall default policy
|
||||
ufw: state=disabled policy=allow
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: Check if firewalld is installed
|
||||
command: rpm -q firewalld
|
||||
register: firewalld_check
|
||||
failed_when: firewalld_check.rc > 1
|
||||
when: ansible_os_family == 'RedHat'
|
||||
|
||||
- name: Disable firewalld
|
||||
become: True
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
enabled: false
|
||||
state: stopped
|
||||
with_items:
|
||||
- firewalld
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
- firewalld_check.rc == 0
|
||||
|
||||
- name: Install apt packages
|
||||
package: name={{item}} state=present
|
||||
become: True
|
||||
|
Loading…
Reference in New Issue
Block a user