[Puppet Users] Scoping issue?

2013-09-21 Thread mark bradley
Hi, Yet another newbie question .. I'd appreciate any good references, too! I'm creating a class for managing users, and defining my_user as a convenience function that I've seen in many patterns. I'd like it to manage passwords if one is supplied to the function. class users::virtual {

Re: [Puppet Users] Scoping issue?

2013-09-21 Thread Frederiko Costa
Hi, I believe it could be this way: define ssh_user($passwd, $key) { user { $name: ensure = present, managehome = true, password = $passwd ? { /\w+/ = $passwd, default = undef, } } I think you should also double check the class with a define