Created
February 15, 2012 21:49
-
-
Save frimik/1839222 to your computer and use it in GitHub Desktop.
replacement define for the package type on yum systems
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define breakage ($ensure="present") { | |
| if $ensure == "absent" { | |
| exec { "yum_remove_${name}": | |
| command => "yum -y remove ${name}", | |
| user => "root", | |
| onlyif => "rpm -q ${name}", | |
| } | |
| } else { | |
| package { "$name": | |
| ensure => $ensure, | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment