system-config/playbooks/restart_zuul_launchers.yaml
Paul Belanger 63597ec07d
Use root to restart our zuul-launcher service
Add support so we can run the playbook as non-root user.

Change-Id: I05af471417ba58a985c24dc0ea2c43f1c7e24a4b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-06-21 13:49:59 -04:00

26 lines
631 B
YAML

---
- hosts: 'zlstatic0*.openstack.org:zl0*.openstack.org'
# Do the entire play completely for one host at a time
serial: 1
any_errors_fatal: true
tasks:
- name: Graceful stop zuul-launcher
shell: 'zuul-launcher graceful'
become: true
become_user: zuul
- name: Wait for (3h10m) to stop zuul-launcher
async: 11400
poll: 60
wait_for:
path: /var/run/zuul-launcher/zuul-launcher.pid
state: absent
timeout: 11400
- name: Restart zuul-launcher
service:
name: zuul-launcher
state: restarted
become: true
become_user: root