- name: Install zsh package: name: zsh state: present - name: Ensure zshrc.d directory exists file: path: /etc/zsh/zshrc.d state: directory mode: '0755' - name: Enable zshrc.d loading blockinfile: path: /etc/zsh/zshrc block: | # Load modular zsh config if [ -d /etc/zsh/zshrc.d ]; then for file in /etc/zsh/zshrc.d/*.zsh; do [ -r "$file" ] && source "$file" done fi when: ansible_distribution == "Debian" - name: Configure zsh copy: src: zshrc dest: /etc/zsh/zshrc.d/10-freya.zsh owner: root group: root mode: '0664' - name: Remove old zsh config file: path: /etc/zsh/zshrc.d/freya.yml state: absent - name: Ensure root user shell is zsh user: name: root shell: /bin/zsh