bundles/users: add option to not automatically deploy configs
This commit is contained in:
parent
4da792f522
commit
1856f4749c
1 changed files with 27 additions and 27 deletions
|
@ -58,33 +58,33 @@ for username, attrs in node.metadata['users'].items():
|
|||
else:
|
||||
files[home + '/.ssh/authorized_keys'] = {'delete': True}
|
||||
|
||||
if exists(join(repo.path, 'data', 'users', 'files', 'tmux', '{}.conf'.format(username))):
|
||||
files[home + '/.tmux.conf'] = {
|
||||
if attrs.get('deploy_configs', True):
|
||||
if exists(join(repo.path, 'data', 'users', 'files', 'tmux', '{}.conf'.format(username))):
|
||||
files[home + '/.tmux.conf'] = {
|
||||
'content_type': 'mako',
|
||||
'source': 'tmux/{}.conf'.format(username),
|
||||
}
|
||||
else:
|
||||
files[home + '/.tmux.conf'] = {
|
||||
'delete': True,
|
||||
}
|
||||
|
||||
if exists(join(repo.path, 'data', 'users', 'files', 'fish', '{}.conf'.format(username))):
|
||||
fish_src = 'fisk/{}.conf'.format(username)
|
||||
else:
|
||||
fish_src = 'fish.conf'
|
||||
|
||||
files[home + '/.config/fish/config.fish'] = {
|
||||
'content_type': 'mako',
|
||||
'source': 'tmux/{}.conf'.format(username),
|
||||
}
|
||||
else:
|
||||
files[home + '/.tmux.conf'] = {
|
||||
'delete': True,
|
||||
'source': fish_src
|
||||
}
|
||||
|
||||
|
||||
if exists(join(repo.path, 'data', 'users', 'files', 'fish', '{}.conf'.format(username))):
|
||||
fish_src = 'fisk/{}.conf'.format(username)
|
||||
else:
|
||||
fish_src = 'fish.conf'
|
||||
|
||||
files[home + '/.config/fish/config.fish'] = {
|
||||
'content_type': 'mako',
|
||||
'source': fish_src
|
||||
}
|
||||
|
||||
if exists(join(repo.path, 'data', 'users', 'files', 'bash', '{}.bashrc'.format(username))):
|
||||
files[home + '/.bashrc'] = {
|
||||
'content_type': 'mako',
|
||||
'source': 'bash/{}.bashrc'.format(username),
|
||||
}
|
||||
else:
|
||||
files[home + '/.bashrc'] = {
|
||||
'delete': True,
|
||||
}
|
||||
if exists(join(repo.path, 'data', 'users', 'files', 'bash', '{}.bashrc'.format(username))):
|
||||
files[home + '/.bashrc'] = {
|
||||
'content_type': 'mako',
|
||||
'source': 'bash/{}.bashrc'.format(username),
|
||||
}
|
||||
else:
|
||||
files[home + '/.bashrc'] = {
|
||||
'delete': True,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue