FAQ
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

--
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 puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Peter Bukowinski at May 7, 2013 at 5:47 pm

    On May 7, 2013, at 12:38 PM, Bret Wortman 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 puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMay 7, '13 at 4:51p
activeMay 7, '13 at 5:47p
posts2
users2
websitepuppetlabs.com

2 users in discussion

Peter Bukowinski: 1 post Bret Wortman: 1 post

People

Translate

site design / logo © 2022 Grokbase