From c4e6afae2caf5ed1ee587fe1d60798afd7fd9cac Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Sun, 2 Apr 2017 04:41:40 +0000 Subject: [PATCH] Cleanup minor variable redefinition Attempting to support a context where network_interface may be replaced, the variable redefinition appears to not handle the possibility well, and as a result fails. Replaced previously constructed variable with the string replacement on each additional variable that is generated for execution. Change-Id: I6876298e28b6ceea2e226cda7e77317acc05d95c --- playbooks/roles/ironic-enroll-dynamic/defaults/main.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/playbooks/roles/ironic-enroll-dynamic/defaults/main.yml b/playbooks/roles/ironic-enroll-dynamic/defaults/main.yml index 51acc7f6f..87892e464 100644 --- a/playbooks/roles/ironic-enroll-dynamic/defaults/main.yml +++ b/playbooks/roles/ironic-enroll-dynamic/defaults/main.yml @@ -3,7 +3,6 @@ ironic_url: "http://localhost:6385/" file_url_port: "8080" # Default network interface that bifrost will be attached to. network_interface: "virbr0" -ans_network_interface: "{{ network_interface | replace('-', '_') }}" # Normally this would setting would be http in a bifrost installation # without TLS. This setting allows a user to override the setting in case @@ -12,7 +11,7 @@ ans_network_interface: "{{ network_interface | replace('-', '_') }}" # documentation at http://ipxe.org/crypto ipa_file_protocol: "http" -ipa_kernel_url: "{{ ipa_file_protocol }}://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{file_url_port}}/ipa.vmlinuz" -ipa_ramdisk_url: "{{ ipa_file_protocol }}://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{file_url_port}}/ipa.initramfs" +ipa_kernel_url: "{{ ipa_file_protocol }}://{{ hostvars[inventory_hostname]['ansible_' + network_interface | replace('-', '_')]['ipv4']['address'] }}:{{file_url_port}}/ipa.vmlinuz" +ipa_ramdisk_url: "{{ ipa_file_protocol }}://{{ hostvars[inventory_hostname]['ansible_' + network_interface | replace('-', '_')]['ipv4']['address'] }}:{{file_url_port}}/ipa.initramfs" noauth_mode: true