-
Notifications
You must be signed in to change notification settings - Fork 1
/
zsh.yml
57 lines (53 loc) · 1.28 KB
/
zsh.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
- hosts: localhost
vars:
J_user: "{{ lookup('env','SUDO_USER') if lookup('env','USER') == 'root' else lookup('env','USER') }}"
become: yes
become_user: "{{J_user}}"
tasks:
- name: create zsh directory
file:
path: ~/.zsh
state: directory
mode: 0750
- name: create zsh bin directory
file:
path: ~/.zsh/bin
state: directory
mode: 0750
- name: create zsh source directory
file:
path: ~/.zsh/source
state: directory
mode: 0750
- name: create zsh scripts directory
file:
path: ~/.zsh/scripts
state: directory
mode: 0750
- name: populate zsh bin directory
template:
src: "{{ item }}"
dest: ~/.zsh/bin/{{ item | basename }}
mode: 0750
with_fileglob:
- templates/zsh/bin/*
- name: populate zsh source directory
template:
src: "{{ item }}"
dest: ~/.zsh/source/{{ item | basename }}
mode: 0640
with_fileglob:
- templates/zsh/source/*
- name: populate zsh scripts directory
template:
src: "{{ item }}"
dest: ~/.zsh/scripts/{{ item | basename }}
mode: 0750
with_fileglob:
- templates/zsh/scripts/*
- name: write zshrc
template:
src: templates/zsh/zshrc
dest: ~/.zshrc
mode: 0640