diff --git a/roles/openvpn/templates/announcer.j2 b/roles/openvpn/templates/announcer.j2 index 8580112f9..8b4abaf96 100755 --- a/roles/openvpn/templates/announcer.j2 +++ b/roles/openvpn/templates/announcer.j2 @@ -4,17 +4,19 @@ HANDLE= UUID= if [ -f /etc/iiab/openvpn_handle ]; then - # Option #0: Might source directly from /etc/iiab/local_vars.yml in future + # Option #0: Source directly from /etc/iiab/local_vars.yml in future? # Option #1 HANDLE=`cat /etc/iiab/openvpn_handle` -else - # Option #2: Dangerous to invoke hypothetical variables :( - source /etc/iiab/iiab.env - # Option #3: CAUSED FAILURES IN AUGUST 2018, invoking stale variable from /etc/iiab/iiab.ini, but safer now that relegated to #3 ? - if [ -z "$HANDLE" ]; then - HANDLE=`cat /etc/iiab/iiab.ini | gawk \ - '{ if((toupper($1) == "HANDLE") && ($2 == "=")) { print $3;}}'` - fi + # Option #2: UUID is later used, if openvpn_handle is not set +# Sourcing a variable from ~4 different places is a recipe for total confusion (or worse!) +#else +# # Option #3: Dangerous to invoke hypothetical variables :( +# source /etc/iiab/iiab.env +# # Option #4: CAUSED FAILURES IN AUGUST 2018, invoking stale variable from /etc/iiab/iiab.ini, but safer now that relegated to #4 ? +# if [ -z "$HANDLE" ]; then +# HANDLE=`cat /etc/iiab/iiab.ini | gawk \ +# '{ if((toupper($1) == "HANDLE") && ($2 == "=")) { print $3;}}'` +# fi fi HANDLE=${HANDLE// /_} if [ -f /etc/iiab/uuid ]; then