From 4ed9aef6f8ed0850e70b498e780d0d8e22bc277f Mon Sep 17 00:00:00 2001 From: Tomas Sedovic Date: Mon, 23 Oct 2017 12:57:29 +0200 Subject: Add openshift_openstack role and move tasks there All the tasks that were previously in playbooks are now under `roles/openshift_openstack`. The `openshift-cluster` directory now only contains playbooks that include tasks from that role. This makes the structure much closer to that of the AWS provider. --- roles/openshift_openstack/tasks/custom_image_check.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 roles/openshift_openstack/tasks/custom_image_check.yaml (limited to 'roles/openshift_openstack/tasks/custom_image_check.yaml') diff --git a/roles/openshift_openstack/tasks/custom_image_check.yaml b/roles/openshift_openstack/tasks/custom_image_check.yaml new file mode 100644 index 000000000..4fbd6a687 --- /dev/null +++ b/roles/openshift_openstack/tasks/custom_image_check.yaml @@ -0,0 +1,10 @@ +--- +- name: Try to get image facts + os_image_facts: + image: "{{ image }}" + register: image_result + +- name: Check that custom image is available + assert: + that: "image_result.ansible_facts.openstack_image" + msg: "Image {{ image }} is not available." -- cgit v1.2.1 From bde35d577f4ccb786a65a84142fabe90eb903599 Mon Sep 17 00:00:00 2001 From: Tomas Sedovic Date: Thu, 2 Nov 2017 10:15:42 +0100 Subject: Use the default `item` loop variable for checks --- roles/openshift_openstack/tasks/custom_image_check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'roles/openshift_openstack/tasks/custom_image_check.yaml') 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." -- cgit v1.2.1