summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2015-10-05 09:26:52 -0400
committerThomas Wiest <twiest@users.noreply.github.com>2015-10-05 09:26:52 -0400
commit7918909dc7c6877a4ce2b9fab830d0c41c1c92fd (patch)
tree5dc2cb028bddf76e98ff53d333535212d6fd8b3b /bin
parentc443f3fc1b901b72a58e0e28b5a280cec205cbbd (diff)
parent59fb7879501d702bb78a1d79326408b115a63c90 (diff)
downloadopenshift-7918909dc7c6877a4ce2b9fab830d0c41c1c92fd.tar.gz
openshift-7918909dc7c6877a4ce2b9fab830d0c41c1c92fd.tar.bz2
openshift-7918909dc7c6877a4ce2b9fab830d0c41c1c92fd.tar.xz
openshift-7918909dc7c6877a4ce2b9fab830d0c41c1c92fd.zip
Merge pull request #641 from menren/gce-support
GCE support
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cluster12
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/cluster b/bin/cluster
index 582327415..0e305141f 100755
--- a/bin/cluster
+++ b/bin/cluster
@@ -142,10 +142,14 @@ class Cluster(object):
"""
config = ConfigParser.ConfigParser()
if 'gce' == provider:
- config.readfp(open('inventory/gce/hosts/gce.ini'))
-
- for key in config.options('gce'):
- os.environ[key] = config.get('gce', key)
+ gce_ini_default_path = os.path.join(
+ 'inventory/gce/hosts/gce.ini')
+ gce_ini_path = os.environ.get('GCE_INI_PATH', gce_ini_default_path)
+ if os.path.exists(gce_ini_path):
+ config.readfp(open(gce_ini_path))
+
+ for key in config.options('gce'):
+ os.environ[key] = config.get('gce', key)
inventory = '-i inventory/gce/hosts'
elif 'aws' == provider: