Update embedded deployment settings for protocol

Since bifrost users may choose to modify their environments
in order to support HTTPS, we should enable the users to have
the ability to make that setting change for generated URLs.

Change-Id: I725bb365243baa00d41321db0c4bb1b0f8d99b2f
This commit is contained in:
Julia Kreger 2015-12-28 09:34:06 -05:00
parent b2c9d301a2
commit bd9633e604
3 changed files with 11 additions and 3 deletions

View File

@ -34,6 +34,12 @@ deploy_image_filename: This is the filename of the image to deploy, which is
expects to receive this information from the calling
playbook.
deploy_url_protocol: The protocol to utilize to access config_drive and
image_source files. The default is to utilize HTTP in
generated HTTP URLs for bifrost, however this setting
allows a user to change that default if they they have
a modified local webserver configuration.
deploy_image: This is the full path to the image to be deployed to the system.
This is as ironic requires the MD5 hash of the file to be
deployed for validation during the deployment process. As a

View File

@ -8,3 +8,5 @@ http_boot_folder: "/httpboot"
deploy_image_filename: "deployment_image.qcow2"
deploy_image: "{{http_boot_folder}}/{{deploy_image_filename}}"
inventory_dhcp: false
deploy_url_protocol: "http"

View File

@ -35,7 +35,7 @@
ironic_url: "{{ ironic_url }}"
uuid: "{{ uuid }}"
state: present
config_drive: "http://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{ nginx_port }}/configdrive-{{ uuid }}.iso.gz"
config_drive: "{{ deploy_url_protocol }}://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{ nginx_port }}/configdrive-{{ uuid }}.iso.gz"
instance_info: "{{ instance_info }}"
delegate_to: localhost
when: instance_info is defined and instance_info | to_json != '{}'
@ -53,9 +53,9 @@
ironic_url: "{{ ironic_url }}"
uuid: "{{ uuid }}"
state: present
config_drive: "http://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{ nginx_port }}/configdrive-{{ uuid }}.iso.gz"
config_drive: "{{ deploy_url_protocol }}://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{ nginx_port }}/configdrive-{{ uuid }}.iso.gz"
instance_info:
image_source: "http://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{ nginx_port }}/{{deploy_image_filename}}"
image_source: "{{ deploy_url_protocol }}://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{ nginx_port }}/{{deploy_image_filename}}"
image_checksum: "{{ test_deploy_image.stat.md5 }}"
image_disk_format: "qcow2"
root_gb: 10