diff --git a/playbooks/roles/bifrost-ironic-install/defaults/main.yml b/playbooks/roles/bifrost-ironic-install/defaults/main.yml index 0697144e8..8646851b6 100644 --- a/playbooks/roles/bifrost-ironic-install/defaults/main.yml +++ b/playbooks/roles/bifrost-ironic-install/defaults/main.yml @@ -230,4 +230,3 @@ ironic_inspector: # TODO(TheJulia): Thinking outloud, I we ought to head in the # direction of identifying the address of the conductor host # in a more uniform fashion. What that is exactly, is TBD. -my_ip_address: "{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}" diff --git a/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml b/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml index a873f2484..e5299fccc 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml @@ -138,8 +138,13 @@ include: keystone_setup.yml when: enable_keystone is defined and enable_keystone | bool == true +# NOTE(pas-ha) needed to e.g. pick up new interfaces after libvirt install +- name: "Refresh facts" + setup: + - name: "Generate ironic Configuration" include: ironic_config.yml + - name: "Copy policy.json to /etc/ironic" copy: src: "{{ ironic_git_folder }}/etc/ironic/policy.json" diff --git a/playbooks/roles/bifrost-ironic-install/tasks/main.yml b/playbooks/roles/bifrost-ironic-install/tasks/main.yml index cd5aa845a..f728310c8 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/main.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/main.yml @@ -55,10 +55,6 @@ include: install.yml when: skip_package_install | bool != True -# NOTE(pas-ha) needed to e.g. pick up new interfaces after libvirt install -- name: "Refresh facts" - setup: - - name: "Bootstrap Ironic" include: bootstrap.yml when: skip_bootstrap | bool != True diff --git a/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 b/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 index d537dda22..ac5f6d339 100644 --- a/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 +++ b/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 @@ -29,18 +29,18 @@ auth_strategy = noauth [pxe] pxe_append_params = systemd.journald.forward_to_console=yes {{ extra_kernel_options | default('') }} pxe_config_template = $pybasedir/drivers/modules/ipxe_config.template -tftp_server = {{ my_ip_address }} +tftp_server = {{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }} tftp_root = /tftpboot pxe_bootfile_name = undionly.kpxe ipxe_enabled = true ipxe_boot_script = /etc/ironic/boot.ipxe [deploy] -http_url = http://{{ my_ip_address }}:{{ file_url_port }}/ +http_url = http://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{ file_url_port }}/ http_root = {{ http_boot_folder }} [conductor] -api_url = http://{{ my_ip_address }}:6385/ +api_url = http://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:6385/ clean_nodes = {{ cleaning | lower }} automated_clean = {{ cleaning | lower }}