Last active
August 29, 2015 14:11
-
-
Save Ancillas/61e1ad67eba65a7529d2 to your computer and use it in GitHub Desktop.
Puppet conditional testing
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
class test1 { | |
$color = 'dirt' | |
if ($color != 'dirt') or ($color != 'blue') { | |
notify {"test1: conditional true": } | |
} else { | |
notify {"test1: conditional false": } | |
} | |
} | |
class test2 { | |
$color = 'blue' | |
if ($color != 'dirt') or ($color != 'blue') { | |
notify {"test2: conditional true": } | |
} else { | |
notify {"test2: condit:onal false": } | |
} | |
} | |
class test3 { | |
$color = 'red' | |
if ($color != 'dirt') or ($color != 'blue') { | |
notify {"test3: conditional true": } | |
} else { | |
notify {"test3: conditional false": } | |
} | |
} | |
notify {"puppet version = ${::puppetversion}":} -> | |
class {'test1': } -> | |
class {'test2': } -> | |
class {'test3': } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment