Hi,
you need this only on puppetmaster and it would be run with a specified
class.
--
Dominik Zyla
If you put your custom fact in a module and enable plugin sync it should be deployed and run before your manifest IIRC.
You can use pluginsync to load your custom script to the target system
similar to custom facts types/providers. Just place your custom script
in a modules lib directory and it will sync to the agent's plugindest
folder. The only issue at the moment is puppet will try and fail to
load non-ruby files.
notice: /File[/var/opt/lib/pe-puppet/lib/custom/sample.sh]/ensure:
defined content as '{md5}e2e5b99530dc61705e58b8fae70799ac'
info: Loading downloaded plugin /var/opt/lib/pe-puppet/lib/custom/sample.sh
err: Could not load downloaded file
/var/opt/lib/pe-puppet/lib/custom/sample.sh: undefined method `echo'
for main:Object
We have an open ticket http://projects.puppetlabs.com/issues/4135 to
resolve this issue.
Thanks,
Nan
> I need it to run at a specified point during the manifest though. The value of the fact depends on a package being installed. And my config files depend on the value of the fact.
----
Rather than just conceptualize it - assume it works as you want and implement the custom fact (and pluginsync on the clients) and see what happens. If it is still a problem, provide us with the specific problem and someone will be able to give you a specific solution.
Perhaps the hardest thing to grasp about puppet is how to programmatically define subscribe/require/notify so that things happen in a sequence because it is a declarative language.
What I have found that works for me is to have a 'default' node setting that does only configure puppet (puppet.conf & install a sysv script for puppet because I am installing from gems) and force in a specific /etc/apt/sources.list file, add an apt 'key' for an extra debian source, then do an apt-get update/upgrade and stop. At that point, I can define anything else I want for subsequent puppet agent runs and know that the custom 'facts' have been derived and can succeed.
Craig
On Jul 29, 2011 9:25 AM, "Oliver Beattie" <oli...@obeattie.com> wrote:
>
> I need it to run at a specified point during the manifest though. The value of the fact depends on a package being installed. And my config files depend on the value of the fact
Will stages (pre, main, etc) help in this case?