"json": {
"statuses": [
{
"application": "JIRA",
"completeKey": "com.atlassian.jira.plugins.jira-healthcheck-plugin:hsqlHealthCheck",
"description": "Checks if the instance is connected to an HSQL or H2 database",
"documentation": "https://confluence.atlassian.com/x/1guaEQ",
"failureReason": "You are not using an HSQL or H2 embedded database with a production license.",
"healthy": true,
"id": 0,
"isHealthy": true,
"name": "Embedded database",
"severity": "undefined",
"tag": "Supported Platforms",
"time": 1518726326309
},
{
"application": "JIRA",
"completeKey": "com.atlassian.jira.plugins.jira-healthcheck-plugin:eolHealthCheck",
"description": "Checks if the running version of JIRA is approaching, or has reached End of Life.",
"documentation": "https://confluence.atlassian.com/x/HjnRLg",
"failureReason": "Unable to verify the End of Life date for version '7.4.x'. The check has not been performed.",
"healthy": true,
"id": 0,
"isHealthy": true,
"name": "End of Life",
"severity": "undefined",
"tag": "Supported Platforms",
"time": 1518726326316
},
{
"application": "JIRA",
"completeKey": "com.atlassian.jira.plugins.jira-healthcheck-plugin:luceneSupportHealthCheck",
"description": "Checks the state of the search index is consistent with the database.",
"documentation": "https://confluence.atlassian.com/x/9IUfL",
"failureReason": "The issue index is inconsistent with the database state.",
"healthy": false,
"id": 0,
"isHealthy": false,
"name": "Lucene",
"severity": "major",
"tag": "Indexing",
"time": 1518726326372
},
---
- name: check if jira indexing is required and do it
hosts: localhost
become: no
connection: local
#vars_files:
# - vault.yml
tasks:
- name: Check for "Lucene" health
uri:
url: https://example.com/rest/supportHealthCheck/1.0/check/
method: GET
user: user
password: password
force_basic_auth: yes
body_format: json
return_content: yes
validate_certs: no
status_code: 200
register: results
- name: Get health result
debug: var=item
with_items: "{{results|json_query(name_Lucene_query)}}"
vars:
name_Lucene_query: "statuses.name[?name=='Lucene'].isHealthy"###################
## results / output of "Check for "Lucene" health
TASK [Check for "Lucene" health] **********************************************************************************************************************************************************************************
task path: /home/user/jiraHealth.yml:11
"json": {
"statuses": [
{
"application": "JIRA",
"completeKey": "com.atlassian.jira.plugins.jira-healthcheck-plugin:hsqlHealthCheck",
"description": "Checks if the instance is connected to an HSQL or H2 database",
"documentation": "https://confluence.atlassian.com/x/1guaEQ",
"failureReason": "You are not using an HSQL or H2 embedded database with a production license.",
"healthy": true,
"id": 0,
"isHealthy": true,
"name": "Embedded database",
"severity": "undefined",
"tag": "Supported Platforms",
"time": 1518726326309
},
{
"application": "JIRA",
"completeKey": "com.atlassian.jira.plugins.jira-healthcheck-plugin:eolHealthCheck",
"description": "Checks if the running version of JIRA is approaching, or has reached End of Life.",
"documentation": "https://confluence.atlassian.com/x/HjnRLg",
"failureReason": "Unable to verify the End of Life date for version '7.4.x'. The check has not been performed.",
"healthy": true,
"id": 0,
"isHealthy": true,
"name": "End of Life",
"severity": "undefined",
"tag": "Supported Platforms",
"time": 1518726326316
},
{
"application": "JIRA",
"completeKey": "com.atlassian.jira.plugins.jira-healthcheck-plugin:luceneSupportHealthCheck",
"description": "Checks the state of the search index is consistent with the database.",
"documentation": "https://confluence.atlassian.com/x/9IUfL",
"failureReason": "The issue index is inconsistent with the database state.",
"healthy": false,
"id": 0,
"isHealthy": false,
"name": "Lucene",
"severity": "major",
"tag": "Indexing",
"time": 1518726326372
},
####################
## results / output of "Get health result
TASK [Get health result] ******************************************************************************************************************************************************************************************
task path: /home/user/jiraHealth.yml:25
ok: [localhost] => (item=) => {
"changed": false,
"item": ""
}
- name: Reindex db
command: runthis
when: "{{ name_Lucene_query }}" == false--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ff35e970-8a2c-427b-b3eb-ea570e1c8931%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ff35e970-8a2c-427b-b3eb-ea570e1c8931%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/12b71a0d-94cc-4be8-8d1b-6fc59ae2b536%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.