From 543a4d88d9a648e937e965444ab8da374110fa3c Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Thu, 6 Dec 2018 15:35:04 +0200 Subject: [PATCH] Use full path for Azure playbook as well --- tests/cli/test_build_and_deploy_azure.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/cli/test_build_and_deploy_azure.sh b/tests/cli/test_build_and_deploy_azure.sh index f92690a0..56dd75c7 100755 --- a/tests/cli/test_build_and_deploy_azure.sh +++ b/tests/cli/test_build_and_deploy_azure.sh @@ -97,7 +97,8 @@ rlJournalStart rlRun -t -c "ssh-keygen -t rsa -N '' -f $SSH_KEY_DIR/id_rsa" SSH_PUB_KEY=`cat $SSH_KEY_DIR/id_rsa.pub` - cat > azure-playbook.yaml << __EOF__ + TMP_DIR=`mktemp -d /tmp/composer-azure.XXXXX` + cat > $TMP_DIR/azure-playbook.yaml << __EOF__ --- - hosts: localhost connection: local @@ -118,7 +119,7 @@ rlJournalStart resource_group: $AZURE_RESOURCE_GROUP __EOF__ - rlRun -t -c "ansible-playbook azure-playbook.yaml" + rlRun -t -c "ansible-playbook $TMP_DIR/azure-playbook.yaml" response=`ansible localhost -m azure_rm_virtualmachine -a "resource_group=$AZURE_RESOURCE_GROUP name=$VM_NAME"` rlAssert0 "Received VM info successfully" $? @@ -141,7 +142,7 @@ __EOF__ rlRun -t -c "ansible localhost -m azure_rm_image -a 'resource_group=$AZURE_RESOURCE_GROUP name=$OS_IMAGE_NAME state=absent'" rlRun -t -c "ansible localhost -m azure_rm_storageblob -a 'resource_group=$AZURE_RESOURCE_GROUP storage_account_name=$AZURE_STORAGE_ACCOUNT container=$AZURE_STORAGE_CONTAINER blob=$IMAGE state=absent'" rlRun -t -c "$CLI compose delete $UUID" - rlRun -t -c "rm -rf $IMAGE $SSH_KEY_DIR azure-playbook.yaml" + rlRun -t -c "rm -rf $IMAGE $SSH_KEY_DIR $TMP_DIR" rlPhaseEnd rlJournalEnd