summaryrefslogtreecommitdiffstats
path: root/playbooks/libvirt
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2016-02-04 09:52:56 -0500
committerThomas Wiest <twiest@users.noreply.github.com>2016-02-04 09:52:56 -0500
commitc7af710e34d83e5e52ccde6b501e1f3ea740dab8 (patch)
tree39278b42a44f0ca26c02b738203b8a943a0c227e /playbooks/libvirt
parent73ab565d036b6f3c8777d305fdc1a5029b097f88 (diff)
parent903de6ce16399c532e86fa061fa402194c62bd5f (diff)
downloadopenshift-c7af710e34d83e5e52ccde6b501e1f3ea740dab8.tar.gz
openshift-c7af710e34d83e5e52ccde6b501e1f3ea740dab8.tar.bz2
openshift-c7af710e34d83e5e52ccde6b501e1f3ea740dab8.tar.xz
openshift-c7af710e34d83e5e52ccde6b501e1f3ea740dab8.zip
Merge pull request #1088 from akram/allow_no_compression_for_qcow_image
Allow compression option to be set to empty for non compressed images
Diffstat (limited to 'playbooks/libvirt')
-rw-r--r--playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml16
-rw-r--r--playbooks/libvirt/openshift-cluster/vars.yml3
2 files changed, 17 insertions, 2 deletions
diff --git a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
index ff1cedc94..ebe9f0ad9 100644
--- a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
@@ -13,16 +13,28 @@
get_url:
url: '{{ image_url }}'
sha256sum: '{{ image_sha256 }}'
- dest: '{{ os_libvirt_storage_pool_path }}/{{ [image_name, image_compression] | join(".") }}'
+ dest: '{{ os_libvirt_storage_pool_path }}/{{ [image_name, image_compression] | reject("equalto", "") | join(".") }}'
when: '{{ ( lookup("oo_option", "skip_image_download") | default("no", True) | lower ) in ["false", "no"] }}'
register: downloaded_image
-- name: Uncompress Base Cloud image
+- name: Uncompress xz compressed base cloud image
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
+- name: Uncompress tgz compressed base cloud image
+ command: 'tar zxvf {{ os_libvirt_storage_pool_path }}/{{ [image_name, image_compression] | join(".") }}'
+ args:
+ creates: '{{ os_libvirt_storage_pool_path }}/{{ image_name }}'
+ when: image_compression in ["tgz"] and downloaded_image.changed
+
+- name: Uncompress gzip compressed base cloud image
+ command: 'gunzip {{ os_libvirt_storage_pool_path }}/{{ [image_name, image_compression] | join(".") }}'
+ args:
+ creates: '{{ os_libvirt_storage_pool_path }}/{{ image_name }}'
+ when: image_compression in ["gz"] and downloaded_image.changed
+
- name: Create the cloud-init config drive path
file:
dest: '{{ os_libvirt_storage_pool_path }}/{{ item }}_configdrive/'
diff --git a/playbooks/libvirt/openshift-cluster/vars.yml b/playbooks/libvirt/openshift-cluster/vars.yml
index da628786b..c78b52867 100644
--- a/playbooks/libvirt/openshift-cluster/vars.yml
+++ b/playbooks/libvirt/openshift-cluster/vars.yml
@@ -15,6 +15,7 @@ deployment_rhel7_ent_base:
default('rhel-guest-image-7.2-20151102.0.x86_64.qcow2', True) }}"
sha256: "{{ lookup('oo_option', 'image_sha256') |
default('25f880767ec6bf71beb532e17f1c45231640bbfdfbbb1dffb79d2c1b328388e0', True) }}"
+ compression: ""
ssh_user: openshift
sudo: yes
@@ -41,3 +42,5 @@ deployment_vars:
enterprise: "{{ deployment_rhel7_ent_base }}"
openshift-enterprise: "{{ deployment_rhel7_ent_base }}"
atomic-enterprise: "{{ deployment_rhel7_ent_base }}"
+
+