diff --git a/playbooks/install.yaml b/playbooks/install.yaml index befbf92ad..95cbc484d 100644 --- a/playbooks/install.yaml +++ b/playbooks/install.yaml @@ -7,7 +7,7 @@ roles: - { role: bifrost-prep-for-install, when: skip_install is not defined } - 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 } environment: http_proxy: "{{ lookup('env','http_proxy') }}" diff --git a/playbooks/roles/bifrost-create-dib-image/README.md b/playbooks/roles/bifrost-create-dib-image/README.md index 22c0d92c1..33d89b37c 100644 --- a/playbooks/roles/bifrost-create-dib-image/README.md +++ b/playbooks/roles/bifrost-create-dib-image/README.md @@ -21,15 +21,12 @@ build_ramdisk: false 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 -a disk image. More information on diskimage-builder can be found at -http://git.openstack.org/cgit/openstack/diskimage-builder/. Additionally, an -extra_dib_elements setting exists which is a space separated list of elements -to incorporate into the image. +a disk image. More information on diskimage-builder can be found at: +http://git.openstack.org/cgit/openstack/diskimage-builder/ dib_env_vars: DIB_CLOUD_INIT_DATASOURCES: "ConfigDrive" ELEMENTS_PATH: "/opt/stack/diskimage-builder/elements" -extra_dib_elements: "" http_boot_folder, deploy_image_filename, and deploy_image all control the final destination of the built image. diff --git a/playbooks/roles/bifrost-create-dib-image/defaults/main.yml b/playbooks/roles/bifrost-create-dib-image/defaults/main.yml index 133a8f971..972175941 100644 --- a/playbooks/roles/bifrost-create-dib-image/defaults/main.yml +++ b/playbooks/roles/bifrost-create-dib-image/defaults/main.yml @@ -4,8 +4,6 @@ dib_env_vars: ELEMENTS_PATH: "/opt/stack/diskimage-builder/elements" http_proxy: "{{ lookup('env','http_proxy') }}" https_proxy: "{{ lookup('env','https_proxy') }}" -# extra_dib_elements is a space separated list of elements. -extra_dib_elements: "" build_ramdisk: false dib_trace: false dib_uncompressed: false diff --git a/playbooks/test-bifrost-dynamic.yaml b/playbooks/test-bifrost-dynamic.yaml index c74e417c7..342a44c78 100644 --- a/playbooks/test-bifrost-dynamic.yaml +++ b/playbooks/test-bifrost-dynamic.yaml @@ -50,7 +50,7 @@ - role: ironic-install cleaning: false 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 } environment: http_proxy: "{{ lookup('env','http_proxy') }}"