I am delivering the fact with pluginsync, but that will not have
occurred yet on bootstrap because puppet has yet to run for the first
time and deliver the fact. At least that is what I think is happening.
If I do a run that does not include the class referencing the fact
first, it will work fine on subsequent runs.

Here is the fact, in case it is relevant:

Facter.add("gw_init_script_exists") do
  setcode do
    FileTest.exist?("/etc/init.d/ublipgw.sh")
  end
end

On Nov 17, 8:48 pm, Nigel Kersten <ni...@puppetlabs.com> wrote:
> On Wed, Nov 17, 2010 at 1:05 PM, byron appelt <byron.app...@gmail.com> wrote:
> > I am using a fact inside of a template. The problem I am running into
> > is that the bootstrap run of puppet fails with the following error:
>
> > err: Could not retrieve catalog from remote server: Error 400 on
> > SERVER: Failed to parse template base_gateway/ublip_gw.monitrc.erb:
> > Could not find value for 'gw_init_script_exists' at /etc/puppet-dev/
> > manifests/classes/base_gateway/manifests/init.pp:35
>
> > because the facts do not exist yet. I have worked around this by
> > placing an if statement around the resource that renders the template
> > like so:
>
> >  if $gw_init_script_exists {
>
> >     file { "/etc/monit.d/ublip_gw.monitrc":
> >        content => template("base_gateway/ublip_gw.monitrc.erb"),
> >     }
>
> >  }
>
> > While this works it is not a very elegant solution. Is there a better
> > way of dealing with this situation?
>
> Why doesn't the fact exist yet?
>
> Are you delivering a fact via pluginsync, but that fact itself relies
> upon an executable script that you're delivering with Puppet ?
>
> Can you post the fact itself?
>
>
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Puppet Users" group.
> > To post to this group, send email to puppet-us...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > puppet-users+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/puppet-users?hl=en.
>
> --
> Nigel Kersten - Puppet Labs -  http://www.puppetlabs.com

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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