summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Sedovic <tomas@sedovic.cz>2017-11-02 10:15:42 +0100
committerTomas Sedovic <tomas@sedovic.cz>2017-11-07 14:35:47 +1100
commitbde35d577f4ccb786a65a84142fabe90eb903599 (patch)
tree33c2e622701348b8d5d90a88749e2acee6d7d092
parentf462e7a682cb65085864d7eff4b7898fe8555a75 (diff)
downloadopenshift-bde35d577f4ccb786a65a84142fabe90eb903599.tar.gz
openshift-bde35d577f4ccb786a65a84142fabe90eb903599.tar.bz2
openshift-bde35d577f4ccb786a65a84142fabe90eb903599.tar.xz
openshift-bde35d577f4ccb786a65a84142fabe90eb903599.zip
Use the default `item` loop variable for checks
-rw-r--r--roles/openshift_openstack/tasks/check-prerequisites.yml16
-rw-r--r--roles/openshift_openstack/tasks/custom_flavor_check.yaml5
-rw-r--r--roles/openshift_openstack/tasks/custom_image_check.yaml4
3 files changed, 11 insertions, 14 deletions
diff --git a/roles/openshift_openstack/tasks/check-prerequisites.yml b/roles/openshift_openstack/tasks/check-prerequisites.yml
index 13000e31f..a91e60640 100644
--- a/roles/openshift_openstack/tasks/check-prerequisites.yml
+++ b/roles/openshift_openstack/tasks/check-prerequisites.yml
@@ -93,17 +93,13 @@
- "{{ 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
+ - "{{ openstack_master_flavor }}"
+ - "{{ openstack_infra_flavor }}"
+ - "{{ openstack_node_flavor }}"
+ - "{{ openstack_lb_flavor }}"
+ - "{{ openstack_etcd_flavor }}"
+ - "{{ openstack_dns_flavor }}"
diff --git a/roles/openshift_openstack/tasks/custom_flavor_check.yaml b/roles/openshift_openstack/tasks/custom_flavor_check.yaml
index e11874c28..5fb7a76ff 100644
--- a/roles/openshift_openstack/tasks/custom_flavor_check.yaml
+++ b/roles/openshift_openstack/tasks/custom_flavor_check.yaml
@@ -1,9 +1,10 @@
---
- name: Try to get flavor facts
os_flavor_facts:
- name: "{{ flavor }}"
+ name: "{{ item }}"
register: flavor_result
+
- name: Check that custom flavor is available
assert:
that: "flavor_result.ansible_facts.openstack_flavors"
- msg: "Flavor {{ flavor }} is not available."
+ msg: "Flavor {{ item }} is not available."
diff --git a/roles/openshift_openstack/tasks/custom_image_check.yaml b/roles/openshift_openstack/tasks/custom_image_check.yaml
index 4fbd6a687..4ae163406 100644
--- a/roles/openshift_openstack/tasks/custom_image_check.yaml
+++ b/roles/openshift_openstack/tasks/custom_image_check.yaml
@@ -1,10 +1,10 @@
---
- name: Try to get image facts
os_image_facts:
- image: "{{ image }}"
+ image: "{{ item }}"
register: image_result
- name: Check that custom image is available
assert:
that: "image_result.ansible_facts.openstack_image"
- msg: "Image {{ image }} is not available."
+ msg: "Image {{ item }} is not available."