From: Thorsten S Date: Thu, 2 Jan 2020 14:59:01 +0000 (+0100) Subject: handler fixes X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=9169d9b6eb520acef91d7c63356151f584bd4652;p=urlbot-v3.git handler fixes --- 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"