Cleanup use of extra_dib_elements

Removed extra_dib_elements option from the disk image building role
and created a default variable entry in the installation and test
playbooks to allow a user to manually trigger the behavior.

Change-Id: I707f1fd25cf9a6cec4f70a6d65d89d4363d69153
This commit is contained in:
Julia Kreger 2015-07-27 14:52:33 -04:00
parent e52869e311
commit b555c8633b
4 changed files with 4 additions and 9 deletions

View File

@ -7,7 +7,7 @@
roles: roles:
- { role: bifrost-prep-for-install, when: skip_install is not defined } - { role: bifrost-prep-for-install, when: skip_install is not defined }
- ironic-install - ironic-install
- { role: bifrost-create-dib-image, dib_imagename: "{{ deploy_image }}", dib_imagetype: "qcow2", dib_os_element: "debian", dib_elements: "vm serial-console simple-init", when: create_image_via_dib == true and transform_boot_image == false } - { role: bifrost-create-dib-image, dib_imagename: "{{ deploy_image }}", dib_imagetype: "qcow2", dib_os_element: "debian", dib_elements: "vm serial-console simple-init {{ extra_dib_elements|default('') }}", when: create_image_via_dib == true and transform_boot_image == false }
- { role: bifrost-create-bootable-image, when: create_image_via_dib == false and transform_boot_image == true } - { role: bifrost-create-bootable-image, when: create_image_via_dib == false and transform_boot_image == true }
environment: environment:
http_proxy: "{{ lookup('env','http_proxy') }}" http_proxy: "{{ lookup('env','http_proxy') }}"

View File

@ -21,15 +21,12 @@ build_ramdisk: false
The dib_env_vars are settings for the diskimage-builder environment variables The dib_env_vars are settings for the diskimage-builder environment variables
which allow settings to be passed to elements that are being utilized to build which allow settings to be passed to elements that are being utilized to build
a disk image. More information on diskimage-builder can be found at a disk image. More information on diskimage-builder can be found at:
http://git.openstack.org/cgit/openstack/diskimage-builder/. Additionally, an http://git.openstack.org/cgit/openstack/diskimage-builder/
extra_dib_elements setting exists which is a space separated list of elements
to incorporate into the image.
dib_env_vars: dib_env_vars:
DIB_CLOUD_INIT_DATASOURCES: "ConfigDrive" DIB_CLOUD_INIT_DATASOURCES: "ConfigDrive"
ELEMENTS_PATH: "/opt/stack/diskimage-builder/elements" ELEMENTS_PATH: "/opt/stack/diskimage-builder/elements"
extra_dib_elements: ""
http_boot_folder, deploy_image_filename, and deploy_image all control the final http_boot_folder, deploy_image_filename, and deploy_image all control the final
destination of the built image. destination of the built image.

View File

@ -4,8 +4,6 @@ dib_env_vars:
ELEMENTS_PATH: "/opt/stack/diskimage-builder/elements" ELEMENTS_PATH: "/opt/stack/diskimage-builder/elements"
http_proxy: "{{ lookup('env','http_proxy') }}" http_proxy: "{{ lookup('env','http_proxy') }}"
https_proxy: "{{ lookup('env','https_proxy') }}" https_proxy: "{{ lookup('env','https_proxy') }}"
# extra_dib_elements is a space separated list of elements.
extra_dib_elements: ""
build_ramdisk: false build_ramdisk: false
dib_trace: false dib_trace: false
dib_uncompressed: false dib_uncompressed: false

View File

@ -50,7 +50,7 @@
- role: ironic-install - role: ironic-install
cleaning: false cleaning: false
testing: true testing: true
- { role: bifrost-create-dib-image, dib_imagetype: "qcow2", dib_imagename: "{{deploy_image}}", dib_os_element: "debian", dib_elements: "vm serial-console simple-init {{extra_dib_elements}}", when: create_image_via_dib == true and transform_boot_image == false } - { role: bifrost-create-dib-image, dib_imagetype: "qcow2", dib_imagename: "{{deploy_image}}", dib_os_element: "debian", dib_elements: "vm serial-console simple-init {{ extra_dib_elements|default('') }}", when: create_image_via_dib == true and transform_boot_image == false }
- { role: bifrost-create-bootable-image, when: create_image_via_dib == false and transform_boot_image == true } - { role: bifrost-create-bootable-image, when: create_image_via_dib == false and transform_boot_image == true }
environment: environment:
http_proxy: "{{ lookup('env','http_proxy') }}" http_proxy: "{{ lookup('env','http_proxy') }}"