From 95d9213746890a6ebed41c180789e3d2e2909448 Mon Sep 17 00:00:00 2001 From: Marcus Meurs Date: Fri, 7 Dec 2018 23:40:48 +0100 Subject: [PATCH] Adds network device to ansible_local.zerotier Also removes the conditional for skipping installation based on ansible_local.zerotier value. Skipping tasks like that should be up to the user, not the role. --- files/set_facts.sh | 3 ++- tasks/main.yml | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/set_facts.sh b/files/set_facts.sh index bc895d4..1586e30 100644 --- a/files/set_facts.sh +++ b/files/set_facts.sh @@ -16,6 +16,7 @@ function file_content { network=($REPLY) echo " \"${network[2]}\": {" echo " \"status\":\"${network[5]}\"" + echo " \"device\":\"${network[7]}\"" if [ "$counter" -eq "$network_count" ]; then echo " }" @@ -39,4 +40,4 @@ file_content > $FACT_FILE # TO-DO -# Consider something that hadles JSON better than Bash does +# Handle different states than "OK". Other statuses can mess up positions. diff --git a/tasks/main.yml b/tasks/main.yml index 25f1c62..95fb317 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,7 +3,6 @@ - import_tasks: install.yml when: - not skip_install|default(false)|bool - - ansible_local.zerotier is not defined - block: - name: Update ansible_local facts