-
Notifications
You must be signed in to change notification settings - Fork 0
/
Install_dev_packages.yaml
125 lines (97 loc) · 3.07 KB
/
Install_dev_packages.yaml
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
---
- name: Install dev tools and packages (for non GUI tools)
hosts: all
# This requires {{ dev_user }} variable exists for dev hosts.
tasks:
# These two steps are needed to place config file for micro and trans
- name: Get the dev user home dir
become: yes
become_user: "{{ dev_user }}"
shell:
cmd: "echo $HOME"
changed_when: false
register: dev_home
- name: Print dev_home variable
debug:
var: dev_home.stdout
# ==> For installing micro
# This bit for Arch
- name: Install micro
become: yes
become_user: root
package:
name: micro
when: ansible_facts['os_family'] == "Archlinux"
- name: Check if micro is installed
stat:
path: "/usr/bin/micro"
register: micro_file
# This bit for ubuntu
- name: install micro
become: true
become_user: root
shell:
chdir: "/usr/bin"
cmd: "curl https://getmic.ro | bash"
when: (not micro_file.stat.exists) and ansible_facts['os_family'] != "Archlinux" # I just assume everything else is just ubuntu relatives
- name: Copy micro config files
become: yes
become_user: "{{ dev_user }}"
copy:
src: user-configs/micro
dest: "{{ dev_home.stdout }}/.config"
backup: yes
force: no
# For installing micro <==
- name: install clipboard tool
become: true
package:
name: [xclip , xsel]
# TODO add ripgrep
- name: Install good tools for shell usage
become: true
become_user: root
package:
name: [fzf , tldr , bat , ripgrep]
# TODO, specially for ubuntu, fd-find need to be put onto bin ln -s $(which fdfind) ~/.local/bin/fd
- name: Install fd-find in arch
become: true
become_user: root
package:
name: fd
when: ansible_facts['os_family'] == "Archlinux"
- name: Install ubuntu specific packages
become: true
become_user: root
package:
name: [fd-find , aptitude]
when: ansible_facts['os_family'] == "Ubuntu"
- name: Install mcfly
become: true
become_user: root
shell:
cmd: "curl -LSfs https://raw.githubusercontent.com/cantino/mcfly/master/ci/install.sh | sh -s -- --git cantino/mcfly --force"
# Trans is great for checking english
- name: Install trans
become: true
become_user: root
package:
name: translate-shell
notify: translate-shell just installed
# For now, the translate-shell config is copied together with the entire config folder
- name: Install pssh
become: true
become_user: root
package:
name: pssh
handlers:
# Happens only when translate-shell is installed
- name: Copy translate shell config
become: yes
become_user: "{{ dev_user }}"
copy:
src: user-configs/translate-shell
dest: "{{ dev_home.stdout }}/.config"
backup: yes
force: no
listen: translate-shell just installed