states for firewalld and hostname

This commit is contained in:
Jonas Forsberg
2021-09-22 16:33:46 +02:00
parent 04bf1ccbc4
commit 69d01048c1
4 changed files with 83 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
Configure firewalld for external interface:
firewalld.present:
- name: external
- masquerade: True
- prune_ports: True
- prune_services: True
- prune_interfaces: True
- interfaces:
- {{ pillar['network']['interface']['external'] }}
- services:
- ssh
Configure firewalld for internal networks:
firewalld.present:
- name: internal
- prune_ports: True
- prune_services: True
- prune_interfaces: True
- interfaces:
- {{ pillar['network']['interface']['internal'] }}
{% for vlan in pillar['network']['vlan'] -%}
- vlan.{{ vlan['id'] }}
{% endfor %}
- services:
- ssh
- dhcp
- tftp
- http
- https
- dns
- ntp