summaryrefslogtreecommitdiffstats
path: root/modules/mail
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-02-28 23:45:36 -0500
committerJesse Luehrs <doy@tozt.net>2019-02-28 23:45:36 -0500
commit7bbe3c7a1546842757de2fb31ee594864d4426b3 (patch)
tree6282367738f558e264207ba8299d549093179576 /modules/mail
parent609d3ab1ced1ae3458dd52f6c3c949f7130f9e54 (diff)
downloadpuppet-tozt-7bbe3c7a1546842757de2fb31ee594864d4426b3.tar.gz
puppet-tozt-7bbe3c7a1546842757de2fb31ee594864d4426b3.zip
let's make it not an error at all
Diffstat (limited to 'modules/mail')
-rwxr-xr-xmodules/mail/facts.d/bind_address6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/mail/facts.d/bind_address b/modules/mail/facts.d/bind_address
index 7762076..8212848 100755
--- a/modules/mail/facts.d/bind_address
+++ b/modules/mail/facts.d/bind_address
@@ -2,5 +2,7 @@
set -eu
set -o pipefail
-printf "bind_address="
-curl --connect-timeout 1 -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address
+address="$(curl --connect-timeout 1 -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address || true)"
+if [ -n "$address" ]; then
+ printf "bind_address=%s", "$address"
+fi