Created
February 5, 2014 18:54
-
-
Save jbouse/8830543 to your computer and use it in GitHub Desktop.
interpolation example
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
jbouse@jbouse:~$ puppet apply test.pp --verbose | |
Notice: Scope(Set_password[passwd1]): passwd1 .x/5FQ/ | |
Notice: Scope(Set_password[passwd2]): passwd2 $1$RCxCmL.x$MRHrLKqYpha19ERGC/5FQ/ | |
Notice: Compiled catalog for jbouse.example.com in environment production in 0.06 seconds | |
Info: Applying configuration version '1391626332' | |
Notice: Finished catalog run in 0.40 seconds |
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
jbouse@jbouse:~$ puppet-lint test.pp | |
ERROR: set_password not in autoload module layout on line 1 | |
WARNING: defined type not documented on line 1 | |
WARNING: variable not enclosed in {} on line 7 | |
WARNING: variable not enclosed in {} on line 7 | |
WARNING: variable not enclosed in {} on line 7 |
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
define set_password ($password = undef) { | |
if $password { | |
notice("${name} ${password}") | |
} | |
} | |
set_password { 'passwd1': password => "$1$RCxCmL.x$MRHrLKqYpha19ERGC/5FQ/" } | |
set_password { 'passwd2': password => '$1$RCxCmL.x$MRHrLKqYpha19ERGC/5FQ/' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment