From aa52ca9e12267ce5cf43ebde4782ed6f2fc57150 Mon Sep 17 00:00:00 2001 From: Jonathan Steffan Date: Sun, 22 Nov 2015 19:51:21 -0700 Subject: Update for latest CentOS-7-x86_64-GenericCloud. - Use xz compressed image - Update sha256 for new image - Update docs to reflect new settings --- playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'playbooks/libvirt/openshift-cluster/tasks') diff --git a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml index 4825207c9..e1e552c36 100644 --- a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml +++ b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml @@ -13,8 +13,15 @@ get_url: url: '{{ image_url }}' sha256sum: '{{ image_sha256 }}' - dest: '{{ os_libvirt_storage_pool_path }}/{{ image_name }}' + dest: '{{ os_libvirt_storage_pool_path }}/{{ [image_name, image_compression] | join(".") }}' when: '{{ ( lookup("oo_option", "skip_image_download") | default("no", True) | lower ) in ["false", "no"] }}' + register: downloaded_image + +- name: Uncompress Base Cloud image + command: 'unxz -kf {{ os_libvirt_storage_pool_path }}/{{ image_name }}.{{ image_compression }}' + args: + creates: '{{ os_libvirt_storage_pool_path }}/{{ image_name }}' + when: image_compression in ["xz"] and downloaded_image.changed - name: Create the cloud-init config drive path file: -- cgit v1.2.3 From a69aedf1f23b3e1927ce81378ec5e07d8aa6c9fc Mon Sep 17 00:00:00 2001 From: Jonathan Steffan Date: Sun, 22 Nov 2015 19:57:53 -0700 Subject: Use join for the uncompress command. --- playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'playbooks/libvirt/openshift-cluster/tasks') diff --git a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml index e1e552c36..f26b41f31 100644 --- a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml +++ b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml @@ -18,7 +18,7 @@ register: downloaded_image - name: Uncompress Base Cloud image - command: 'unxz -kf {{ os_libvirt_storage_pool_path }}/{{ image_name }}.{{ image_compression }}' + command: 'unxz -kf {{ os_libvirt_storage_pool_path }}/{{ [image_name, image_compression] | join(".") }}' args: creates: '{{ os_libvirt_storage_pool_path }}/{{ image_name }}' when: image_compression in ["xz"] and downloaded_image.changed -- cgit v1.2.3