From 5741e52056582907dd7e5733ce61e0a6bfb7adef Mon Sep 17 00:00:00 2001 From: nusenu Date: Sat, 18 Feb 2017 00:02:27 +0000 Subject: [PATCH] add 'tor_' var prefix (#77) ipv4_count -> tor_ipv4_count v6tmp -> tor_v6tmp --- defaults/main.yml | 6 +++--- tasks/ip-list.yml | 6 +++--- vars/private_IPv4_only.yml | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 83c7c23..301c08d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -53,15 +53,15 @@ tor_distribution_release: "{{ ansible_lsb.codename }}" # https://docs.ansible.com/ansible/playbooks_filters_ipaddr.html tor_v4tmp: "{{ ansible_all_ipv4_addresses | ipv4('address') | ipv4('public') }}" tor_v4ips: "{{ tor_v4tmp[0:tor_maxPublicIPs] }}" -ipv4_count: "{{ tor_v4ips | length|int }}" +tor_ipv4_count: "{{ tor_v4ips | length|int }}" # we can not use more IPv6 IPs than we have IPv4 IPs so we truncate (but fewer is ok) -v6tmp: "{{ ansible_all_ipv6_addresses|ipv6('public')|ipv6('address') }}" +tor_v6tmp: "{{ ansible_all_ipv6_addresses|ipv6('public')|ipv6('address') }}" # the following line is commented out and handled in ip-list.yml until # https://github.com/ansible/ansible/issues/14829 # gets fixed -#tor_v6ips: "{{ v6tmp[0:ipv4_count|int]|ipv6('address') }}" +#tor_v6ips: "{{ tor_v6tmp[0:tor_ipv4_count|int]|ipv6('address') }}" tor_RunAsDaemon: 1 diff --git a/tasks/ip-list.yml b/tasks/ip-list.yml index 1988f01..0b313c1 100644 --- a/tasks/ip-list.yml +++ b/tasks/ip-list.yml @@ -9,12 +9,12 @@ # we simply convert False to empty lists - name: workaround for ansible bug 14829 (1/3) set_fact: - v6tmp: [] - when: v6tmp == False + tor_v6tmp: [] + when: tor_v6tmp == False - name: workaround for ansible bug 14829 (2/3) set_fact: - tor_v6ips: "{{ v6tmp[0:ipv4_count|int]|ipv6('address') }}" + tor_v6ips: "{{ tor_v6tmp[0:tor_ipv4_count|int]|ipv6('address') }}" - name: workaround for ansible bug 14829 (3/3) set_fact: diff --git a/vars/private_IPv4_only.yml b/vars/private_IPv4_only.yml index 27ae327..77070bc 100644 --- a/vars/private_IPv4_only.yml +++ b/vars/private_IPv4_only.yml @@ -3,8 +3,8 @@ # filter potentially malicious input from relay-provided IPv4/v6 addresses # https://docs.ansible.com/ansible/playbooks_filters_ipaddr.html tor_v4ips: "{{ ansible_all_ipv4_addresses[0:tor_maxPrivateIPs] | ipv4('address') }}" -ipv4_count: "{{ tor_v4ips | length|int }}" +tor_ipv4_count: "{{ tor_v4ips | length|int }}" # we can not use more IPv6 IPs than we have IPv4 IPs so we truncate (but fewer is ok) -v6tmp: "{{ ansible_all_ipv6_addresses|ipv6('public') }}" +tor_v6tmp: "{{ ansible_all_ipv6_addresses|ipv6('public') }}"