380ed13d54
We're already on the host, and this defaults to localhost, so this is simpler and doesn't go through the apache proxy. Change-Id: Iac1047dc0a482d21466ab062f3aa3b0ef9144f38
15 lines
597 B
YAML
15 lines
597 B
YAML
---
|
|
- hosts: 'jenkins0*.openstack.org'
|
|
# Do the entire play completely for one host at a time
|
|
serial: 1
|
|
# Treat any errors as fatal so that we don't stop all the jenkins
|
|
# masters.
|
|
any_errors_fatal: true
|
|
tasks:
|
|
- shell: '/usr/local/jenkins/bin/safe_jenkins_shutdown --user {{ user }} --password {{ password }}'
|
|
- service: name=jenkins state=stopped
|
|
# This is necessary because stopping Jenkins is not reliable.
|
|
# We allow return code 1 which means no processes found.
|
|
- shell: 'pkill -9 -U jenkins || [ $? -eq "1" ]'
|
|
- service: name=jenkins state=restarted
|