]> git.aero2k.de Git - urlbot-v3.git/commitdiff
handler fixes
authorThorsten S <mail@aero2k.de>
Thu, 2 Jan 2020 14:59:01 +0000 (15:59 +0100)
committerThorsten S <mail@aero2k.de>
Thu, 2 Jan 2020 14:59:01 +0000 (15:59 +0100)
deploy/roles/urlbot/handler/main.yml
deploy/roles/urlbot/tasks/main.yml

index b303201f678069c866eba644cbe8ebc31eb77479..4b70dc7237b12952aed885cb3a9f2c0891ffa541 100644 (file)
@@ -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
index 88d97be5adf54a6622077433f23cab1fd25b36ea..6452ebadf3cd751040b957eb2e897656df743c9a 100644 (file)
@@ -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"