From 50780ba07f99ae41cca9c010b699c331e644d4f6 Mon Sep 17 00:00:00 2001 From: Chris Hultin Date: Wed, 6 Jul 2016 11:24:30 -0500 Subject: [PATCH] Fixing issues with Glance image upload function On first run, multiple images were being uploaded with the same name. This patch limits the task to the first Magnum container to prevent this. Additionally, the Glance client was not installed on the server, thus resulting in an error when attemping to upload the image. This is now included in the magnum_requires_pip_packages variable. Change-Id: I03183881390fe98b492b010b7627d5a444a7d7b3 --- defaults/main.yml | 1 + tasks/post-install.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 2b3808cc..0f79751a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -98,6 +98,7 @@ magnum_glance_images: [] magnum_requires_pip_packages: - httplib2 + - python-glanceclient - python-keystoneclient - virtualenv - virtualenv-tools diff --git a/tasks/post-install.yml b/tasks/post-install.yml index 419fcb69..93938d34 100644 --- a/tasks/post-install.yml +++ b/tasks/post-install.yml @@ -52,3 +52,4 @@ insecure: "{{ keystone_service_internaluri_insecure }}" openrc_path: /root/openrc with_items: "{{ magnum_glance_images }}" + when: inventory_hostname == groups['magnum_all'][0]