Ansible-Linux_Base/roles/base/tasks/redhat_firewall.yml

31 lines
593 B
YAML
Raw Normal View History

2021-09-01 17:31:49 -06:00
---
# file: roles/base/tasks/redhat_firewall.yml
2022-07-08 05:39:57 -06:00
- name: Install firewalld package
package:
name: firewalld
state: present
2021-09-01 17:31:49 -06:00
- name: Allow SSH access through the firewall
firewalld:
service: ssh
permanent: yes
state: enabled
notify: Reload Firewalld
- name: Allow web management access through the firewall
firewalld:
service: cockpit
permanent: yes
state: enabled
notify: Reload Firewalld
when: base_core_web_management == true
tags:
- web_management
- name: Enable firewall
service:
name: firewalld
state: started
2022-07-08 05:39:57 -06:00
enabled: yes