I think I have run into some sort of facter caching issue in the puppet
agent that I am hoping someone can explain.
When I launch a new server I run the following command to get things
started.
puppet agent --test --onetime --no-daemonize --waitforcert 5
The puppetmaster then downloads to the server as one would expect. Included
in this download are some new custom facts (one is called
cassandra_home_dir) that I have written. It correctly puts them in
/var/lib/puppet/lib/facter.
After the puppet agent has downloaded the custom facts it continues
processing. In one of my .pp files there is a resource declaration as
follows:
file {"cassandraEnv":
owner => 'cassandra',
group => 'cassandra',
mode => '744',
ensure => present,
path => "*${cassandra_home_dir}*/conf/cassandra-env.sh",
content => template('db/cassandra-env.sh.template.erb'),
require => Exec['installCassandra'],
}
But it is failing on this resource because ${cassandra_home_dir} is empty
and therefore it is trying to put the file in the /conf directory which
doesn't exist. The Exec['installCassandra'] executed correctly immediately
prior to the attempt to create the file['cassandraEnv'] resource. So I know
the appropriate information is available from the file system.
If I run the puppet agent command again everything works fine because the
${cassandra_home_dir} variable is no longer empty. So I have done nothing
different other than rerun the puppet agent.
*Does puppet agent cache facter facts at startup that is preventing it from
loading my newly downloaded fact?*
--
John Pyeatt
Singlewire Software, LLC
www.singlewire.com
------------------
608.661.1184
[email protected]
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/CAEisTL%3D-%3DLyqHUOwNrumVr2b9jr7BrCBpapgfvT2te5PgTVu2w%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.