camptocamp / puppet-accounts

11 stars 40 forks source link

shouldnt $user be used in $::accounts::users[$name] in accounts::account #47

Closed teleivo closed 4 years ago

teleivo commented 8 years ago

Hi there,

in

https://github.com/camptocamp/puppet-accounts/blob/master/manifests/account.pp#L44

you check if has_key($::accounts::users, $user) and use $user for computing $_home but later in the code where you create the hash that is passed to puppets user resource you use $name again instead of $user to extract the hash $::accounts::users[$name]

see https://github.com/camptocamp/puppet-accounts/blob/master/manifests/account.pp#L68

Am wondering if that is intentional? I can't see the rational behind it, maybe someone can help me understand this.

Since in the params $user = $name, wouldnt it make sense to use $user instead of $name since they are the same if not overwritten but makes it possible to overwrite it?

Thanks!!