Hi all, We'd like to share a class, and do something like:
class common_defaults { [...] user { 'root': ensure => present, password => $root_password ? { 'serviceA' => 'passwdA', default => 'passwdB', }, [...] } $root_passwd only has value if someone has defined it. So, i.e: nodes.pp nodea { $root_passwd=serviceA include common_defaults } nodeb { include common_defaults } so, we'd like nodea to has passwdA and nodeb to have the default value passwdB. I've tried with default and '' empty var, but I does not works neither. When I run the client in nodeb, and add a notify of root_password, I see that nodeb's root_password has a value and it's serviceA!?!? I'm quite lost here, I've been reading variable scope section in puppet's doc, but it talks about class inheritance, not class including. I don't understand why the var has a value, I've not found any ref about value of not defined varibales. Could anyone give a hand on this? TIA, Arnau -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.