1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-26 14:13:53 +01:00
eoli3n-dotfiles/roles/fish/tasks/main.yml

87 lines
2.2 KiB
YAML
Raw Permalink Normal View History

2019-12-01 16:29:03 +01:00
---
2022-01-19 14:45:32 +01:00
#- name: Get oh-my-fish installer
# get_url:
# url: https://get.oh-my.fish
# dest: /tmp/oh-my.fish
# mode: '0777'
# # TORM https://github.com/oh-my-fish/oh-my-fish/issues/799
# #validate_certs: no
# changed_when: false
#
#- name: Install oh-my-fish
# shell: /tmp/oh-my.fish --noninteractive -y
# args:
# creates: ~/.config/fish/conf.d/omf.fish
# executable: /usr/bin/fish
#
#- name: Remove oh-my-fish installer
# file:
# path: /tmp/oh-my.fish
# state: absent
# changed_when: false
- name: Install fisher
shell: curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher
2019-12-01 16:29:03 +01:00
args:
2022-01-19 14:45:32 +01:00
creates: ~/.config/fish/functions/fisher.fish
executable: fish
2019-12-03 09:38:00 +01:00
2022-01-19 14:45:32 +01:00
- name: Install git plugin
become_method: su
shell: fisher install jhillyerd/plugin-git
2020-05-18 15:55:36 +02:00
args:
2022-01-19 14:45:32 +01:00
executable: fish
2020-05-18 15:55:36 +02:00
2022-01-19 14:45:32 +01:00
- name: Install done plugin
become_method: su
2022-01-19 14:45:32 +01:00
shell: fisher install franciscolourenco/done
2020-05-15 18:03:40 +02:00
args:
2022-01-19 14:45:32 +01:00
executable: fish
2022-01-19 16:10:42 +01:00
when: "'desktop' in group_names"
2019-12-01 16:29:03 +01:00
2022-01-19 16:02:37 +01:00
- name: Copy starship config
copy:
src: starship.toml
dest: ~/.config/
2020-05-18 10:37:33 +02:00
2020-10-12 09:08:27 +02:00
- name: create fish completion dir
file:
path: ~/.config/fish/completions
state: directory
- name: install kubectl fish completion
git:
repo: https://github.com/evanlucas/fish-kubectl-completions
dest: ~/.config/fish/completions/fish-kubectl-completions
- name: enable kubectl fish completion
file:
src: ~/.config/fish/completions/fish-kubectl-completions/completions/kubectl.fish
dest: ~/.config/fish/completions/kubectl.fish
state: link
2020-05-14 10:26:01 +02:00
# Separated root|users synchronize as module bugs when using become on the task: it copies always in user homedir
2022-01-19 15:27:34 +01:00
- name: Sync fish config files for cli user
synchronize:
2020-05-14 10:26:01 +02:00
src: fish/cli/
dest: ~/.config/fish
recursive: yes
2020-05-15 18:03:40 +02:00
when: ansible_user_id != 'root'
tags: rsync
2020-05-14 10:26:01 +02:00
2022-01-19 15:27:34 +01:00
- name: Sync fish config files for cli root
2020-05-14 10:26:01 +02:00
synchronize:
src: fish/cli/
dest: /root/.config/fish
recursive: yes
2020-05-15 18:03:40 +02:00
when: ansible_user_id == 'root'
tags: rsync
2022-01-19 15:27:34 +01:00
- name: Sync fish config files for desktop user
synchronize:
2020-05-15 18:03:40 +02:00
src: fish/desktop/
2020-05-14 10:26:01 +02:00
dest: ~/.config/fish
2020-05-10 17:16:35 +02:00
recursive: yes
2022-01-19 16:03:55 +01:00
when: ansible_user_id != 'root' and 'desktop' in group_names
2020-05-15 18:03:40 +02:00
tags: rsync