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:
|
else:
|
||||||
files[home + '/.ssh/authorized_keys'] = {'delete': True}
|
files[home + '/.ssh/authorized_keys'] = {'delete': True}
|
||||||
|
|
||||||
if exists(join(repo.path, 'data', 'users', 'files', 'tmux', '{}.conf'.format(username))):
|
if attrs.get('deploy_configs', True):
|
||||||
files[home + '/.tmux.conf'] = {
|
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',
|
'content_type': 'mako',
|
||||||
'source': 'tmux/{}.conf'.format(username),
|
'source': fish_src
|
||||||
}
|
|
||||||
else:
|
|
||||||
files[home + '/.tmux.conf'] = {
|
|
||||||
'delete': True,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if exists(join(repo.path, 'data', 'users', 'files', 'bash', '{}.bashrc'.format(username))):
|
||||||
if exists(join(repo.path, 'data', 'users', 'files', 'fish', '{}.conf'.format(username))):
|
files[home + '/.bashrc'] = {
|
||||||
fish_src = 'fisk/{}.conf'.format(username)
|
'content_type': 'mako',
|
||||||
else:
|
'source': 'bash/{}.bashrc'.format(username),
|
||||||
fish_src = 'fish.conf'
|
}
|
||||||
|
else:
|
||||||
files[home + '/.config/fish/config.fish'] = {
|
files[home + '/.bashrc'] = {
|
||||||
'content_type': 'mako',
|
'delete': True,
|
||||||
'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,
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue