Skip to content

Commit

Permalink
update firewall_ports_dynamic_var, firewall_rules_dynamic_var
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks committed Nov 11, 2022
1 parent a5905e0 commit a6c7d40
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions add_balancer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@

- name: Build a firewall_ports_dynamic_var
set_fact:
firewall_ports_dynamic_var: "{{ firewall_ports_dynamic_var |default([]) }} + {{ firewall_allowed_tcp_ports_for[item] }}"
firewall_ports_dynamic_var: "{{ firewall_ports_dynamic_var | default([]) + (firewall_allowed_tcp_ports_for[item]) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
tags: firewall

- name: Build a firewall_rules_dynamic_var
set_fact:
firewall_rules_dynamic_var: "{{ firewall_rules_dynamic_var |default([]) }} + {{ firewall_additional_rules_for[item] }}"
firewall_rules_dynamic_var: "{{ firewall_rules_dynamic_var | default([]) + (firewall_additional_rules_for[item]) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
tags: firewall
Expand All @@ -70,8 +70,8 @@
- role: ansible-role-firewall
environment: "{{ proxy_env | default({}) }}"
vars:
firewall_allowed_tcp_ports: "{{ firewall_ports_dynamic_var|list | unique }}"
firewall_additional_rules: "{{ firewall_rules_dynamic_var|list | unique }}"
firewall_allowed_tcp_ports: "{{ firewall_ports_dynamic_var | unique }}"
firewall_additional_rules: "{{ firewall_rules_dynamic_var | unique }}"
when: firewall_enabled_at_boot|bool
tags: firewall

Expand Down
8 changes: 4 additions & 4 deletions add_pgnode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@

- name: Build a firewall_ports_dynamic_var
set_fact:
firewall_ports_dynamic_var: "{{ firewall_ports_dynamic_var |default([]) }} + {{ firewall_allowed_tcp_ports_for[item] }}"
firewall_ports_dynamic_var: "{{ firewall_ports_dynamic_var | default([]) + (firewall_allowed_tcp_ports_for[item]) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
tags: firewall

- name: Build a firewall_rules_dynamic_var
set_fact:
firewall_rules_dynamic_var: "{{ firewall_rules_dynamic_var |default([]) }} + {{ firewall_additional_rules_for[item] }}"
firewall_rules_dynamic_var: "{{ firewall_rules_dynamic_var | default([]) + (firewall_additional_rules_for[item]) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
tags: firewall
Expand All @@ -68,8 +68,8 @@
- role: ansible-role-firewall
environment: "{{ proxy_env | default({}) }}"
vars:
firewall_allowed_tcp_ports: "{{ firewall_ports_dynamic_var|list | unique }}"
firewall_additional_rules: "{{ firewall_rules_dynamic_var|list | unique }}"
firewall_allowed_tcp_ports: "{{ firewall_ports_dynamic_var | unique }}"
firewall_additional_rules: "{{ firewall_rules_dynamic_var | unique }}"
when: firewall_enabled_at_boot|bool
tags: firewall

Expand Down
8 changes: 4 additions & 4 deletions balancers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@

- name: Build a firewall_ports_dynamic_var
set_fact:
firewall_ports_dynamic_var: "{{ firewall_ports_dynamic_var |default([]) }} + {{ firewall_allowed_tcp_ports_for[item] }}"
firewall_ports_dynamic_var: "{{ firewall_ports_dynamic_var | default([]) + (firewall_allowed_tcp_ports_for[item]) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
tags: firewall

- name: Build a firewall_rules_dynamic_var
set_fact:
firewall_rules_dynamic_var: "{{ firewall_rules_dynamic_var |default([]) }} + {{ firewall_additional_rules_for[item] }}"
firewall_rules_dynamic_var: "{{ firewall_rules_dynamic_var | default([]) + (firewall_additional_rules_for[item]) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
tags: firewall
Expand All @@ -69,8 +69,8 @@
- role: ansible-role-firewall
environment: "{{ proxy_env | default({}) }}"
vars:
firewall_allowed_tcp_ports: "{{ firewall_ports_dynamic_var|list | unique }}"
firewall_additional_rules: "{{ firewall_rules_dynamic_var|list | unique }}"
firewall_allowed_tcp_ports: "{{ firewall_ports_dynamic_var | unique }}"
firewall_additional_rules: "{{ firewall_rules_dynamic_var | unique }}"
when: firewall_enabled_at_boot|bool
tags: firewall

Expand Down
8 changes: 4 additions & 4 deletions deploy_pgcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@

- name: Build a firewall_ports_dynamic_var
set_fact:
firewall_ports_dynamic_var: "{{ firewall_ports_dynamic_var |default([]) }} + {{ firewall_allowed_tcp_ports_for[item] }}"
firewall_ports_dynamic_var: "{{ firewall_ports_dynamic_var | default([]) + (firewall_allowed_tcp_ports_for[item]) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
tags: firewall

- name: Build a firewall_rules_dynamic_var
set_fact:
firewall_rules_dynamic_var: "{{ firewall_rules_dynamic_var |default([]) }} + {{ firewall_additional_rules_for[item] }}"
firewall_rules_dynamic_var: "{{ firewall_rules_dynamic_var | default([]) + (firewall_additional_rules_for[item]) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
tags: firewall
Expand All @@ -91,8 +91,8 @@
- role: ansible-role-firewall
environment: "{{ proxy_env | default({}) }}"
vars:
firewall_allowed_tcp_ports: "{{ firewall_ports_dynamic_var|list | unique }}"
firewall_additional_rules: "{{ firewall_rules_dynamic_var|list | unique }}"
firewall_allowed_tcp_ports: "{{ firewall_ports_dynamic_var | unique }}"
firewall_additional_rules: "{{ firewall_rules_dynamic_var | unique }}"
when: firewall_enabled_at_boot|bool
tags: firewall

Expand Down
8 changes: 4 additions & 4 deletions etcd_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@

- name: Build a firewall_ports_dynamic_var
set_fact:
firewall_ports_dynamic_var: "{{ firewall_ports_dynamic_var |default([]) }} + {{ firewall_allowed_tcp_ports_for[item] }}"
firewall_ports_dynamic_var: "{{ firewall_ports_dynamic_var | default([]) + (firewall_allowed_tcp_ports_for[item]) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
tags: firewall

- name: Build a firewall_rules_dynamic_var
set_fact:
firewall_rules_dynamic_var: "{{ firewall_rules_dynamic_var |default([]) }} + {{ firewall_additional_rules_for[item] }}"
firewall_rules_dynamic_var: "{{ firewall_rules_dynamic_var | default([]) + (firewall_additional_rules_for[item]) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
tags: firewall
Expand All @@ -57,8 +57,8 @@
- role: ansible-role-firewall
environment: "{{ proxy_env | default({}) }}"
vars:
firewall_allowed_tcp_ports: "{{ firewall_ports_dynamic_var|list | unique }}"
firewall_additional_rules: "{{ firewall_rules_dynamic_var|list | unique }}"
firewall_allowed_tcp_ports: "{{ firewall_ports_dynamic_var | unique }}"
firewall_additional_rules: "{{ firewall_rules_dynamic_var | unique }}"
when: firewall_enabled_at_boot|bool
tags: firewall

Expand Down

0 comments on commit a6c7d40

Please sign in to comment.