1
0
Fork 0

small rework

This commit is contained in:
Chl 2020-03-15 00:43:53 +01:00
parent 525c41bc88
commit 319c3bfb1c
4 changed files with 27 additions and 6 deletions

View file

@ -43,7 +43,7 @@
value: '"--webroot=/var/cache/$NAME/war --httpPort=$HTTP_PORT --httpListenAddress=127.0.0.1"'
no_extra_spaces: yes
register: tmp
notify: restart jenkins
notify: system restart jenkins and wait
- name: Etckeeper - commit
command: "etckeeper commit 'Ansible/jenkins: maintaining /etc/default/jenkins'"
when: tmp.changed and etckeeper_installed

View 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