bundles/users: move root user to metadata

This commit is contained in:
Franzi 2020-11-10 12:50:08 +01:00
parent 16e8c4fd00
commit c090a9c2c2
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 19 additions and 19 deletions

View file

@ -2,27 +2,20 @@ from os.path import join, exists
directories = {} directories = {}
users = {} users = {}
files = {}
groups = {} groups = {}
users['root'] = { files = {
'home': '/root', '/etc/bash.bashrc': {
'shell': '/bin/bash',
'password': repo.vault.human_password_for('root on {}'.format(node.name)),
}
files['/etc/bash.bashrc'] = {
'source': 'bashrc', 'source': 'bashrc',
'content_type': 'mako', 'content_type': 'mako',
} },
'/etc/tmux.conf': {
files['/etc/tmux.conf'] = {
'source': 'tmux.conf', 'source': 'tmux.conf',
'content_type': 'mako', 'content_type': 'mako',
} },
'/etc/vim/vimrc.local': {
files['/etc/vim/vimrc.local'] = {
'source': 'vimrc', 'source': 'vimrc',
},
} }
for username, attrs in node.metadata['users'].items(): for username, attrs in node.metadata['users'].items():

View file

@ -5,4 +5,11 @@ defaults = {
'vim': {}, 'vim': {},
}, },
}, },
'users': {
'root': {
'home': '/root',
'shell': '/bin/bash',
'password': repo.vault.human_password_for('root on {}'.format(node.name)),
},
},
} }