[ansible] create a fish shell playbook

pull/28/head
Alpha Chen 5 years ago
parent 1527ad26c0
commit 46007b6aa6

@ -22,3 +22,5 @@
- dotfiles - dotfiles
- ruby - ruby
- zsh - zsh
# - import_playbook: playbooks/fish.yml

@ -0,0 +1,19 @@
- hosts: all
tasks:
- name: install fish
package:
name: fish
state: present
- name: find where fish is
command: which fish
register: which_fish
- name: add fish to /etc/shells
lineinfile: dest=/etc/shells line={{ which_fish.stdout | trim }} state=present
become: yes
- name: set the default user shell to fish
user: name={{ ansible_env.USER }} shell={{ which_fish.stdout | trim }}
become: yes
Loading…
Cancel
Save