Skip to content

Instantly share code, notes, and snippets.

@binford2k
Last active March 18, 2016 17:28
Show Gist options
  • Save binford2k/f5860e71db548e5c9646 to your computer and use it in GitHub Desktop.
Save binford2k/f5860e71db548e5c9646 to your computer and use it in GitHub Desktop.
root@master:/etc/puppetlabs/facter/facts.d # cat foo.sh
#! /bin/sh
FACT=$(facter hostname)
echo "foo=${FACT}"
root@master:/etc/puppetlabs/facter/facts.d # chmod +x foo.sh
root@master:/etc/puppetlabs/facter/facts.d # facter ipaddress
<hangs and explodes>
## The workaround is to manually disable external facts so it doesn't exec itself
#! /bin/sh
FACT=$(facter hostname --no-external-facts)
echo "foo=${FACT}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment