small rework
This commit is contained in:
parent
525c41bc88
commit
319c3bfb1c
4 changed files with 27 additions and 6 deletions
16
roles/jenkins-php-v1/tasks/include_restartandwait.yml
Normal file
16
roles/jenkins-php-v1/tasks/include_restartandwait.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
|
||||
- name: system-restart jenkins and wait (include)
|
||||
block:
|
||||
- name: restart jenkins
|
||||
service: name=jenkins state=restarted
|
||||
- name: Loop until Jenkins is available
|
||||
get_url:
|
||||
url: "http://localhost:8080/login"
|
||||
dest: "/dev/null"
|
||||
force: True
|
||||
register: result
|
||||
until: result.status_code is defined and result.status_code == 200
|
||||
retries: 100
|
||||
delay: 5
|
||||
changed_when: False
|
Reference in a new issue