From 8063833950c86527eafd5697bd0fb997f16f3074 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Wed, 1 Jun 2022 11:33:59 +0200 Subject: [PATCH] fix overwrite dicts --- bundles/zsh/items.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bundles/zsh/items.py b/bundles/zsh/items.py index 0052b74..6829bdc 100644 --- a/bundles/zsh/items.py +++ b/bundles/zsh/items.py @@ -4,7 +4,7 @@ for name, user_config in node.metadata.get('users').items(): if user_config.get('shell', None) != '/usr/bin/zsh': continue - directories = { + directories.update({ join(user_config['home'], '.zsh'): { 'owner': name, 'group': name, @@ -20,9 +20,9 @@ for name, user_config in node.metadata.get('users').items(): f"git_deploy:{join(user_config['home'], '.zsh/oh-my-zsh')}", ] }, - } + }) - git_deploy = { + git_deploy.update({ join(user_config['home'], '.zsh/oh-my-zsh'): { 'repo': 'https://github.com/ohmyzsh/ohmyzsh.git', 'rev': 'master', @@ -37,9 +37,9 @@ for name, user_config in node.metadata.get('users').items(): f'action:chown_zsh_{name}', ], }, - } + }) - files = { + files.update({ join(user_config['home'], '.zshrc'): { 'owner': name, 'group': name, @@ -52,11 +52,11 @@ for name, user_config in node.metadata.get('users').items(): f"git_deploy:{join(user_config['home'], '.zsh/oh-my-zsh')}", ] }, - } + }) - actions = { + actions.update({ f'chown_zsh_{name}': { 'command': f"chown -R {name}:{name} {user_config['home']}", 'triggered': True, }, - } + })