On Wed, May 4, 2011 at 10:01 AM, Disconnect <dc.disconn...@gmail.com> wrote:
> Although good advice (pluginsync is win) that still doesn't solve the
> chicken/egg problem - puppet won't evaluate the new facts on the first run.

Pluginsync should occur before facter executes and facts get submitted
to the server, so it should not be necessary to run puppet twice. Any
more info about your puppet version and system setup?

> We work around it by checking the existence of the fact/value before using
> it. Not ideal but it works. (And on brand new hosts, we run puppetd -t
> --tags no_such_tag to get the sync done. We actually do it twice, so that
> the new values are pushed up to the puppetmaster before the 'real' run, but
> that probably isn't strictly necessary.)
>
> On Tue, May 3, 2011 at 11:04 PM, Nan Liu <n...@puppetlabs.com> wrote:
>>
>> On Tue, May 3, 2011 at 10:04 PM, Michael Dodwell
>> <michael.dodw...@gmail.com> wrote:
>> > Hi,
>> >
>> > I've created a number of custom facts that i've added to manifests. If
>> > i add the custom fact, have puppet push the custom fact file to the
>> > host, then after it's pushed it add it to the templates everything
>> > works fine. However if i try and use the module on a fresh host
>> > without the custom facter it fails. When it looks at the templates it
>> > isn't aware of the custom fact yet and errors out.
>> >
>> > How can i get it to pull down the facter plugin before it tries to
>> > read the template file?
>> >
>> > I have tried:
>> >
>> > file {
>> >    "/etc/somefile":
>> >      owner   => root,
>> >      group   => root,
>> >      mode    => 644,
>> >      require => File["/usr/lib/ruby/1.8/facter/custom_fact.rb"],
>> >      content => template("module/etc/somefile");
>> > }
>> >
>> > Any suggestions? I'd prefer not to have to add the custom facter to
>> > the kickstart/jumpstart enviroment.
>>
>> This is solved with pluginsync option. Puppet will download any custom
>> facts/providers, so you should not distribute them to the agent as
>> file resources.
>>
>> Thanks,
>>
>> Nan
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To post to this group, send email to puppet-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to