bundles/users: add option to not automatically deploy configs

This commit is contained in:
Franzi 2020-04-04 17:54:26 +02:00
parent 4da792f522
commit 1856f4749c
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -58,6 +58,7 @@ for username, attrs in node.metadata['users'].items():
else: else:
files[home + '/.ssh/authorized_keys'] = {'delete': True} files[home + '/.ssh/authorized_keys'] = {'delete': True}
if attrs.get('deploy_configs', True):
if exists(join(repo.path, 'data', 'users', 'files', 'tmux', '{}.conf'.format(username))): if exists(join(repo.path, 'data', 'users', 'files', 'tmux', '{}.conf'.format(username))):
files[home + '/.tmux.conf'] = { files[home + '/.tmux.conf'] = {
'content_type': 'mako', 'content_type': 'mako',
@ -68,7 +69,6 @@ for username, attrs in node.metadata['users'].items():
'delete': True, 'delete': True,
} }
if exists(join(repo.path, 'data', 'users', 'files', 'fish', '{}.conf'.format(username))): if exists(join(repo.path, 'data', 'users', 'files', 'fish', '{}.conf'.format(username))):
fish_src = 'fisk/{}.conf'.format(username) fish_src = 'fisk/{}.conf'.format(username)
else: else: