diff --git a/roles/nhc/README.md b/roles/nhc/README.md index 4f7ecf61a3ac22a4e867e1ad549cd16a9f355102..37b6ea18e0ea78a96142b3efb6c2c2dfaea7d9cd 100644 --- a/roles/nhc/README.md +++ b/roles/nhc/README.md @@ -12,7 +12,9 @@ nhc_emails: nobody@nowhere.nowhere nhc_email_subject: "Node Health Check" In addition the NAT check needs two variables to be defined to be enabled (See example) +- ADD_NHC_NAT_CHECK has to be defined to (any) value +- NHC_NAT_CHK_EXTERNAL_IP_ADDRESS is the address to be pinged Example: roles: - - { role: nhc, EXTERNAL_IP_ADDRESS: "118.138.246.208", ADD_NHC_NAT_CHECK: 1 } + - { role: nhc, NHC_NAT_CHK_EXTERNAL_IP_ADDRESS: "118.138.246.208", ADD_NHC_NAT_CHECK: 1 } diff --git a/roles/nhc/templates/check_nat.nhc.j2 b/roles/nhc/templates/check_nat.nhc.j2 index 8f64e3aaf66584129533ff35619dc62532a9f55c..ab56e57e890ac1b64ea994f63cd372925f0e7f53 100644 --- a/roles/nhc/templates/check_nat.nhc.j2 +++ b/roles/nhc/templates/check_nat.nhc.j2 @@ -7,7 +7,7 @@ function check_nat() { #test NAT by pinging an external IP ADDRESS -PING_EXTERNAL="ping -c 2 {{ EXTERNAL_IP_ADDRESS }}" +PING_EXTERNAL="ping -c 2 {{ NHC_NAT_CHK_EXTERNAL_IP_ADDRESS }}" $PING_EXTERNAL RESULT=$?