From d587fd25ba3a65a57140e2a49ce135a180a4cc5d Mon Sep 17 00:00:00 2001 From: Chris Long Date: Mon, 29 Mar 2021 21:09:47 -0700 Subject: [PATCH] Fix typo in build_ansible_inventory.sh --- Azure/build_ansible_inventory.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Azure/build_ansible_inventory.sh b/Azure/build_ansible_inventory.sh index 8264038..25ad6c8 100755 --- a/Azure/build_ansible_inventory.sh +++ b/Azure/build_ansible_inventory.sh @@ -40,9 +40,9 @@ fi echo "Replacing the default values in DetectionLab/Azure/Ansible/inventory.yml..." sed -i.bak "s/x.x.x.x/$DC_IP/g; s/y.y.y.y/$WEF_IP/g; s/z.z.z.z/$WIN10_IP/g" ../Ansible/inventory.yml -if [ -z $EXCHANGE_IP ]; then +if [ ! -z $EXCHANGE_IP ]; then echo "Found Exchange IP address in Terraform output. Adding to inventory." - sed -i.bak "s/#exchange:/exchange:/g; s/# hosts:/ hosts:/g; s/# w.w.w.w:/ $EXCHANGE_IP/g" ../Ansible/inventory.yml + sed -i.bak "s/#exchange:/exchange:/g; s/# hosts:/ hosts:/g; s/# w.w.w.w/ $EXCHANGE_IP/g" ../Ansible/inventory.yml fi echo "Displaying the updated inventory.yml below!"