On May 7, 2013, at 12:38 PM, Bret Wortman <[email protected]> wrote:
> Here's a puzzler (though I'm sure the answer is obvious and I'm just not
> seeing it):
>
> I have a manifest where I'm listing about 40-50 packages that I want the
> system to remove, and a file that I want to create only after successful
> removal of all the packages.
>
> What's the best way to show this dependency so that the file is only created
> after all the packages are removed?
>
> Thanks!
>
>
> Bret
The simplest method is to use the 'before' metaparameter in each of the package
resources that must be synced before you want the file created. E.g.
package { [ "a", "b", "c" ]:
ensure => absent,
before => File["/some/file"],
}
file { "/some/file":
ensure => file,
content => "Where did all the packages go?",
}
--
Peter
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.