summaryrefslogtreecommitdiffstats
path: root/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2016-03-09 12:19:05 -0500
committerJason DeTiberus <jdetiber@redhat.com>2016-03-10 08:37:57 -0500
commitd4fa9b230d32fa11fafeab0cf347764108ab674a (patch)
tree84ae4e8f122e0e5e2e363c28e0a64f09af723b8b /playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
parentc9301aa9682846a35dac6948cc0efb5d4628a3ad (diff)
downloadopenshift-d4fa9b230d32fa11fafeab0cf347764108ab674a.tar.gz
openshift-d4fa9b230d32fa11fafeab0cf347764108ab674a.tar.bz2
openshift-d4fa9b230d32fa11fafeab0cf347764108ab674a.tar.xz
openshift-d4fa9b230d32fa11fafeab0cf347764108ab674a.zip
Libvirt provider fixes
- Use difference filter instead of reject/equalto - add ability to override vcpu and memory config for vms - add a dedicated drive for docker storage
Diffstat (limited to 'playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml')
-rw-r--r--playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml8
1 files changed, 6 insertions, 2 deletions
diff --git a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
index b00352539..d77b80c62 100644
--- a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
@@ -13,7 +13,7 @@
get_url:
url: '{{ image_url }}'
sha256sum: '{{ image_sha256 }}'
- dest: '{{ os_libvirt_storage_pool_path }}/{{ [image_name, image_compression] | reject("equalto", "") | join(".") }}'
+ dest: '{{ os_libvirt_storage_pool_path }}/{{ [image_name, image_compression] | difference([""]) | join(".") }}'
when: '{{ ( lookup("oo_option", "skip_image_download") | default("no", True) | lower ) in ["false", "no"] }}'
register: downloaded_image
@@ -59,10 +59,14 @@
- name: Refresh the libvirt storage pool for openshift
command: 'virsh -c {{ libvirt_uri }} pool-refresh {{ libvirt_storage_pool }}'
-- name: Create VMs drives
+- name: Create VM drives
command: 'virsh -c {{ libvirt_uri }} vol-create-as {{ os_libvirt_storage_pool }} {{ item }}.qcow2 10G --format qcow2 --backing-vol {{ image_name }} --backing-vol-format qcow2'
with_items: instances
+- name: Create VM docker drives
+ command: 'virsh -c {{ libvirt_uri }} vol-create-as {{ os_libvirt_storage_pool }} {{ item }}-docker.qcow2 10G --format qcow2 --allocation 0'
+ with_items: instances
+
- name: Create VMs
virt:
name: '{{ item }}'