From 998b147e0825864ed44c0d1da3e63a1186b5947d Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 23 Nov 2020 02:54:46 -0500 Subject: [PATCH] Explain var(s) set to "" when file(s) don't exist. So ' || true' is not nec. --- roles/openvpn/templates/announcer.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/openvpn/templates/announcer.j2 b/roles/openvpn/templates/announcer.j2 index a18136fb6..40eee858e 100755 --- a/roles/openvpn/templates/announcer.j2 +++ b/roles/openvpn/templates/announcer.j2 @@ -6,7 +6,7 @@ #if [ -f /etc/iiab/openvpn_handle ]; then # Option #1: Source directly from /etc/iiab/local_vars.yml in future? # Option #2 - HANDLE=$(cat /etc/iiab/openvpn_handle) # Set to "" if file doesn't exist + HANDLE=$(cat /etc/iiab/openvpn_handle) # Sets to "" if file doesn't exist (error is ok!) # Sourcing a variable from ~4 different places is a recipe for total confusion # (or worse!) Far better to make variable openvpn_handle and file @@ -28,7 +28,7 @@ #fi HANDLE=${HANDLE// /_} #if [ -f /etc/iiab/uuid ]; then - UUID=$(cat /etc/iiab/uuid) # Set to "" if file doesn't exist + UUID=$(cat /etc/iiab/uuid) # Sets to "" if file doesn't exist (error is ok!) #fi SERVER=/usr/bin/ncat