-
Notifications
You must be signed in to change notification settings - Fork 0
/
site.yaml
87 lines (79 loc) · 1.76 KB
/
site.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
---
- name: setup
hosts: all
tags: [always]
tasks:
- name: create controller_tempdir
delegate_to: localhost
ansible.builtin.tempfile:
state: directory
register: controller_tempdir
changed_when: false
- name: create remote_tempdir
ansible.builtin.tempfile:
state: directory
register: remote_tempdir
changed_when: false
- name: Run system roles
hosts: all
pre_tasks:
- name: end_play if not g_system_install
ansible.builtin.meta: end_play
when: not g_system_install | bool
roles:
- role: packages
tags: [packages]
- role: java
tags: [java]
- name: install dotfiles
hosts: all
tags: [dotfiles]
roles:
- dotfiles
- name: install scripts
hosts: all
tags: [scripts]
roles:
- scripts
- name: install dotnet
hosts: all
tags: [dotnet]
roles:
- dotnet
- name: install rust
hosts: all
tags: [rust]
roles:
- rust
- name: setup python_venv
hosts: all
tags: [python_venv]
roles:
- python_venv
- name: setup tmux
hosts: all
tags: [tmux]
roles:
- tmux
- name: cleanup
hosts: all
tags: [always, cleanup]
tasks:
# NOTE(rkm 2022-01-02) Intentionally don't cleanup any remote tempdirs since
# that only matters in CI
- name: find temp dirs
delegate_to: localhost
ansible.builtin.find:
paths: /tmp
file_type: directory
recurse: false
patterns: "ansible.*"
register: temp_paths
- name: delete temp dirs
delegate_to: localhost
ansible.builtin.file:
path: "{{ item.path }}"
# TODO(rkm 2021-10-31) This can fail if other users have ansible temp dirs
state: absent
with_items: "{{ temp_paths.files }}"
changed_when: false