deployment-images.yaml: Validation checking existence of required images.

- validation checks whether required deployment images are available
- it takes place before deployment - if required images do not exist,
  overcloud could not be deployed

Change-Id: Ib3f26b7a09779cadc7b741541e820fdd53a62d34
Closes-Bug: #1631425
This commit is contained in:
Katerina Pilatova 2016-11-21 14:48:51 +01:00
parent cda69b09e2
commit 010c3da985
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
---
- hosts: undercloud
vars:
metadata:
name: Verify existence of deployment images.
description: >
This validation checks that images bm-deploy-kernel and
bm-deploy-ramdisk exist before deploying the overcloud.
groups:
- pre-deployment
tasks:
- name: Fetch available images
shell: openstack image list --format value --column Name
register: shell_result
- name: Check for required images
fail: msg="The image {{ item }} is missing."
when: '"{{ item }}" not in "{{ shell_result.stdout }}"'
with_items:
- bm-deploy-kernel
- bm-deploy-ramdisk