From 8c0328a4025a4d5f9cd649ae2d3614957a7138eb Mon Sep 17 00:00:00 2001 From: Kyriakos Oikonomakos Date: Fri, 10 Apr 2015 01:21:26 +0100 Subject: [PATCH] Sane default for template locations. Since the plan is to use bootstrap-cfn with template-deploy it makes sense to set the default location to be the location where template-deploy stores the yaml files. --- bootstrap_cfn/fab_tasks.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bootstrap_cfn/fab_tasks.py b/bootstrap_cfn/fab_tasks.py index ccedbea..e0327de 100644 --- a/bootstrap_cfn/fab_tasks.py +++ b/bootstrap_cfn/fab_tasks.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import os.path from StringIO import StringIO import sys import random @@ -16,21 +17,20 @@ from bootstrap_cfn.iam import IAM +# This is needed because pkgutil wont pick up modules +# imported in a fabfile. +path = env.real_fabfile or os.getcwd() +sys.path.append(os.path.dirname(path)) # GLOBAL VARIABLES env.application = None env.environment = None env.aws = None -env.config = None -env.password = None +env.config = os.path.join(path, 'cloudformation', 'template.yaml') +env.password = os.path.join(path, 'cloudformation', 'template-secrets.yaml') TIMEOUT = 3600 RETRY_INTERVAL = 10 -# This is needed because pkgutil wont pick up modules -# imported in a fabfile. -path = env.real_fabfile or os.getcwd() -sys.path.append(os.path.dirname(path)) - @task def aws(x):