--- # Set Fish as the default login shell for the target user. - name: Get Fish binary path ansible.builtin.command: which fish register: cli_modern_fish_path changed_when: false - name: Ensure Fish is in /etc/shells become: true ansible.builtin.lineinfile: path: /etc/shells line: "{{ cli_modern_fish_path.stdout }}" state: present - name: Set Fish as default shell for {{ cli_modern_user }} become: true ansible.builtin.user: name: "{{ cli_modern_user }}" shell: "{{ cli_modern_fish_path.stdout }}"