-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
43 lines (35 loc) · 1.16 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
---
- hosts: home_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 Home Assistant.
ansible.builtin.import_tasks: tasks/home-assistant.yml
when: home_assistant_enable
- name: Set up Home Assistant Supervised.
ansible.builtin.import_tasks: tasks/home-assistant-supervised.yml
when: home_assistant_supervisor_enable
- name: Set up AirConnect.
ansible.builtin.import_tasks: tasks/airconnect.yml
when: airconnect_enable