diff --git a/modules/openstack_project/files/ansible/playbooks/restart_jenkins_masters.yaml b/modules/openstack_project/files/ansible/playbooks/restart_jenkins_masters.yaml index 0f96c6b4ec..0946608b8d 100644 --- a/modules/openstack_project/files/ansible/playbooks/restart_jenkins_masters.yaml +++ b/modules/openstack_project/files/ansible/playbooks/restart_jenkins_masters.yaml @@ -9,4 +9,4 @@ # 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=started + - service: name=jenkins state=restarted