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 {
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