summaryrefslogtreecommitdiffstats
path: root/bin/cluster
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2015-10-12 14:37:44 -0400
committerThomas Wiest <twiest@users.noreply.github.com>2015-10-12 14:37:44 -0400
commit35476982e1d0dc1851c102ab3b6aec0b9b6a1637 (patch)
tree0d7de94740f3fafe9eeb9754d5d438036f35e15a /bin/cluster
parent8e776b09cb38c6f02aa4b3c75c9343e73fb96691 (diff)
parenta8171a639bd4500f30e72233587e9f6335202438 (diff)
downloadopenshift-35476982e1d0dc1851c102ab3b6aec0b9b6a1637.tar.gz
openshift-35476982e1d0dc1851c102ab3b6aec0b9b6a1637.tar.bz2
openshift-35476982e1d0dc1851c102ab3b6aec0b9b6a1637.tar.xz
openshift-35476982e1d0dc1851c102ab3b6aec0b9b6a1637.zip
Merge pull request #658 from menren/gce-support
GCE-support
Diffstat (limited to 'bin/cluster')
-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: