I am new to puppet and trying to write a basic manifest to start learning the ins and out.
I am trying to insert a custom fact into my manifest, and write it into a file. The custom fact I created shows up in the list when I issue the facter
command, but it doesnt not show up when I apply the manifest. I am just trying to run this locally, I do not have a puppetmaster set up.
Can anyone help and shed some light on what I may be missing?
I create the fact like:
export FACTER_TEST=helloworld
My manifest looks like this:
file {'/tmp/test1':
ensure => present,
content => "testing - $test - $puppetversion - hello",
}
I apply the manifest like:
sudo puppet apply testmanifest.pp
The result is that the fact just shows up as blank in the newly created file.
The file looks like:
testing - - 3.7.2 - hello
My puppet.conf looks like:
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=/var/lib/puppet/lib/facter
prerun_command=/etc/puppet/etckeeper-commit-pre
postrun_command=/etc/puppet/etckeeper-commit-post
[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY