-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from 0x0I/add_iptable_setup
add option to allow specified ingress ports via iptables
- Loading branch information
Showing
3 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
- name: Determine service ingress port list for iptables config | ||
ansible.builtin.set_fact: | ||
ingressList: "{{ ingressList + [item.value.ingressPort | string] }}" | ||
with_dict: "{{ ports }}" | ||
|
||
- name: Allow service ingress ports in iptables setup | ||
ansible.builtin.iptables: | ||
chain: INPUT | ||
protocol: tcp | ||
destination_ports: "{{ ingressList }}" | ||
jump: ACCEPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters