forked from geerlingguy/internet-pi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
60 lines (48 loc) · 1.67 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
---
- name: Configure Internet Pi.
hosts: internet_pi
become: true
pre_tasks:
- name: Load configuration (with defaults from example file).
ansible.builtin.include_vars: "{{ item }}"
loop:
- example.config.yml
- config.yml
- name: Ensure apt cache is up to date.
ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600
when:
- ansible_facts.os_family == "Debian"
- name: Ensure pacman cache is up to date
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.
ansible.builtin.import_tasks: tasks/docker.yml
- name: Set up Internet Monitoring.
ansible.builtin.import_tasks: tasks/internet-monitoring.yml
when: monitoring_enable
- name: Set up Pi Hole.
ansible.builtin.import_tasks: tasks/pi-hole.yml
when: pihole_enable
- name: Set up Shelly Plug Monitoring.
ansible.builtin.import_tasks: tasks/shelly-plug.yml
when: shelly_plug_enable
- name: Set up Air Gradient Monitoring.
ansible.builtin.import_tasks: tasks/airgradient.yml
when: airgradient_enable
- name: Set up Starlink Monitoring.
ansible.builtin.import_tasks: tasks/starlink.yml
when: starlink_enable
- name: Set up Unpoller Monitoring.
ansible.builtin.import_tasks: tasks/unpoller.yml
when: unpoller_enable
- name: Set up Enphase Collector Monitoring.
ansible.builtin.import_tasks: tasks/enphasecollector.yml
when: enphasecollector_enable