-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsite.yml
executable file
·130 lines (113 loc) · 2.59 KB
/
site.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
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
126
127
128
129
130
#!/usr/bin/env ansible-playbook
---
- name: System
hosts: "{{ lookup('pipe', 'hostname') }}"
become: true
tags: system
gather_facts: false
tasks:
- name: "Sudo password"
# Need to list all tags in this play instead of using `always` since
# otherwise Ansible will run this even when *only* setting the `user` tag.
tags:
- system
- prerequisites
- dnf
- flatpak-system-clean
- sysconf
no_log: true
block:
- pause:
prompt: "Sudo password"
echo: false
register: result
- set_fact:
ansible_become_pass: "{{ result.user_input }}"
# Need this since Ansible otherwise won't gather_facts on tagged runs.
- name: "Gather facts"
setup:
- name: "Install prerequisites"
tags: prerequisites
dnf:
state: present
name:
- python3-psutil
- python3-libselinux
- name: dnf
tags: dnf
block:
- include_role:
name: dnf
- name: flatpak-system-clean
tags: flatpak-system-clean
block:
- include_role:
name: flatpak-system-clean
- name: sysconf
tags: sysconf
block:
- include_role:
name: sysconf
- name: users
tags: users
block:
- include_role:
name: users
- name: User
hosts: "{{ lookup('pipe', 'hostname') }}"
tags: user
tasks:
- name: Get users homedir
tags: always
set_fact:
homedir: "{{ lookup('pipe', 'command echo ~') }}"
- name: gnome
tags: gnome
block:
- include_role:
name: gnome
- name: lastpass
tags: lastpass
block:
- include_role:
name: lastpass
- name: ssh
tags: ssh
block:
- include_role:
name: ssh
- name: userconf
tags: userconf
block:
- include_role:
name: userconf
- name: git
tags: git
block:
- include_role:
name: git
- name: flatpak
tags: flatpak
block:
- include_role:
name: flatpak
- name: languages
tags: languages
block:
- include_role:
name: languages
- name: url-install
tags: url-install
block:
- include_role:
name: url-install
- name: bashcomp
tags: bashcomp
block:
- include_role:
name: bashcomp
- name: git-install
tags: git-install
block:
- include_role:
name: git-install