Add stonith-exists role
This patch adds this role created from validations/stonith-exists.yaml. Change-Id: I34e8d5128ec5260e699c506336fa36f5a61ea546 Implements: blueprint validation-framework Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
This commit is contained in:
parent
6ecfb48553
commit
e8de5b2e4f
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
- hosts: Controller
|
||||
vars:
|
||||
metadata:
|
||||
name: Validate stonith devices
|
||||
description: >
|
||||
Verify that stonith devices are configured for your OpenStack Platform HA cluster.
|
||||
We don't configure stonith device with TripleO Installer. Because the hardware
|
||||
configuration may be differ in each environment and requires different fence agents.
|
||||
How to configure fencing please read https://access.redhat.com/documentation/en/red-hat-openstack-platform/8/paged/director-installation-and-usage/86-fencing-the-controller-nodes
|
||||
groups:
|
||||
- post-deployment
|
||||
roles:
|
||||
- stonith-exists
|
|
@ -0,0 +1,27 @@
|
|||
galaxy_info:
|
||||
author: TripleO Validations Team
|
||||
company: Red Hat
|
||||
license: Apache
|
||||
min_ansible_version: 2.4
|
||||
|
||||
platforms:
|
||||
- name: CentOS
|
||||
versions:
|
||||
- 7
|
||||
- name: RHEL
|
||||
versions:
|
||||
- 7
|
||||
|
||||
categories:
|
||||
- cloud
|
||||
- baremetal
|
||||
- system
|
||||
galaxy_tags: []
|
||||
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||
# and categorizes the role. Users find roles by searching for tags. Be sure to
|
||||
# remove the '[]' above, if you add tags to this list.
|
||||
#
|
||||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||
# Maximum 20 tags per role.
|
||||
|
||||
dependencies: []
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
- name: Check if we are in HA cluster environment
|
||||
become: True
|
||||
register: pcs_cluster_status
|
||||
command: pcs cluster status
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
|
||||
- name: Get all currently configured stonith devices
|
||||
become: True
|
||||
command: "pcs stonith"
|
||||
register: stonith_devices
|
||||
changed_when: false
|
||||
when: "pcs_cluster_status.rc == 0"
|
||||
|
||||
- name: Verify the stonith device are configured
|
||||
fail:
|
||||
msg: "Stonith devices are not configured."
|
||||
when: >
|
||||
pcs_cluster_status.rc == 0
|
||||
and
|
||||
'NO stonith devices configured' in stonith_devices.stdout
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
metadata:
|
||||
name: Validate stonith devices
|
||||
description: >
|
||||
Verify that stonith devices are configured for your OpenStack Platform HA cluster.
|
||||
We don't configure stonith device with TripleO Installer. Because the hardware
|
||||
configuration may be differ in each environment and requires different fence agents.
|
||||
How to configure fencing please read https://access.redhat.com/documentation/en/red-hat-openstack-platform/8/paged/director-installation-and-usage/86-fencing-the-controller-nodes
|
||||
groups:
|
||||
- post-deployment
|
Loading…
Reference in New Issue