On Apr 25, 11:49 am, psychobyte <psychob...@gmail.com> wrote:
> Essentially, yeah.
>
> we have a data file that needs updating on the server.  This is done
> through a custom script. i want to use generate() to run that script server
> side
>  before we re-create the config files via puppet.  I want to guarantee that
> the generate function runs before any file resources.


That doesn't make sense to me.  Is the data file you are trying to
generate specific to the node you want to configure?

If not, then why do you need to (re)generate it every time a node
requests a catalog?

If so, then why can't you incorporate the data generation directly
into the process of generating the target config file?  Alternatively,
why is it preferable to generate the node-specific data file on the
server instead of on the node?

If you insist on continuing with this unwise approach, then you need
to understand that Puppet's resource relationships (and thus also run
stages) influence only the order in which resources are applied to the
node, not the order in which related operations are performed on the
master.  Your best bet is Luke's suggestion, which is basically to
invoke generate() in the same class and above your declaration of
File['conffile'].  But really, think again.


John

-- 
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