Make the network_data search more inclusive

It's possible to also use --networks-file instead of
-n in the overcloud deploy command. This change adds
a secondary search string to the awk command to ensure
we capture the file regardless of which argument has
been used in the overcloud deploy script.

Resolves: rhbz#2064354

Change-Id: I2387d508f9dc91dc71c19ae3625fe093d33c2bc0
This commit is contained in:
Brendan Shephard 2022-03-16 12:06:00 +10:00
parent 3992d768e9
commit 4958251d91
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@
- name: get network-data-file
shell: |
awk '/-n\s/ {gsub(/[[:space:]]/, "", $2); print $2}' {{ overcloud_deploy_script }}
awk '/-n\s/ || /--networks-file\s/ {gsub(/[[:space:]]/, "", $2); print $2}' {{ overcloud_deploy_script }}
register: network_data_file
- name: set network_data_file fact