Jim Pirzyk wrote:
> I'm trying to bootstrap puppet on an existing server I have. I rely
> quite a bit on custom facts in my setup. Is there a way that I can
> have the facts be required in a recipe, maybe like this:
>
> file { "/etc/foo.conf":
> ...
> content => template("foo.conf.erb"),
> require => [ Facter[mycustomfact], ... ]
> }
>
> The template foo.conf.erb needs the fact mycustomfact to create the
> file. Currently I'm getting the error:
>
> err: Could not retrieve catalog: Failed to parse template
> foo.conf.erb: Could nto find favlue for 'mycustomfact' at
> /etc/puppet/manifests/classes/foo.pp on node oldserver.foo.com
>
> - JimP
>
> --- @(#) $Id: dot.signature,v 1.15 2007/12/27 15:06:13 pirzyk Exp $
> __o [email protected] -------------------------------------------
> _'\<,_
> (*)/ (*) I'd rather be out biking.
>
Just wrap it up in an if statement.
if $customfact {
file { "/etc/foo.conf": content => template("foo.erb") }
}
Ben
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---