Puppet package
Andrea Biancini
andrea.biancini at gmail.com
Thu Nov 8 08:11:30 UTC 2012
Hi all,
I'm writing to signal a very easy to fix potential problem to your puppet
package.
The package for the agent, as provided, does not permit to facts defined on
the master to be correctly deployed and used on the agent side.
To reproduce the error, for example, I could define in the master a site.pp
as follow:
node puppetclient {
include modulewithfact
file { '/tmp/puppettest':
ensure => present,
content => $test_fact,
}
}
And a module, under modules/modulewithfact, that has under the lib/facter a
file test_fact.rb as follows:
Facter.add(:test_fact) do
confine :kernel => "Linux"
setcode do
"Content from the fact"
end
end
Given this configuration the expected behavior should be that the fact is
deployed on every agent (of course if they enable pluginsync=true in the
puppet.conf) and then properly executed.
So the file /tmp/puppettest should contain the string "Content from the
fact".
This is not happening, with the default configuration, because the agent is
not instructed to include in the facterlib path all the facts synchronized
from the server.
To avoid this situation I simply added to the /etc/default/puppet file the
following line:
FACTERLIB=/var/lib/puppet/lib/facter
which permits to include in the facterlib the folder where facts from the
server are synchronized by the agent.
I am writing to propose you to add this line in the standard
/etc/defatult/puppet file in the puppet package from further versions.
I hope my example and explaination is clear enough.
Thanks and regards,
Andrea
--
Andrea Biancini
e-mail: andrea.biancini at gmail.com
web: andrea.biancini.googlepages.com
tel: +39 333 2930873
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-motu/attachments/20121108/e0b6e71b/attachment.html>
More information about the Ubuntu-motu
mailing list