summaryrefslogtreecommitdiffstats
path: root/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
diff options
context:
space:
mode:
authorPep TurrĂ³ Mauri <pep@redhat.com>2016-03-16 17:17:06 +0100
committerPep TurrĂ³ Mauri <pep@redhat.com>2016-03-16 17:21:17 +0100
commit74425eca1e738ca124ee2004ea5c7d6782ddbeb9 (patch)
tree4f01edf4e09f7fd34fc8ddd7fa27208db0a7066b /playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
parent4551e7cddf4a9d1756a064fd31777b6bed7d3567 (diff)
downloadopenshift-74425eca1e738ca124ee2004ea5c7d6782ddbeb9.tar.gz
openshift-74425eca1e738ca124ee2004ea5c7d6782ddbeb9.tar.bz2
openshift-74425eca1e738ca124ee2004ea5c7d6782ddbeb9.tar.xz
openshift-74425eca1e738ca124ee2004ea5c7d6782ddbeb9.zip
libvirt cluster variables cleanup
- Remove redundant variables and make existing ones configurable. - Fixes default values for the new vars introduced in #1578 (d4fa9b2) - Document these variables
Diffstat (limited to 'playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml')
-rw-r--r--playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml28
1 files changed, 14 insertions, 14 deletions
diff --git a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
index d77b80c62..937a765fa 100644
--- a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
@@ -13,58 +13,58 @@
get_url:
url: '{{ image_url }}'
sha256sum: '{{ image_sha256 }}'
- dest: '{{ os_libvirt_storage_pool_path }}/{{ [image_name, image_compression] | difference([""]) | join(".") }}'
+ dest: '{{ 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
- name: Uncompress xz compressed base cloud image
- command: 'unxz -kf {{ os_libvirt_storage_pool_path }}/{{ [image_name, image_compression] | join(".") }}'
+ command: 'unxz -kf {{ libvirt_storage_pool_path }}/{{ [image_name, image_compression] | join(".") }}'
args:
- creates: '{{ os_libvirt_storage_pool_path }}/{{ image_name }}'
+ creates: '{{ 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(".") }}'
+ command: 'tar zxvf {{ libvirt_storage_pool_path }}/{{ [image_name, image_compression] | join(".") }}'
args:
- creates: '{{ os_libvirt_storage_pool_path }}/{{ image_name }}'
+ creates: '{{ 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(".") }}'
+ command: 'gunzip {{ libvirt_storage_pool_path }}/{{ [image_name, image_compression] | join(".") }}'
args:
- creates: '{{ os_libvirt_storage_pool_path }}/{{ image_name }}'
+ creates: '{{ 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/'
+ dest: '{{ libvirt_storage_pool_path }}/{{ item }}_configdrive/'
state: directory
with_items: instances
- name: Create the cloud-init config drive files
template:
src: '{{ item[1] }}'
- dest: '{{ os_libvirt_storage_pool_path }}/{{ item[0] }}_configdrive/{{ item[1] }}'
+ dest: '{{ libvirt_storage_pool_path }}/{{ item[0] }}_configdrive/{{ item[1] }}'
with_nested:
- instances
- [ user-data, meta-data ]
- name: Create the cloud-init config drive
- command: 'genisoimage -output {{ os_libvirt_storage_pool_path }}/{{ item }}_cloud-init.iso -volid cidata -joliet -rock user-data meta-data'
+ command: 'genisoimage -output {{ libvirt_storage_pool_path }}/{{ item }}_cloud-init.iso -volid cidata -joliet -rock user-data meta-data'
args:
- chdir: '{{ os_libvirt_storage_pool_path }}/{{ item }}_configdrive/'
- creates: '{{ os_libvirt_storage_pool_path }}/{{ item }}_cloud-init.iso'
+ chdir: '{{ libvirt_storage_pool_path }}/{{ item }}_configdrive/'
+ creates: '{{ libvirt_storage_pool_path }}/{{ item }}_cloud-init.iso'
with_items: instances
- name: Refresh the libvirt storage pool for openshift
command: 'virsh -c {{ libvirt_uri }} pool-refresh {{ libvirt_storage_pool }}'
- 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'
+ command: 'virsh -c {{ libvirt_uri }} vol-create-as {{ 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'
+ command: 'virsh -c {{ libvirt_uri }} vol-create-as {{ libvirt_storage_pool }} {{ item }}-docker.qcow2 10G --format qcow2 --allocation 0'
with_items: instances
- name: Create VMs