From 5a9f690552dcccdb9b67462c6c68e41f31bea025 Mon Sep 17 00:00:00 2001 From: "J.P. Krauss" Date: Sun, 12 Nov 2023 14:43:26 -0800 Subject: [PATCH] Add Deploy Script --- .gitignore | 1 + deploy.sh | 3 +++ deploy.yaml | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+) create mode 100755 deploy.sh create mode 100644 deploy.yaml diff --git a/.gitignore b/.gitignore index 7c3a2b7..acfc97e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .HA_VERSION .cloud +.private .storage .uuid *.conf diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..c8a7134 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +ansible-playbook -bK -i .private/inventory -u ansible --key-file .private/id_ansible deploy.yaml diff --git a/deploy.yaml b/deploy.yaml new file mode 100644 index 0000000..7f1d569 --- /dev/null +++ b/deploy.yaml @@ -0,0 +1,18 @@ +--- +# Ansible Playbook to deploy Home Assistant Configuration + +- name: Home Assistant | Update Configuration + hosts: hass + tasks: + - name: Home Assistant | Update Configuration + ansible.builtin.git: + repo: https://git.asymworks.com/jkrauss/home-assistant.git + dest: /srv/hass/config + notify: Home Assistant | Restart Home Assistant + + handlers: + - name: Home Assistant | Restart Home Assistant + community.docker.docker_container: + name: hass + state: started + restart: true