Reputation: 105
I am writing a shell script to download a version.txt
file from a AWS S3 bucket.
In the shell script, I need to use a Puppet Facter value (e.g. env_name
and product_name
). How can I fetch those Facter values inside of my shell script?
Upvotes: 2
Views: 1737
Reputation: 3205
Run facter env_name
to retrieve the value:
env_name=$(facter env_name)
echo $env_name
If it's a fact that comes from a Puppet module (via pluginsync), add the -p
argument:
env_name=$(facter -p env_name)
Upvotes: 3