-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance appliance health target to run on vCenter env
- Loading branch information
1 parent
12d852e
commit 359f3ec
Showing
6 changed files
with
146 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
tests/integration/targets/vmware_rest_appliance/playbook.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
- hosts: localhost | ||
gather_facts: no | ||
|
||
tasks: | ||
|
||
- name: Import eco-vcenter credentials | ||
ansible.builtin.include_vars: | ||
file: ../../integration_config.yml | ||
tags: eco-vcenter-ci | ||
|
||
- name: Import appliance role | ||
ansible.builtin.import_role: | ||
name: vmware_rest_appliance | ||
tags: | ||
- eco-vcenter-ci | ||
|
121 changes: 121 additions & 0 deletions
121
tests/integration/targets/vmware_rest_appliance/tasks/appliance_health.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
--- | ||
- name: Get the database health status | ||
vmware.vmware_rest.appliance_health_database_info: | ||
register: db_health | ||
ignore_errors: true | ||
|
||
- name: Print db_health | ||
ansible.builtin.debug: | ||
var: db_health | ||
|
||
- name: Get the database storage health status | ||
vmware.vmware_rest.appliance_health_databasestorage_info: | ||
register: db_storage_health | ||
|
||
- name: Print db_storage_health | ||
ansible.builtin.debug: | ||
var: db_storage_health | ||
|
||
- name: Assert database storage health status | ||
ansible.builtin.assert: | ||
that: | ||
- db_storage_health.value == "green" | ||
fail_msg: "Database storage health status is not green" | ||
|
||
- name: Get the system load status | ||
vmware.vmware_rest.appliance_health_load_info: | ||
register: system_load_health | ||
|
||
- name: Print system_load_health | ||
ansible.builtin.debug: | ||
var: system_load_health | ||
|
||
- name: Assert system load health status | ||
ansible.builtin.assert: | ||
that: | ||
- system_load_health.value == "green" | ||
fail_msg: "System load status is not green" | ||
|
||
- name: Get the system memory status | ||
vmware.vmware_rest.appliance_health_mem_info: | ||
register: system_mem_health | ||
|
||
- name: Print system_mem_health | ||
ansible.builtin.debug: | ||
var: system_mem_health | ||
|
||
- name: Assert system memory health status | ||
ansible.builtin.assert: | ||
that: | ||
- system_mem_health.value == "green" | ||
fail_msg: "System memory health status is not green" | ||
|
||
- name: Get the system health status | ||
vmware.vmware_rest.appliance_health_system_info: | ||
register: system_health | ||
|
||
- name: Print system_health | ||
ansible.builtin.debug: | ||
var: system_health | ||
|
||
- name: Assert system health status | ||
ansible.builtin.assert: | ||
that: | ||
- system_health.value == "green" | ||
fail_msg: "System health status is not green" | ||
|
||
- name: Get the health of the software package manager | ||
vmware.vmware_rest.appliance_health_softwarepackages_info: | ||
register: software_pkg_health | ||
|
||
- name: Print software_pkg_health | ||
ansible.builtin.debug: | ||
var: software_pkg_health | ||
|
||
- name: Assert software package manager health status | ||
ansible.builtin.assert: | ||
that: | ||
- software_pkg_health.value == "green" | ||
fail_msg: "Software package manager health status is not green" | ||
|
||
- name: Get the health of the storage system | ||
vmware.vmware_rest.appliance_health_storage_info: | ||
register: storage_health | ||
|
||
- name: Print storage_health | ||
ansible.builtin.debug: | ||
var: storage_health | ||
|
||
- name: Assert storage health status | ||
ansible.builtin.assert: | ||
that: | ||
- storage_health.value == "green" | ||
fail_msg: "Storage health status is not green" | ||
|
||
- name: Get the health of the swap | ||
vmware.vmware_rest.appliance_health_swap_info: | ||
register: swap_health | ||
|
||
- name: Print swap_health | ||
ansible.builtin.debug: | ||
var: swap_health | ||
|
||
- name: Assert swap health status | ||
ansible.builtin.assert: | ||
that: | ||
- swap_health.value == "green" | ||
fail_msg: "Swap health status is not green" | ||
|
||
- name: Get the health state of applmgmt | ||
vmware.vmware_rest.appliance_health_applmgmt_info: | ||
register: applmgmt_health | ||
|
||
- name: Print applmgmt_health | ||
ansible.builtin.debug: | ||
var: applmgmt_health | ||
|
||
- name: Assert appliance management health status | ||
ansible.builtin.assert: | ||
that: | ||
- applmgmt_health.value == "green" | ||
fail_msg: "Appliance management health status is not green" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- import_tasks: appliance_health.yml |