Instead of subscribe => Package, it's require => Package['toola'] or
similar.
If you want to make sure all three packages are installed before the file,
the best thing in this situation is to order the classes.
Either in a separate module altogether or somewhere that makes sense for
you (perhaps the base class of this module), declare the classes in the
order you need:
Class['install'] -> Class['configure']
This will make sure all resources in class install get applied before any
resources in class configure.
On Tuesday, November 27, 2012 9:07:53 AM UTC-7, ureal frank wrote:
>
> Hi there,
>
> I've defined a package array to install some software this way:
>
> class install {
> <…>
> package { ['toola','toolb','toolc']:
> ensure => installed,
> require => Class['setup'],
> notify => Class['configure']
> }
> <….>
> }
>
> then under configure class I have something that is dependent of toola to
> install,
>
> class configure {
> file { '/etc/toola':
> content => "test"
> }
> }
>
> Maybe I'm doing this notify/subscribe thing in the wrong way because
> sometimes Puppet tries the configure class first before install class. Even
> so…
>
> <question>
> Is there a way for me to force this dependency under file { '/etc/toola':
> subscribe => Package?
> If yes, how can I define such a dependency with class Package after I've
> defined an package array without a specific name?
>
> Cheers
> --
> Frank
>
>
--
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/-/q0HIOrYvr2cJ.
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.