add check for genisoimage
This adds a check for the fallback image creation tool and fails the run if neither mkisofs and genisoimage are not found. Change-Id: Ide6cf68e378fb7e5823edb9b8aca88bbd8874d60
This commit is contained in:
parent
61850681ab
commit
fcbe6fa671
@ -70,6 +70,13 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
iso_gen_utility: "genisoimage"
|
iso_gen_utility: "genisoimage"
|
||||||
when: test_mkisofs.rc != 0
|
when: test_mkisofs.rc != 0
|
||||||
|
- name: "Check if genisoimage is available"
|
||||||
|
shell: genisoimage --help >>/dev/null
|
||||||
|
ignore_errors: yes
|
||||||
|
register: test_genisoimage
|
||||||
|
- name: "fail if genisoimage is not available."
|
||||||
|
fail: msg="Neither mkisofs or genisoimage is available. Cannot make config drive files."
|
||||||
|
when: test_genisoimage.rc != 0 and test_mkisofs.rc != 0
|
||||||
- name: "Make config drive files"
|
- name: "Make config drive files"
|
||||||
become: yes
|
become: yes
|
||||||
command: "{{iso_gen_utility}} -R -V config-2 -o {{http_boot_folder}}/configdrive-{{ uuid }}.iso {{ variable_configdrive_location.stdout }}/{{ uuid }}"
|
command: "{{iso_gen_utility}} -R -V config-2 -o {{http_boot_folder}}/configdrive-{{ uuid }}.iso {{ variable_configdrive_location.stdout }}/{{ uuid }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user