Skip to content
Snippets Groups Projects
Commit f5f7ce10 authored by jurgenhaas's avatar jurgenhaas
Browse files

Initial commit

parents
Branches
No related tags found
No related merge requests found
---
# file: roles/home-assistant/handlers/main.yml
- name: Re-create the hass container
docker_container:
name: home-assistant
image: homeassistant/home-assistant
init: yes
state: started
recreate: yes
network_mode: host
restart_policy: always
volumes:
- /var/lib/hass:/config
- /etc/localtime:/etc/localtime:ro
---
dependencies:
- role: docker
---
# file: roles/home-assistant/tasks/home-assistant.yml
- name: Pull docker image
docker_image:
name: homeassistant/home-assistant
source: pull
force_source: yes
notify:
- Re-create the hass container
##
# Ansible file to install Home-Assistant
#
---
# file: roles/home-assistant/tasks/main.yml
- name: Home-Assistant Role
set_fact:
role_home_assistant_started: yes
tags:
- always
- block:
- name: Import home-assistant
import_tasks: home-assistant.yml
- name: Remember that this role had been run
set_fact:
role_home_assistant_completed: yes
tags:
- always
when: (not excluded_roles or "home-assistant" not in excluded_roles) and role_home_assistant_completed is not defined
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment