Setting fish as the default user shell
This commit is contained in:
parent
51015a4e35
commit
cca53ad11d
1 changed files with 15 additions and 0 deletions
|
@ -18,6 +18,9 @@
|
||||||
pacman_packages:
|
pacman_packages:
|
||||||
- python-pipx
|
- python-pipx
|
||||||
|
|
||||||
|
macos_fish_path: /usr/local/bin/fish
|
||||||
|
arch_fish_path: /usr/bin/fish
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Check the current OS family
|
- name: Check the current OS family
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
|
@ -46,3 +49,15 @@
|
||||||
state: present
|
state: present
|
||||||
become: true
|
become: true
|
||||||
when: is_arch
|
when: is_arch
|
||||||
|
|
||||||
|
- name: Set fish as default shell
|
||||||
|
become: true
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: "{{ ansible_env.USER }}"
|
||||||
|
shell: "{{ shell_path }}"
|
||||||
|
vars:
|
||||||
|
shell_path: "\
|
||||||
|
{% if is_macos %}{{ macos_fish_path }}\
|
||||||
|
{% elif is_arch %}{{ arch_fish_path }}\
|
||||||
|
{% else %}/bin/fish\
|
||||||
|
{% endif %}"
|
||||||
|
|
Loading…
Reference in a new issue