From 9593ffb85ab6c2b5ee3964d7566932cf9ae768c9 Mon Sep 17 00:00:00 2001 From: Tlacenka Date: Fri, 25 Aug 2017 13:30:02 +0200 Subject: Added checks for configured images and flavors (#688) * prerequisites, custom_*_check: added checking that specified images/flavors are available - uses stack_params as a source of variable value which is then passed to the HOT * minor fixes --- playbooks/provisioning/openstack/prerequisites.yml | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'playbooks/provisioning/openstack/prerequisites.yml') diff --git a/playbooks/provisioning/openstack/prerequisites.yml b/playbooks/provisioning/openstack/prerequisites.yml index dd4f980b2..a87c06705 100644 --- a/playbooks/provisioning/openstack/prerequisites.yml +++ b/playbooks/provisioning/openstack/prerequisites.yml @@ -84,3 +84,35 @@ assert: that: 'key_result.rc == 0' msg: "Keypair {{ openstack_ssh_public_key }} is not available" + +# Check that custom images and flavors exist +- hosts: localhost + + # Include variables that will be used by heat + vars_files: + - stack_params.yaml + + tasks: + # Check that custom images are available + - include: custom_image_check.yaml + with_items: + - "{{ openstack_master_image }}" + - "{{ openstack_infra_image }}" + - "{{ openstack_node_image }}" + - "{{ openstack_lb_image }}" + - "{{ openstack_etcd_image }}" + - "{{ openstack_dns_image }}" + loop_control: + loop_var: image + + # Check that custom flavors are available + - include: custom_flavor_check.yaml + with_items: + - "{{ master_flavor }}" + - "{{ infra_flavor }}" + - "{{ node_flavor }}" + - "{{ lb_flavor }}" + - "{{ etcd_flavor }}" + - "{{ dns_flavor }}" + loop_control: + loop_var: flavor -- cgit v1.2.3