From e243715cd38c50175493c5c3cf06a1a14e7c9da9 Mon Sep 17 00:00:00 2001 From: Julian Edwards Date: Wed, 1 Feb 2017 10:54:08 +1000 Subject: [PATCH] Ensure swift facts get set on all hosts --- tasks/images.yml | 4 ++-- tasks/main.yml | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tasks/images.yml b/tasks/images.yml index 6a8c335a..6e21930d 100644 --- a/tasks/images.yml +++ b/tasks/images.yml @@ -94,7 +94,7 @@ image_is_public: True # when: ironic_dib_image_built | changed -- name: Upload DIB instance image to Glance # NOTE: Can't use the glance action as it doesn't support properties. -shell: "source /etc/metacloud/openrc.sh && openstack image create --public --disk-format qcow2 --container-format bare --property kernel_id={{ glance_images['ubuntu-kernel']['id'] }} --property ramdisk_id={{ glance_images['ubuntu-image.initrd']['id'] }} --file {{ ironic_bin | dirname }}/ubuntu-image.qcow2 ubuntu-image" +- name: Upload DIB instance image to Glance + shell: "source /etc/metacloud/openrc.sh && openstack image create --public --disk-format qcow2 --container-format bare --property kernel_id={{ glance_images['ubuntu-kernel']['id'] }} --property ramdisk_id={{ glance_images['ubuntu-image.initrd']['id'] }} --file {{ ironic_bin | dirname }}/ubuntu-image.qcow2 ubuntu-image" when: not glance_images['ubuntu-image'] is defined diff --git a/tasks/main.yml b/tasks/main.yml index 93cb2855..84ea1484 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -47,12 +47,11 @@ - ironic_oneview_enabled | bool - inventory_hostname in groups['ironic_conductor'] -- include: ironic_post_install.yml +- include: swift.yml tags: - ironic-config -- include: swift.yml - when: inventory_hostname in groups['ironic_conductor'][0] +- include: ironic_post_install.yml tags: - ironic-config