feat: use ansible block
This commit is contained in:
parent
7d762d095d
commit
b5c819fb27
12 changed files with 399 additions and 424 deletions
|
|
@ -1,26 +1,29 @@
|
|||
---
|
||||
|
||||
# basic firewall rules
|
||||
- name: "firewall - allow incoming routed traffic"
|
||||
community.general.ufw:
|
||||
rule: "allow"
|
||||
route: "yes"
|
||||
src: "{{ item[0] }}"
|
||||
dest: "{{ item[1] }}"
|
||||
with_nested:
|
||||
- "{{ __rule['source_nets'] }}"
|
||||
- "{{ __rule['destination_nets'] }}"
|
||||
tags:
|
||||
- "firewall"
|
||||
- name: "basic firewall rules"
|
||||
block:
|
||||
|
||||
- name: "firewall - allow outgoing routed traffic"
|
||||
community.general.ufw:
|
||||
rule: "allow"
|
||||
route: "yes"
|
||||
src: "{{ item[1] }}"
|
||||
dest: "{{ item[0] }}"
|
||||
with_nested:
|
||||
- "{{ __rule['source_nets'] }}"
|
||||
- "{{ __rule['destination_nets'] }}"
|
||||
# basic firewall rules
|
||||
- name: "firewall - allow incoming routed traffic"
|
||||
community.general.ufw:
|
||||
rule: "allow"
|
||||
route: "yes"
|
||||
src: "{{ item[0] }}"
|
||||
dest: "{{ item[1] }}"
|
||||
with_nested:
|
||||
- "{{ __rule['source_nets'] }}"
|
||||
- "{{ __rule['destination_nets'] }}"
|
||||
|
||||
- name: "firewall - allow outgoing routed traffic"
|
||||
community.general.ufw:
|
||||
rule: "allow"
|
||||
route: "yes"
|
||||
src: "{{ item[1] }}"
|
||||
dest: "{{ item[0] }}"
|
||||
with_nested:
|
||||
- "{{ __rule['source_nets'] }}"
|
||||
- "{{ __rule['destination_nets'] }}"
|
||||
|
||||
tags:
|
||||
- "firewall"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue