I need to run a the generate() function (server side) in order to populate
a data file for one of my modules. Is there a way to ensure that the
generate function is
run before a config file is created (the contents of the file doesn't come
directly from generate()).
Right now I'm getting around this by creating a bogus File resource and
chaining that before I write a config file.
===============================
file { "mp_volumes.yaml":
ensure => 'present',
path => '/tmp/cmpllnt_vol.out',
content => generate('/usr/bin/myscript'),
owner => 'root',
group => 'root',
mode => '0644',
}
# Make sure mp_volumes.yaml is up to date before we create conf file
File['mp_volumes.yaml']->File['conffile']
===============================
Is there a more appropriate way of doing this?
Thanks,
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/5OeG7J97VsQJ.
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.