On Oct 3, 2008, at 1:41 PM, Bryan Kearney wrote:
>
> I am running puppet from the command line with no puppet master. My
> recipe brings up the required services, including network, during
> execution. I have noticed that at initial boot, if I attempt to
> refernce
> the ipaddress or fqdn fact in a template that it will error out. I
> believe this is because when the recipe is parsed, the tempalte is
> evaluated. Facter, at that point, has no ipaddress.
>
> Is there a way to delay the evaluation of a template until it is
> needed?
> For example, then I could do something like this:
>
> file {"/some/file":
> content => template("template_with_ipaddress_fact),
> require => Service["network"]
> }
>
> thereby using the dependencies to control when the content is applied.
Templates are evaluated during parsing, and services are only started
after parsing, so there''s no way to do this kind of sequence.
--
Humphrey''s Law of the Efficacy of Prayer:
In a dangerous world there will always be more people around whose
prayers for their own safety have been answered than those whose
prayers have not.
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.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-users@googlegroups.com
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---