Compare commits

..

No commits in common. "b9ff7e59536af6b4d4f5203636ed4dadb83d9897" and "34b42832ac4e81535d65041b8473f8b7e88e33e6" have entirely different histories.

2 changed files with 8 additions and 21 deletions

View file

@ -1,9 +0,0 @@
# /etc/zsh/zprofile: system-wide .zprofile file for zsh(1).
#
# This file is sourced only for login shells (i.e. shells
# invoked with "-" as the first character of argv[0], and
# shells invoked with the -l flag.)
#
# Global Order: zshenv, zprofile, zshrc, zlogin
alias s='sudo su - root -s /usr/bin/zsh'

View file

@ -1,14 +1,10 @@
from os.path import join
files = {
'/etc/zsh/zprofile': {},
}
for name, user_config in node.metadata.get('users').items():
if user_config.get('shell', None) != '/usr/bin/zsh':
continue
directories.update({
directories = {
join(user_config['home'], '.zsh'): {
'owner': name,
'group': name,
@ -24,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.update({
git_deploy = {
join(user_config['home'], '.zsh/oh-my-zsh'): {
'repo': 'https://github.com/ohmyzsh/ohmyzsh.git',
'rev': 'master',
@ -41,9 +37,9 @@ for name, user_config in node.metadata.get('users').items():
f'action:chown_zsh_{name}',
],
},
})
}
files.update({
files = {
join(user_config['home'], '.zshrc'): {
'owner': name,
'group': name,
@ -56,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.update({
actions = {
f'chown_zsh_{name}': {
'command': f"chown -R {name}:{name} {user_config['home']}",
'triggered': True,
},
})
}