diff --git a/playbooks/roles/bifrost-deploy-nodes-dynamic/README.md b/playbooks/roles/bifrost-deploy-nodes-dynamic/README.md index 54d1d7698..2c542d51f 100644 --- a/playbooks/roles/bifrost-deploy-nodes-dynamic/README.md +++ b/playbooks/roles/bifrost-deploy-nodes-dynamic/README.md @@ -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 diff --git a/playbooks/roles/bifrost-deploy-nodes-dynamic/defaults/main.yml b/playbooks/roles/bifrost-deploy-nodes-dynamic/defaults/main.yml index deb9638e7..039cc117d 100644 --- a/playbooks/roles/bifrost-deploy-nodes-dynamic/defaults/main.yml +++ b/playbooks/roles/bifrost-deploy-nodes-dynamic/defaults/main.yml @@ -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" diff --git a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml index c3e3bb1e0..46653d10b 100644 --- a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml @@ -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