You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Distribute a custom .zshrc file with a dependency.
Install the zsh package.
Set zsh as default shell for the specified users.
Distribute a custom .zshrc for each user.
Install a dependency.
main.yml file in your project folder:
- name: zshhosts: allvars:
zsh_config_backup: falsezsh_config_overwrite: truezsh_users:
- lorem
- ipsumzsh_users_config:
- template: "zshrc.j2"filename: ".zshrc"zsh_dependencies:
- exaroles:
- bec.shell.zshtasks:
- ansible.builtin.debug:
msg: "ZSH has been installed and exa is used to list files."
zshrc.j2 file in your templates folder:
{%ifzsh_config_overwriteistrue%}
#
# {{ ansible_managed }}
#
{%endif%}
alias ls='exa --group-directories-first'
alias ll='exa --group-directories-first -a -l -b -g -F -G'
alias lx='exa --group-directories-first -a -l -b -g -h -H -i -m -S --time-style=long-iso'
exa is an improved file lister with more features and better defaults. It uses colours to distinguish file types and metadata.