Add node-disks role

This patch adds this new role created from:
- validations/node-disks.yaml

Change-Id: I0ea59d02fd28d651fa29d81583fa13253576a0cb
Implements: blueprint validation-framework
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
This commit is contained in:
Gael Chamoulaud 2019-02-25 15:08:38 +01:00
parent 6ecfb48553
commit ba0039cd8f
5 changed files with 72 additions and 0 deletions

12
playbooks/node-disks.yaml Normal file
View File

@ -0,0 +1,12 @@
---
- hosts: undercloud
vars:
metadata:
name: Check node disk configuration
description: >
Check node disk numbers and sizes and whether root device hints are set.
groups:
- pre-deployment
ironic_conf_file: "/var/lib/config-data/puppet-generated/ironic/etc/ironic/ironic.conf"
roles:
- node-disks

View File

@ -0,0 +1,2 @@
---
ironic_conf_file: "/var/lib/config-data/puppet-generated/ironic/etc/ironic/ironic.conf"

View File

@ -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: []

View File

@ -0,0 +1,24 @@
---
- name: Get Ironic Inspector swift auth_url
become: true
ini:
path: "{{ ironic_conf_file }}"
section: inspector
key: auth_url
register: ironic_auth_url
- name: Get Ironic Inspector swift password
become: true
ini:
path: "{{ ironic_conf_file }}"
section: inspector
key: password
register: ironic_password
- name: Check node disks
node_disks:
nodes: "{{ lookup('ironic_nodes', wantlist=True) }}"
flavors: "{{ lookup('nova_flavors', wantlist=True) }}"
introspection_data: "{{ lookup('introspection_data',
auth_url=ironic_auth_url.value,
password=ironic_password.value) }}"

View File

@ -0,0 +1,7 @@
---
metadata:
name: Check node disk configuration
description: >
Check node disk numbers and sizes and whether root device hints are set.
groups:
- pre-deployment