Repository navigation
Expand file tree
/
Copy pathinstall.yml
More file actions
97 lines (86 loc) · 2.35 KB
/
Copy pathinstall.yml
File metadata and controls
97 lines (86 loc) · 2.35 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
---
- name: Update package cache
package:
update_cache: yes
become: yes
when: ansible_os_family != 'Darwin'
- name: Install zsh, git, wget, fd-find
package:
name:
- zsh
- git
- wget
- fd-find
state: present
# brew don't work from root user on macOS
become: yes
when: not (zsh_user == 'root' and ansible_os_family == 'Darwin')
- name: check if {{zsh_antigen_path}} exist
stat:
path: "{{zsh_antigen_path}}"
register: zsh_antigen_path_present
- name: create direcoty {{zsh_antigen_path}}
become: yes
become_user: "{{ zsh_user }}"
file:
dest: "{{zsh_antigen_path}}"
mode: '0755'
state: directory
when: not zsh_antigen_path_present.stat.exists
- name: Clone antigen {{ zsh_antigen_version }}
git:
repo: https://github.com/zsh-users/antigen.git
dest: "{{ zsh_antigen_path }}/antigen"
version: "{{ zsh_antigen_version }}"
force: yes
become: yes
become_user: "{{ zsh_user }}"
register: zsh_register_antigen_clone
- name: Clone iwfmp/mc-solarized-skin
git:
repo: https://github.com/iwfmp/mc-solarized-skin.git
version: master
dest: "~{{ zsh_user }}/.mc/lib/mc-solarized"
force: yes
become: yes
become_user: "{{ zsh_user }}"
when: zsh_mc_solarized_skin and not zsh_shared
- name: Check fzf installed
command: which fzf
changed_when: false
failed_when: false
check_mode: no
register: zsh_register_fzf_command
- name: Set zsh_fzf_path to /usr/local/bin
set_fact:
zsh_fzf_path: /usr/local/bin
changed_when: false
when: zsh_shared
- name: Set zsh_fzf_path_absolute
set_fact:
zsh_fzf_path_absolute: "{{ zsh_fzf_path | replace('$HOME', '~' + zsh_user) }}"
changed_when: false
- name: Ensure users home binary folder is present
file:
path: "{{ zsh_fzf_path_absolute }}"
owner: "{{ zsh_user }}"
group: "{{ zsh_user_group }}"
mode: u=rwx,g=rwx,o=rx
state: directory
when: not zsh_shared
- name: "Download fzf to {{ zsh_fzf_path_absolute }}"
become: yes
unarchive:
src: "{{ zsh_fzf_url }}"
dest: "{{ zsh_fzf_path_absolute }}"
remote_src: yes
creates: "{{ zsh_fzf_path_absolute }}/fzf"
when: zsh_register_fzf_command.rc == 1
- name: Set directory permissions
become: yes
file:
name: "{{ zsh_antigen_path }}"
owner: "{{ zsh_user }}"
group: "{{ zsh_user_group }}"
recurse: yes
changed_when: false