terraform-k8s/roles/kubernetes-base/tasks/firewalld.yml

35 lines
628 B
YAML
Raw Normal View History

2019-01-25 17:54:52 +00:00
---
########################
#### FIREWALL TASKS ####
########################
2019-01-28 14:28:54 +00:00
## kubernetes requirements
2019-07-25 08:24:35 +00:00
- name: install firewalld
package:
name: firewalld
- name: enable and start firewalld
systemd:
name: firewalld
enabled: yes
state: started
2019-01-25 17:54:52 +00:00
2019-08-08 19:20:54 +00:00
- name: open ports
2019-01-28 14:28:54 +00:00
firewalld:
2019-08-08 19:20:54 +00:00
port: "{{ item }}"
2019-01-28 14:28:54 +00:00
permanent: yes
state: enabled
2019-08-08 19:20:54 +00:00
with_items:
- 6443/tcp
- 2379/tcp
- 2380/tcp
- 10250/tcp
- 10251/tcp
- 10252/tcp
- 10255/tcp
2019-01-25 17:54:52 +00:00
2019-01-28 14:28:54 +00:00
## reload firewalld after setting rules
2019-01-25 17:54:52 +00:00
2019-01-28 14:28:54 +00:00
- name: reload firewalld
shell: firewall-cmd --reload