2021-12-14 10:26:42 +00:00
|
|
|
---
|
|
|
|
- name: Ensures required package firewalld are installed
|
2022-03-11 14:57:10 +00:00
|
|
|
ansible.builtin.include_tasks: fastpackages.yml
|
2021-12-14 10:26:42 +00:00
|
|
|
vars:
|
|
|
|
packages_list:
|
|
|
|
- firewalld
|
|
|
|
|
|
|
|
- name: Enable and start the firewalld service
|
|
|
|
become: yes
|
2022-02-24 14:00:10 +00:00
|
|
|
ansible.builtin.systemd:
|
2021-12-14 10:26:42 +00:00
|
|
|
name: firewalld
|
|
|
|
enabled: yes
|
|
|
|
state: started
|
|
|
|
|
2022-01-19 16:21:05 +00:00
|
|
|
- name: Configure firewall for keycloak ports
|
2021-12-14 10:26:42 +00:00
|
|
|
become: yes
|
2021-12-15 11:33:42 +00:00
|
|
|
firewalld:
|
2021-12-14 10:26:42 +00:00
|
|
|
port: "{{ item }}"
|
|
|
|
permanent: true
|
|
|
|
state: enabled
|
|
|
|
immediate: yes
|
|
|
|
loop:
|
|
|
|
- "{{ keycloak_http_port }}/tcp"
|
|
|
|
- "{{ keycloak_https_port }}/tcp"
|
2021-12-15 11:33:42 +00:00
|
|
|
- "{{ keycloak_management_http_port }}/tcp"
|
|
|
|
- "{{ keycloak_management_https_port }}/tcp"
|
2022-01-27 13:21:18 +00:00
|
|
|
- "{{ keycloak_jgroups_port }}/tcp"
|
|
|
|
- "{{ keycloak_ajp_port }}/tcp"
|