Add collect-flavors-and-verify-profiles role

This patch adds this role created from
validations/collect-flavors-and-verify-profiles.yaml.

Change-Id: I73a92caba8a3eef0b77a47eba42898f68e7ef826
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 ee28ae4dbc
4 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,13 @@
---
- hosts: undercloud
vars:
metadata:
name: Collect and verify role flavors
description: >
This validation checks the flavors assigned to roles exist and have the
correct capabilities set.
groups:
- pre-deployment
- pre-upgrade
roles:
- collect-flavors-and-verify-profiles

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,11 @@
---
- name: Collect and check the flavors
check_flavors:
roles_info: "{{ lookup('roles_info', wantlist=True) }}"
flavors: "{{ lookup('nova_flavors', wantlist=True) }}"
register: flavor_result
- name: Verify the profiles
verify_profiles:
nodes: "{{ lookup('ironic_nodes', wantlist=True) }}"
flavors: "{{ flavor_result.flavors }}"

View File

@ -0,0 +1,9 @@
---
metadata:
name: Collect and verify role flavors
description: >
This validation checks the flavors assigned to roles exist and have the
correct capabilities set.
groups:
- pre-deployment
- pre-upgrade