Closed ngoduykhanh closed 8 years ago
"usergroups" isn't actually groups on the server. It is "groups of users" to provision on the server. You'll need to specify which groups a user belongs to in the hash of accounts::users.
https://github.com/camptocamp/puppet-accounts/blob/master/manifests/account.pp
So in your case the example might look like...
accounts::users:
my-username:
uid: 1010
shell: /bin/bash
groups:
- 'sudo'
- 'anothergroup'
accounts::usergroups:
provision-this-group-of-users:
- my-username
Then
class profiles::users {
class { 'accounts':
users => hiera_hash('accounts::users', {}),
usergroups => hiera_hash('accounts::usergroups', {}),
}
accounts::account { '@provision-this-group-of-users': }
}
I found it confusing at first as well.
Yes, it makes me confused. Adding groups
in accounts::users:
helped. Thank you!.
Hi,
I am using this module for my Ubuntu Server 14.04, I've defined the heiradata below
The user
my-username
is created as expected but it doesn't belong tosudo
group. Do you have any idea how to add a user into group?For my reason, I am using
accounts::account { '@sudo': }
to create accounts which belong to a group. My current class: