This commit is contained in:
3
main.yml
3
main.yml
@@ -79,6 +79,9 @@
|
|||||||
- name: Deploy Drop
|
- name: Deploy Drop
|
||||||
import_tasks: tasks/drop.yml
|
import_tasks: tasks/drop.yml
|
||||||
tags: drop_deploy
|
tags: drop_deploy
|
||||||
|
- name: Deploy Home Assistant
|
||||||
|
import_tasks: tasks/home-assistant.yml
|
||||||
|
tags: home-assistant_deploy
|
||||||
|
|
||||||
- hosts: jackson
|
- hosts: jackson
|
||||||
|
|
||||||
|
25
tasks/home-assistant.yml
Normal file
25
tasks/home-assistant.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
- name: Create folder structure
|
||||||
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
with_items:
|
||||||
|
- "{{ data_dir }}/homeassistant"
|
||||||
|
|
||||||
|
- name: Pull HA Docker Image
|
||||||
|
docker_image:
|
||||||
|
name: ghcr.io/home-assistant/home-assistant:stable
|
||||||
|
source: pull
|
||||||
|
|
||||||
|
- name: Deploy Home Assistant Container
|
||||||
|
docker_container:
|
||||||
|
name: home_assistant
|
||||||
|
image: ghcr.io/home-assistant/home-assistant:stable
|
||||||
|
recreate: true
|
||||||
|
restart_policy: unless-stopped
|
||||||
|
network_mode: host
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- "{{ data_dir }}/homeassistant:/config"
|
||||||
|
- "/etc/localtime:/etc/localtime"
|
||||||
|
- "/run/dbus:/run/dbus:ro"
|
Reference in New Issue
Block a user