fixup groups
This commit is contained in:
parent
883cad6a5f
commit
a47bdcfb39
4 changed files with 14 additions and 22 deletions
|
@ -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',
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
@metadata_processor
|
||||
def root_user(metadata):
|
||||
return {
|
||||
'users': {
|
||||
'root': {
|
||||
'home': '/root',
|
||||
'ssh_pubkey': [],
|
||||
'shell': '/bin/bash',
|
||||
},
|
||||
},
|
||||
}, DEFAULTS, DONE
|
Loading…
Add table
Add a link
Reference in a new issue