-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathmain.yml
135 lines (114 loc) · 3.68 KB
/
main.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
131
132
133
134
135
---
- hosts: raspberry_gateway
become: true
pre_tasks:
- name: Load configuration (with defaults from example file)
ansible.builtin.include_vars: "{{ item }}"
loop:
- example.config.yml
- config.yml
- advanced.config.yml
- name: Ensure apt cache is up to date
become: true
ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600
when:
- ansible_facts.os_family == "Debian"
- name: Ensure pacman cache is up to date
become: true
community.general.pacman:
update_cache: true
when:
- ansible_facts.os_family == "Archlinux"
handlers:
- name: Include handlers
ansible.builtin.import_tasks: tasks/handlers.yml
tasks:
- name: Setup Docker
become: true
ansible.builtin.import_tasks: tasks/docker.yml
- name: Setup Portainer
become: true
ansible.builtin.import_tasks: tasks/portainer.yml
when: portainer_enable
- name: Setup OpenVPN Client
become: true
ansible.builtin.import_tasks: tasks/openvpn-client.yml
when: ovpn_client_enable
- name: Setup Gluetun Server
become: true
ansible.builtin.import_tasks: tasks/gluetun.yml
when: gluetun_vpnclient_enable
- name: Setup OpenVPN Server
become: true
ansible.builtin.import_tasks: tasks/openvpn-server.yml
when: ovpn_server_enable
- name: Setup Unbound DNS
become: true
ansible.builtin.import_tasks: tasks/unbound-dns.yml
when: unbound_dns_enable
- name: Setup Pi Hole
become: true
ansible.builtin.import_tasks: tasks/pi-hole.yml
when: pihole_enable
- name: Setup Technitium DNS Server
become: true
ansible.builtin.import_tasks: tasks/tech-dns.yml
when: tech_dns_enable
- name: Setup WireGuard Server
become: true
ansible.builtin.import_tasks: tasks/wireguard.yml
when: wireguard_server_enable
- name: Setup qBitTorrent
become: true
ansible.builtin.import_tasks: tasks/qbittorrent.yml
when: qbittorrent_enable
- name: Setup Samba Server
become: true
ansible.builtin.import_tasks: tasks/sambaserver.yml
when: samba_enable
- name: Setup xray
become: true
ansible.builtin.import_tasks: tasks/xray-xui.yml
when: xray_enable
- name: Setup Rustdesk
become: true
ansible.builtin.import_tasks: tasks/rustdesk-server.yml
when: rustdesk_enable
- name: Setup SOCKS5 Proxy
become: true
ansible.builtin.import_tasks: tasks/socks5-proxy.yml
when: socks5_enable
- name: Setup Raspberry Monitoring
become: true
ansible.builtin.import_tasks: tasks/raspberry-monitoring.yml
when: monitoring_enable
- name: Setup Shelly Plug Monitoring
become: true
ansible.builtin.import_tasks: tasks/shelly-plug.yml
when: shelly_plug_monitoring_enable
- name: Remove Containers
ansible.builtin.include_tasks: tasks/remove.yml
vars:
remove_conditions:
- remove_portainer
- remove_unbound_dns
- remove_pihole
- remove_tech_dns
- remove_ovpn_server
- remove_ovpn_client
- remove_gluetun
- remove_wireguard
- remove_qbittorrent
- remove_samba
- remove_xray
- remove_monitoring
- remove_openvpn_monitoring
- remove_pikvm_monitoring
- remove_airgradient_monitoring
- remove_starlink_monitoring
- remove_shelly_plug_monitoring
- remove_rustdesk
- remove_socks5
when: remove_conditions | select('match', '^remove_') | list | length > 0