summaryrefslogtreecommitdiffstats
path: root/playbooks/libvirt
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2017-07-24 11:15:37 -0500
committerDan Williams <dcbw@redhat.com>2017-07-24 11:17:25 -0500
commit04b1c99fd2b769979adf019fe064bc4ba601ef97 (patch)
tree639dd8bf7105cf98e093f83a761f9fd17e966ef9 /playbooks/libvirt
parentba980522331db061b7a342141d227b304caf586e (diff)
downloadopenshift-04b1c99fd2b769979adf019fe064bc4ba601ef97.tar.gz
openshift-04b1c99fd2b769979adf019fe064bc4ba601ef97.tar.bz2
openshift-04b1c99fd2b769979adf019fe064bc4ba601ef97.tar.xz
openshift-04b1c99fd2b769979adf019fe064bc4ba601ef97.zip
libvirt: fall back to mkisofs if genisoimage isn't available
Diffstat (limited to 'playbooks/libvirt')
-rw-r--r--playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml6
1 files changed, 5 insertions, 1 deletions
diff --git a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
index ccd29be29..f445206ef 100644
--- a/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/libvirt/openshift-cluster/tasks/launch_instances.yml
@@ -49,8 +49,12 @@
- '{{ instances }}'
- [ user-data, meta-data ]
+- name: Check for genisoimage
+ command: which genisoimage
+ register: which_genisoimage
+
- name: Create the cloud-init config drive
- command: 'genisoimage -output {{ libvirt_storage_pool_path }}/{{ item }}_cloud-init.iso -volid cidata -joliet -rock user-data meta-data'
+ command: '{{ 'genisoimage' if which_genisoimage.rc == 0 else 'mkisofs'}} -output {{ libvirt_storage_pool_path }}/{{ item }}_cloud-init.iso -volid cidata -joliet -rock user-data meta-data'
args:
chdir: '{{ libvirt_storage_pool_path }}/{{ item }}_configdrive/'
creates: '{{ libvirt_storage_pool_path }}/{{ item }}_cloud-init.iso'