ansible-keycloak/roles/keycloak/tasks/firewalld.yml

29 lines
662 B
YAML
Raw Normal View History

---
- name: Ensures required package firewalld are installed
ansible.builtin.include_tasks: fastpackages/install.yml
vars:
packages_list:
- firewalld
- name: Enable and start the firewalld service
become: yes
systemd:
name: firewalld
enabled: yes
state: started
2022-01-19 16:21:05 +00:00
- name: Configure firewall for keycloak ports
become: yes
firewalld:
port: "{{ item }}"
permanent: true
state: enabled
immediate: yes
loop:
- "{{ keycloak_http_port }}/tcp"
- "{{ keycloak_https_port }}/tcp"
- "{{ keycloak_management_http_port }}/tcp"
- "{{ keycloak_management_https_port }}/tcp"
2022-01-19 16:21:05 +00:00
- "7600/tcp"
- "8009/tcp"