From de7a20c8c53c5a04542519faaf66f8985c094924 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Mon, 30 Nov 2015 15:17:31 -0500 Subject: [PATCH] Change DIB role to default to Debian jessie In the event that Debian is selected or defaulted to for an image build operation, then that image should be jessie based. Added logic to check and set if so, and permit user override. Change-Id: I2c54cd4ec11fe85c246c25c3bcc219a22ef26b12 --- README.rst | 7 +++++-- playbooks/roles/bifrost-create-dib-image/tasks/main.yml | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 32eccfecc..3188912fa 100644 --- a/README.rst +++ b/README.rst @@ -422,8 +422,11 @@ Custom IPA images Bifrost supports the ability for a user to build a custom IPA ramdisk utilizing the diskimage-builder element "ironic-agent". In order to utilize this feature, the ``download_ipa`` setting must be set to ``false`` and the -create_ipa_image must be set to "true". By default, the playbook will build -a Debian based IPA image, if a pre-existing IPA image is not present on disk. +create_ipa_image must be set to "true". By default, the install playbook will +build a Debian jessie based IPA image, if a pre-existing IPA image is not +present on disk. If you wish to explicitly set a specific release to be +passed to diskimage-create, then the setting ``dib_os_release`` can be set in +addition to ``dib_os_element``. If you wish to include an extra element into the IPA disk image, such as a custom hardware manager, you can pass the variable ``ipa_extra_dib_elements`` diff --git a/playbooks/roles/bifrost-create-dib-image/tasks/main.yml b/playbooks/roles/bifrost-create-dib-image/tasks/main.yml index e077bf7d6..485be87ef 100644 --- a/playbooks/roles/bifrost-create-dib-image/tasks/main.yml +++ b/playbooks/roles/bifrost-create-dib-image/tasks/main.yml @@ -104,6 +104,10 @@ set_fact: dib_packages_arg: "-p {{dib_packages}}" when: dib_packages is defined and dib_packages != "" +- name: "Set default of Debian Jessie if building debian and not explicitly set, overwride with dib_os_release setting" + set_fact: + dib_os_release: "jessie" + when: dib_os_element == "debian" and dib_os_release is undefined - name: "Set the DIB_RELEASE environment variable if set" set_fact: dib_env_vars: "{{dib_env_vars | combine({'DIB_RELEASE':dib_os_release}) }}"