fix handling no environement file
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
d4e7d2bea0
commit
933b631739
|
@ -8,8 +8,11 @@ import sys
|
|||
|
||||
def _tf_env():
|
||||
# way to figure out currenly used TF workspace
|
||||
with open(TERRAFORM_ENV) as f:
|
||||
return f.read()
|
||||
try:
|
||||
with open(TERRAFORM_ENV) as f:
|
||||
return f.read()
|
||||
except:
|
||||
return 'default'
|
||||
|
||||
TERRAFORM_PATH = os.environ.get('ANSIBLE_TF_BIN', 'terraform')
|
||||
TERRAFORM_DIR = os.environ.get('ANSIBLE_TF_DIR', os.getcwd())
|
||||
|
|
Loading…
Reference in New Issue