From 9d219f86a372ab6d1da0a2728353fed32bfafa9d Mon Sep 17 00:00:00 2001 From: Jared Hampson Date: Tue, 13 Sep 2022 18:08:23 -0500 Subject: [PATCH] feat(install_hacs): Use handler to restart home assistant after hacs install Fixes #51 --- roles/install_hacs/handlers/main.yml | 5 +++++ roles/install_hacs/tasks/main.yml | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 roles/install_hacs/handlers/main.yml diff --git a/roles/install_hacs/handlers/main.yml b/roles/install_hacs/handlers/main.yml new file mode 100644 index 0000000..83eb7f6 --- /dev/null +++ b/roles/install_hacs/handlers/main.yml @@ -0,0 +1,5 @@ +- name: restart home assistant + shell: | + ha core restart + args: + warn: false diff --git a/roles/install_hacs/tasks/main.yml b/roles/install_hacs/tasks/main.yml index af48c70..4696548 100644 --- a/roles/install_hacs/tasks/main.yml +++ b/roles/install_hacs/tasks/main.yml @@ -25,9 +25,5 @@ src: https://github.com/hacs/integration/releases/latest/download/hacs.zip dest: "{{ ha_path }}/custom_components/hacs" remote_src: yes - -- name: Restart Home Assistant - shell: | - ha core restart - args: - warn: no # noqa 301 \ No newline at end of file + notify: + - restart home assistant