From 9169d9b6eb520acef91d7c63356151f584bd4652 Mon Sep 17 00:00:00 2001 From: Thorsten S Date: Thu, 2 Jan 2020 15:59:01 +0100 Subject: [PATCH] handler fixes --- deploy/roles/urlbot/handler/main.yml | 20 ++++++++++---------- deploy/roles/urlbot/tasks/main.yml | 9 +++++++++ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/deploy/roles/urlbot/handler/main.yml b/deploy/roles/urlbot/handler/main.yml index b303201..4b70dc7 100644 --- a/deploy/roles/urlbot/handler/main.yml +++ b/deploy/roles/urlbot/handler/main.yml @@ -1,12 +1,12 @@ --- -name: restart chatbot -systemd: - scope: user - name: urlbot-chat.service - state: restarted +- name: restart chatbot + systemd: + scope: user + name: urlbot-chat.service + state: restarted -name: restart worker -systemd: - scope: user - name: urlbot-worker.service - state: restarted +- name: restart worker + systemd: + scope: user + name: urlbot-worker.service + state: restarted diff --git a/deploy/roles/urlbot/tasks/main.yml b/deploy/roles/urlbot/tasks/main.yml index 88d97be..6452eba 100644 --- a/deploy/roles/urlbot/tasks/main.yml +++ b/deploy/roles/urlbot/tasks/main.yml @@ -17,6 +17,9 @@ update: yes register: source_code # TODO: distinction of changes + notify: + - restart worker + - restart chatbot - name: install bot (xmpp) shell: "{{ venv_chatbot }}/bin/pip install -i {{pypi_mirror}} .[chatbot]" @@ -52,6 +55,9 @@ value: "{{giphy_key}}" tags: [render_config] register: urlbot_config + notify: + - restart worker + - restart chatbot - name: create directory for systemd unit files shell: mkdir -p ~/.config/systemd/user/ creates=~/.config/systemd/user/ @@ -64,6 +70,9 @@ with_items: - chat - worker + notify: + - restart worker + - restart chatbot - systemd: name: "urlbot-{{ item }}.service" -- 2.39.2