-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal.yml
103 lines (93 loc) · 2.29 KB
/
local.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
---
# tasks to complete before running roles
- name: Pre-run | Start pre-run tasks
hosts: all
tags: always
become: true
pre_tasks:
- name: Pre-run | Update package cache (arch)
tags: always
community.general.pacman:
update_cache: true
changed_when: false
when: ansible_distribution == "Archlinux"
- name: Pre-run | Update package cache (debian, etc)
tags: always
ansible.builtin.apt:
update_cache: true
changed_when: false
when: ansible_distribution in ["Debian", "Ubuntu"]
# vars_prompt:
# - name: neomutt_email
# prompt: What is the email you want in neomutt?
# private: false
# - name: neomutt_password
# prompt: What is the password of your email in neomutt?
# run roles
- name: Base Role | Run base role
hosts: all
tags:
- base
- light_workstation
- heavy_workstation
- samsung_expert
- work
- server
become: true
roles:
- base
- name: Light_workstation Role | Run light_workstation role
hosts: light_workstation
tags:
- light_workstation
- heavy_workstation
- samsung_expert
roles:
- light_workstation
- name: Heavy_workstation Role | Run heavy_workstation role
hosts: heavy_workstation
tags:
- heavy_workstation
- samsung_expert
roles:
- heavy_workstation
- name: Work Role | Run work role
hosts: work
tags:
- work
- samsung_expert
roles:
- work
- name: Samsung_expert Role | Run samsung_expert role
hosts: samsung_expert
tags: samsung_expert
roles:
- samsung_expert
- name: nvidia Role | Run nvidia role
hosts: nvidia
tags: nvidia
roles:
- nvidia
- name: Server Role | Run server role
hosts: server
tags: server
become: true
roles:
- server
# end of run cleanup
- name: Post-run | Start post-run tasks
hosts: all
become: true
tasks:
- name: Post-run | Cleanup package cache (debian and ubuntu)
tags: always
ansible.builtin.apt:
autoclean: true
changed_when: false
when: ansible_distribution in ["Debian", "Pop!_OS", "Ubuntu"]
- name: Post-run | Autoremove orphan packages (debian and ubuntu)
tags: always
ansible.builtin.apt:
autoremove: true
purge: true
when: ansible_distribution in ["Debian", "Pop!_OS", "Ubuntu"]