fixup groups

This commit is contained in:
Franzi 2020-02-29 12:38:27 +00:00
parent 883cad6a5f
commit a47bdcfb39
Signed by: kunsi
GPG key ID: 12E3D2136B818350
4 changed files with 14 additions and 22 deletions

View file

@ -8,6 +8,12 @@ pkg_apt = {
'tmux': {},
}
users['root'] = {
'home': '/root',
'shell': '/bin/bash',
'password': repo.vault.human_password_for('root on {}'.format(node.name)),
}
for username, attrs in node.metadata['users'].items():
home = attrs.get('home', '/home/{}'.format(username))
@ -22,6 +28,9 @@ for username, attrs in node.metadata['users'].items():
user['shell'] = attrs.get('shell', '/usr/bin/fish')
user['password'] = repo.vault.human_password_for('user {} on {}'.format(username, node.name))
if 'groups' in attrs:
user['groups'] = attrs['groups']
directories[home] = {
'owner': username,
'mode': '0700',