add restart handler
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2020-12-06 22:13:08 +01:00
parent f68a5feb2e
commit 46aaff854a
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61
2 changed files with 12 additions and 0 deletions

11
handlers/main.yml Normal file
View File

@ -0,0 +1,11 @@
---
- name: Restart scaler service
docker_compose:
project_src: "{{ scaler_service_directory }}"
pull: yes
remove_orphans: yes
stopped: "{{ inst.service_stopped | default(droneci_autoscaler_service_stopped) }}"
restarted: "{{ not inst.service_stopped | default(droneci_autoscaler_service_stopped) }}"
listen: __droneci_autoscaler_restart
become: True
become_user: root

View File

@ -43,6 +43,7 @@
template:
src: services/userdata.yml.j2
dest: "{{ __droneci_autoscaler_workdir }}/userdata.yml"
notify: __droneci_autoscaler_restart
- name: Ensure scaler is up and running
docker_compose: