Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tasks:
- - block:
- - name: Start indexing of pdh
- local_action:
- module: uri
- method: POST
- user: "{{ scheduler.pdh.credentials.refresh.username }}"
- password: "{{ scheduler.pdh.credentials.refresh.password }}"
- url: "http://{{ ansible_fqdn }}:8080/pdh/admin/cache/refresh"
- become: no
- - name: Health check
- local_action:
- module: uri
- method: GET
- user: "{{ scheduler.pdh.credentials.dashboard.username }}"
- password: "{{ scheduler.pdh.credentials.dashboard.password }}"
- url: "http://{{ ansible_fqdn }}:8080/pdh/healthcheck/dashboard.json"
- return_content: yes
- register: health_check
- until: ((health_check.content|from_json)['cache_update_status_description']|search('EDT successfully')) and ((health_check.content|from_json)['cache_update_status'] == "ok")
- # Wait for an hour
- retries: 120
- delay: 5
- become: no
- rescue:
- - name: Start indexing of pdh
- local_action:
- module: uri
- method: POST
- user: "{{ scheduler.pdh.credentials.refresh.username }}"
- password: "{{ scheduler.pdh.credentials.refresh.password }}"
- url: "http://{{ ansible_fqdn }}:8080/pdh/admin/cache/refresh"
- become: no
- always:
- - name: Show health check message
- debug: msg={{ (health_check.content|from_json) }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement