move most important config to ansible
This commit is contained in:
24
roles/zsh/tasks/main.yaml
Normal file
24
roles/zsh/tasks/main.yaml
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
- name: Install zsh
|
||||
package:
|
||||
name: zsh
|
||||
state: present
|
||||
|
||||
- name: Install oh-my-zsh
|
||||
shell: |
|
||||
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" --unattended
|
||||
args:
|
||||
creates: "{{ ansible_env.HOME }}/.oh-my-zsh"
|
||||
|
||||
- name: Check for custom zshrc
|
||||
stat:
|
||||
path: "{{ role_path }}/files/.zshrc"
|
||||
register: custom_zshrc
|
||||
|
||||
- name: Symlink custom zshrc
|
||||
file:
|
||||
src: "{{ role_path }}/files/.zshrc"
|
||||
dest: "{{ ansible_env.HOME }}/.zshrc"
|
||||
state: link
|
||||
force: yes
|
||||
when: custom_zshrc.stat.exists
|
||||
Reference in New Issue
Block a user