Skip to content

Instantly share code, notes, and snippets.

@jbouse
Created February 5, 2014 18:54
Show Gist options
  • Save jbouse/8830543 to your computer and use it in GitHub Desktop.
Save jbouse/8830543 to your computer and use it in GitHub Desktop.
interpolation example
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
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
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