From c112650dc2a0d5c269b705003da15b5572ac8280 Mon Sep 17 00:00:00 2001 From: Zolfa Date: Sun, 13 Dec 2020 20:30:12 +0100 Subject: [PATCH] roles/port_forwarding: add prefix to var names --- roles/port_forwarding/tasks/main.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/roles/port_forwarding/tasks/main.yaml b/roles/port_forwarding/tasks/main.yaml index f7f424e..121714e 100644 --- a/roles/port_forwarding/tasks/main.yaml +++ b/roles/port_forwarding/tasks/main.yaml @@ -1,18 +1,18 @@ --- -- name: 'set port redirection rule for {{ rule_name }}' +- name: 'set port redirection rule for {{ pf_rule_name }}' uci: command: 'set' key: 'firewall.{{ item.0 }}' value: '{{ item.1 }}' loop: - - [ '{{ rule_name }}', 'redirect' ] - - [ '{{ rule_name }}.name', 'AnsibleManagedRedirect: {{ rule_name }}' ] - - [ '{{ rule_name }}.proto', '{{ proto }}' ] - - [ '{{ rule_name }}.src', 'wan' ] - - [ '{{ rule_name }}.dest', 'secure' ] - - [ '{{ rule_name }}.src_dport', '{{ port }}' ] - - [ '{{ rule_name }}.dest_ip','{{ hostvars | ip_from_inventory(inventory_hostname) }}' ] - - [ '{{ rule_name }}.dest_port', '{{ int_port | default(port) }}' ] + - [ '{{ pf_rule_name }}', 'redirect' ] + - [ '{{ pf_rule_name }}.name', 'AnsibleManagedRedirect: {{ pf_rule_name }}' ] + - [ '{{ pf_rule_name }}.proto', '{{ pf_proto }}' ] + - [ '{{ pf_rule_name }}.src', 'wan' ] + - [ '{{ pf_rule_name }}.dest', 'secure' ] + - [ '{{ pf_rule_name }}.src_dport', '{{ pf_port }}' ] + - [ '{{ pf_rule_name }}.dest_ip','{{ hostvars | ip_from_inventory(inventory_hostname) }}' ] + - [ '{{ pf_rule_name }}.dest_port', '{{ pf_int_port | default(pf_port) }}' ] delegate_to: '{{ firewall }}' notify: - 'uci commit firewall'