Last active
December 31, 2015 13:19
-
-
Save gchaix/7992260 to your computer and use it in GitHub Desktop.
Conditional package naming in puppet
This file contains 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
$updatecommand = $osfamily ? { | |
'Debian' => 'apt-get update && apt-get upgrade', | |
'RedHat' => 'yum update', | |
'Suse' => 'zypper update', | |
} | |
exec { "update_packages": | |
command => $updatecommand, | |
path => "/usr/local/bin/:/bin/", | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment