-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwsl-ubuntu.yaml
124 lines (101 loc) · 2.89 KB
/
wsl-ubuntu.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
---
- hosts: "local"
vars_files:
- "../vars/global-vars.yaml"
- "../vars/wsl-ubuntu.yaml"
# roles:
tasks:
# run zshenv and print out all env in the shell
# store the output to a register
# this will be used in tasks when using the env. no need to run zshenv before running ansible-playbook
#
# obtained from
# https://stackoverflow.com/a/74932715/3053548
- name: source zshenv
shell:
cmd: source ../tools/zsh/.zshenv; env
register: out
changed_when: false
tags: always
# extract the envs and store them as a dictionary
- name: store zshenv as fact
set_fact:
zshenv: "{{ dict( out.stdout.splitlines() | map('split', '=', 1) ) }}"
changed_when: false
tags: always
# ------------------------------------------------------------------------------------------- #
- name: "print env"
debug:
msg: "{{ zshenv }}"
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/code-directory.yaml"
tags:
- code-directory
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/apt.yaml"
tags:
- apt
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/git.yaml"
tags:
- git
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/lazygit.yaml"
tags:
- lazygit
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/neofetch.yaml"
tags:
- neofetch
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/zsh.yaml"
tags:
- zsh
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/ohmyzsh.yaml"
tags:
- ohmyzsh
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/nvm.yaml"
tags:
- nvm
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/npm.yaml"
tags:
- npm
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/neovim-source-build.yaml"
tags:
- neovim-source-build
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/astronvim.yaml"
tags:
- astronvim
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/tmux.yaml"
tags:
- tmux
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/go-packages.yaml"
tags:
- go-packages
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/pyenv.yaml"
tags:
- pyenv
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/rust.yaml"
tags:
- rust
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/cargo-packages.yaml"
tags:
- cargo-packages
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/pip3.yaml"
tags:
- pip3
- terminal
- include_tasks: "{{ zshenv.DOTDIR }}/tasks/vimv.yaml"
tags:
- vimv
- terminal