35 lines
628 B
YAML
35 lines
628 B
YAML
---
|
|
########################
|
|
#### FIREWALL TASKS ####
|
|
########################
|
|
|
|
## kubernetes requirements
|
|
- name: install firewalld
|
|
package:
|
|
name: firewalld
|
|
|
|
- name: enable and start firewalld
|
|
systemd:
|
|
name: firewalld
|
|
enabled: yes
|
|
state: started
|
|
|
|
- name: open ports
|
|
firewalld:
|
|
port: "{{ item }}"
|
|
permanent: yes
|
|
state: enabled
|
|
with_items:
|
|
- 6443/tcp
|
|
- 2379/tcp
|
|
- 2380/tcp
|
|
- 10250/tcp
|
|
- 10251/tcp
|
|
- 10252/tcp
|
|
- 10255/tcp
|
|
|
|
## reload firewalld after setting rules
|
|
|
|
- name: reload firewalld
|
|
shell: firewall-cmd --reload
|