Skip to content

Commit

Permalink
Use FQCN name for connection.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdebock committed Aug 30, 2021
1 parent c46c769 commit 8744b23
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
proto: "{{ item.protocol | default(firewall_default_protocol) }}"
loop: "{{ firewall_services }}"
when:
- ansible_connection != "docker"
- ansible_connection not in [ "container", "docker", "community.docker.docker" ]
- firewall_services is defined
- firewall_service == "ufw"
loop_control:
Expand All @@ -41,7 +41,7 @@
delete: yes
loop: "{{ firewall_services }}"
when:
- ansible_connection != "docker"
- ansible_connection not in [ "container", "docker", "community.docker.docker" ]
- firewall_services is defined
- firewall_service == "ufw"
- item.state is defined
Expand All @@ -56,7 +56,7 @@
state: enabled
loop: "{{ firewall_services }}"
when:
- ansible_connection != "docker"
- ansible_connection not in [ "container", "docker", "community.docker.docker" ]
- firewall_services is defined
- firewall_service == "firewalld"
- item.name is number
Expand All @@ -72,7 +72,7 @@
state: disabled
loop: "{{ firewall_services }}"
when:
- ansible_connection != "docker"
- ansible_connection not in [ "container", "docker", "community.docker.docker" ]
- firewall_services is defined
- firewall_service == "firewalld"
- item.name is number
Expand All @@ -90,7 +90,7 @@
state: enabled
loop: "{{ firewall_services }}"
when:
- ansible_connection != "docker"
- ansible_connection not in [ "container", "docker", "community.docker.docker" ]
- firewall_services is defined
- firewall_service == "firewalld"
- item.name is not number
Expand All @@ -106,7 +106,7 @@
state: disabled
loop: "{{ firewall_services }}"
when:
- ansible_connection != "docker"
- ansible_connection not in [ "container", "docker", "community.docker.docker" ]
- firewall_services is defined
- firewall_service == "firewalld"
- item.name is not number
Expand All @@ -121,7 +121,7 @@
community.general.ufw:
state: enabled
when:
- ansible_connection != "docker"
- ansible_connection not in [ "container", "docker", "community.docker.docker" ]
- firewall_service == "ufw"

- name: configure iptables
Expand All @@ -131,7 +131,7 @@
validate: "iptables-restore --test %s"
mode: "0640"
when:
- ansible_connection != "docker"
- ansible_connection not in [ "container", "docker", "community.docker.docker" ]
- firewall_services is defined
- firewall_service == "iptables"
loop_control:
Expand All @@ -145,5 +145,5 @@
state: started
enabled: yes
when:
- ansible_connection != "docker"
- ansible_connection not in [ "container", "docker", "community.docker.docker" ]
- firewall_service is defined

0 comments on commit 8744b23

Please sign in to comment.