From 0a7020469c11ab235e2a09d103c3c5bc555d026c Mon Sep 17 00:00:00 2001 From: nusenu Date: Sun, 19 Feb 2017 00:39:27 +0000 Subject: [PATCH] add 'tor_' var prefix (#77) dupcount -> tor_dupkeycount currentsomaxconn -> tor_currentsomaxconn currentnmbc -> tor_currentnmbc currentlimits -> tor_openbsd_maxfiles --- tasks/configure.yml | 4 ++-- tasks/freebsd_prepare.yml | 8 ++++---- tasks/openbsd_prepare.yml | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index a0d95b6..71a3c81 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -34,12 +34,12 @@ shell: openssl sha256 -r {{ tor_offline_masterkey_dir }}/*/keys/secret_id_key {{ tor_offline_masterkey_dir }}/*/keys/ed25519_master_id_secret_key|cut -d' ' -f1|sort|uniq -d|wc -l delegate_to: 127.0.0.1 run_once: true - register: dupcount + register: tor_dupkeycount - name: Abort on duplicate relay keys fail: msg="Duplicate relay key detected! Aborting." run_once: true - when: dupcount.stdout|int(1) != 0 + when: tor_dupkeycount.stdout|int(1) != 0 - name: Detect if Ed25519 master keys are on the relay become: yes diff --git a/tasks/freebsd_prepare.yml b/tasks/freebsd_prepare.yml index d83487f..ce2e1ad 100644 --- a/tasks/freebsd_prepare.yml +++ b/tasks/freebsd_prepare.yml @@ -11,7 +11,7 @@ - name: Gather current kern.ipc.somaxconn setting (FreeBSD) shell: "sysctl kern.ipc.somaxconn|cut -d' ' -f2" become: no - register: currentsomaxconn + register: tor_currentsomaxconn - name: Ensure somaxconn setting is reasonable (FreeBSD) become: yes @@ -20,12 +20,12 @@ value: "{{ tor_freebsd_somaxconn }}" reload: no sysctl_set: yes - when: currentsomaxconn.stdout|int < {{ tor_freebsd_somaxconn }} + when: tor_currentsomaxconn.stdout|int < {{ tor_freebsd_somaxconn }} - name: Gather current kern.ipc.nmbclusters setting (FreeBSD) become: no shell: "sysctl kern.ipc.nmbclusters|cut -d' ' -f2" - register: currentnmbc + register: tor_currentnmbc - name: Ensure nmbclusters setting is reasonable (FreeBSD) become: yes @@ -34,4 +34,4 @@ value: "{{ tor_freebsd_nmbclusters }}" reload: no sysctl_set: yes - when: currentnmbc.stdout|int < {{ tor_freebsd_nmbclusters }} + when: tor_currentnmbc.stdout|int < {{ tor_freebsd_nmbclusters }} diff --git a/tasks/openbsd_prepare.yml b/tasks/openbsd_prepare.yml index 50800a2..8c86f99 100644 --- a/tasks/openbsd_prepare.yml +++ b/tasks/openbsd_prepare.yml @@ -3,12 +3,12 @@ - name: Gather current system-wide file descriptor limits (OpenBSD) shell: "sysctl kern.maxfiles|cut -d= -f2" become: no - register: currentlimits + register: tor_openbsd_maxfiles - name: Ensure system-wide runtime file descriptor limits are reasonable (OpenBSD) become: yes command: "sysctl kern.maxfiles=20000" - when: currentlimits.stdout|int < 20000 + when: tor_openbsd_maxfiles.stdout|int < 20000 - name: Ensure system-wide persistent file descriptor limits are reasonable (OpenBSD) become: yes @@ -17,7 +17,7 @@ regexp: ^kern.maxfiles line: "kern.maxfiles=20000" create: yes - when: currentlimits.stdout|int < 20000 + when: tor_openbsd_maxfiles.stdout|int < 20000 # We rise openfiles limits for every tor instance separately. # An instance is identified by its rc.d file name.