Skip to content
Patrick edited this page May 9, 2024 · 3 revisions

Install ZSH and set it as default shell for the ansible_user.

  • Install the zsh package.
  • Set zsh as default shell for the ansible_user.

main.yml file in your project folder:

- name: zsh
  hosts: all
  vars:
    zsh_config_backup: false
    zsh_config_overwrite: true
  roles:
    - bec.shell.zsh
  tasks:
    - ansible.builtin.debug:
        msg: "ZSH has been installed and set as default for the user {{ ansible_user }}."

The variables zsh_users_config and zsh_system_config are not set in this example - they are an empty array by default. Therefore, no ZSH config files are distributed in this example. ZSH will ask the user when logging in, if a new config file should be created.

Clone this wiki locally