diff --git a/tasks/common/auxilary-facts.yaml b/tasks/common/auxilary-facts.yaml index 31dbd788..26b0e79d 100644 --- a/tasks/common/auxilary-facts.yaml +++ b/tasks/common/auxilary-facts.yaml @@ -16,6 +16,15 @@ set_fact: deployment_with_ha_upstream: "{{ is_upstream.rc == 0 and pacemaker_present.rc == 0 }}" +- name: get network-data-file + shell: | + awk '/-n\s/ {gsub(/[[:space:]]/, "", $2); print $2}' {{ overcloud_deploy_script }} + register: network_data_file + +- name: set network_data_file fact + set_fact: + network_data_file: "{{ network_data_file.stdout }}" + - name: get env files used during deploy shell: | awk '/-e\s|--environment-file\s/ {gsub(/[[:space:]]/, "", $2); print $2}' {{ overcloud_deploy_script }} diff --git a/templates/overcloud_update_converge.sh.j2 b/templates/overcloud_update_converge.sh.j2 index ff488fe5..fba9048e 100644 --- a/templates/overcloud_update_converge.sh.j2 +++ b/templates/overcloud_update_converge.sh.j2 @@ -25,6 +25,9 @@ openstack overcloud update converge \ --disable-validations \ --deployed-server \ {% endif -%} + {% if network_data_file|length >0 -%} + -n {{ network_data_file }} \ + {% endif -%} {% if initial_env_file is defined and initial_env_file.stdout_lines|length > 0 -%} {% for _env in initial_env_file.stdout_lines -%} -e {{ _env }} \ diff --git a/templates/overcloud_update_prepare.sh.j2 b/templates/overcloud_update_prepare.sh.j2 index e9f6bc5c..856313dd 100644 --- a/templates/overcloud_update_prepare.sh.j2 +++ b/templates/overcloud_update_prepare.sh.j2 @@ -22,6 +22,9 @@ openstack overcloud update prepare --templates {{ tht_directory }} \ {% if tripleo_upgrade_validations_non_fatal|bool -%} --validation-errors-nonfatal \ {% endif -%} + {% if network_data_file|length >0 -%} + -n {{ network_data_file }} \ + {% endif -%} {% if initial_env_file is defined and initial_env_file.stdout_lines|length > 0 -%} {% for _env in initial_env_file.stdout_lines -%} -e {{ _env }} \ diff --git a/templates/overcloud_upgrade_converge.sh.j2 b/templates/overcloud_upgrade_converge.sh.j2 index 6e8ec0f0..2b1a02c7 100644 --- a/templates/overcloud_upgrade_converge.sh.j2 +++ b/templates/overcloud_upgrade_converge.sh.j2 @@ -48,6 +48,9 @@ openstack overcloud {% if ffu_overcloud_upgrade %} ffwd-upgrade {% else %} upgra --disable-validations \ --deployed-server \ {% endif -%} + {% if network_data_file|length >0 -%} + -n {{ network_data_file }} \ + {% endif -%} {% if initial_env_file is defined and initial_env_file.stdout_lines|length > 0 -%} {% for _env in initial_env_file.stdout_lines|difference(old_img|default([])) -%} -e {{ _env }} \ diff --git a/templates/overcloud_upgrade_prepare.sh.j2 b/templates/overcloud_upgrade_prepare.sh.j2 index e411e764..ae3a5759 100644 --- a/templates/overcloud_upgrade_prepare.sh.j2 +++ b/templates/overcloud_upgrade_prepare.sh.j2 @@ -25,6 +25,9 @@ openstack overcloud{% if ffu_overcloud_upgrade %} ffwd-upgrade {% else %} upgrad --disable-validations \ --deployed-server \ {% endif -%} + {% if network_data_file|length >0 -%} + -n {{ network_data_file }} \ + {% endif -%} {% if initial_env_file is defined and initial_env_file.stdout_lines|length > 0 -%} {% for _env in initial_env_file.stdout_lines|difference(old_img|default([])) -%} -e {{ _env }} \