Skip to content

Commit

Permalink
Jiggling the cable on Api-X
Browse files Browse the repository at this point in the history
  • Loading branch information
dannylamb committed Oct 31, 2017
1 parent 00880bc commit 5d38237
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/internal/apix/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ apix_static_token: islandora

apix_loader_url: http://localhost:8081/services//apix:load

apix_root_discovery: http://localhost:8081/discovery/

apix_karaf_etc_dir: "{{ karaf_install_symlink }}/etc"

apix_config:
Expand Down
5 changes: 5 additions & 0 deletions roles/internal/apix/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
- apix
- apix-config

- include: reset.yml
tags:
- apix
- apix-reset

- include: crayfish.yml
tags:
- apix
Expand Down
46 changes: 46 additions & 0 deletions roles/internal/apix/tasks/reset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---

- uri:
url: "{{ apix_root_discovery }}"
status_code: 200,500
headers:
Bearer: "{{ apix_static_token }}"
register: loader_service

- service:
name: karaf
state: stopped
when: loader_service.status == 500

- service:
name: tomcat8
state: stopped
when: loader_service.status == 500

- service:
name: activemq
state: stopped
when: loader_service.status == 500

- service:
name: activemq
state: started
when: loader_service.status == 500

- pause:
minutes: 1
when: loader_service.status == 500

- service:
name: tomcat8
state: started
when: loader_service.status == 500

- pause:
minutes: 1
when: loader_service.status == 500

- service:
name: karaf
state: started
when: loader_service.status == 500

0 comments on commit 5d38237

Please sign in to comment.