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
This commit is contained in:
Julia Kreger 2015-11-30 15:17:31 -05:00
parent caea075deb
commit de7a20c8c5
2 changed files with 9 additions and 2 deletions

View File

@ -422,8 +422,11 @@ Custom IPA images
Bifrost supports the ability for a user to build a custom IPA ramdisk Bifrost supports the ability for a user to build a custom IPA ramdisk
utilizing the diskimage-builder element "ironic-agent". In order to utilize utilizing the diskimage-builder element "ironic-agent". In order to utilize
this feature, the ``download_ipa`` setting must be set to ``false`` and the 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 create_ipa_image must be set to "true". By default, the install playbook will
a Debian based IPA image, if a pre-existing IPA image is not present on disk. 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 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`` custom hardware manager, you can pass the variable ``ipa_extra_dib_elements``

View File

@ -104,6 +104,10 @@
set_fact: set_fact:
dib_packages_arg: "-p {{dib_packages}}" dib_packages_arg: "-p {{dib_packages}}"
when: dib_packages is defined and 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" - name: "Set the DIB_RELEASE environment variable if set"
set_fact: set_fact:
dib_env_vars: "{{dib_env_vars | combine({'DIB_RELEASE':dib_os_release}) }}" dib_env_vars: "{{dib_env_vars | combine({'DIB_RELEASE':dib_os_release}) }}"