From fcbe6fa671359ed31d732d662e37de4f81b2c1b5 Mon Sep 17 00:00:00 2001 From: Chris Krelle Date: Thu, 10 Dec 2015 10:30:19 -0800 Subject: [PATCH] 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 --- .../roles/bifrost-configdrives-dynamic/tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml b/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml index c3b40b3bf..f7f76c676 100644 --- a/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml @@ -70,6 +70,13 @@ set_fact: iso_gen_utility: "genisoimage" 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" become: yes command: "{{iso_gen_utility}} -R -V config-2 -o {{http_boot_folder}}/configdrive-{{ uuid }}.iso {{ variable_configdrive_location.stdout }}/{{ uuid }}"