Last active
December 20, 2015 15:09
-
-
Save jpadams/6151870 to your computer and use it in GitHub Desktop.
Test of what's a string 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
$tests = [ | |
"hello", | |
undef, | |
44, | |
"{3 => 4}", | |
"world!" | |
] | |
string_test { $tests: } | |
define string_test ($test = $title) { | |
if is_string($test) { | |
notify{"yes, ${test} is a string.\n":} | |
} else { | |
notify {"no, ${test} is NOT a string.\n":} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment