Fix Browbeat Inventory file for OSP17.

The command "tripleo-ansible-inventory" has been deprecated with OSP17.

Change-Id: I0c65d03e3b1e990b2cf9aefaefe710dd7d58358d
This commit is contained in:
Ketan 2022-07-27 20:39:33 +05:30
parent 96ce2c8686
commit bb016a5e19

View File

@ -43,7 +43,11 @@ if [ -z "$tripleo_ip_address" ]; then
fi
out_file="hosts.yml"
if [ $uncomment_localhost ]; then
version=$(grep -o 17 /etc/rhosp-release)
if [ "$version" = "17" ]; then
cp ~/overcloud-deploy/overcloud/tripleo-ansible-inventory.yaml ${out_file}
elif ([ $uncomment_localhost ] && [ "$version" != "17" ]); then
source ~/stackrc
tripleo-ansible-inventory --stack ${overcloud_stack_name} --static-yaml-inventory ${out_file}
else