summaryrefslogtreecommitdiffstats
path: root/utils/src/ooinstall
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-08-03 14:34:54 -0400
committerGitHub <noreply@github.com>2016-08-03 14:34:54 -0400
commitfdb012e7f930e3a037a7b434db5b1ac310739f8f (patch)
treedf79d7c53bcf90858bbf1d74c195c2689cbdfd9e /utils/src/ooinstall
parent71bc6b9a67d83c0618ac9a786a6cb0d1abd907da (diff)
parentbb7de7e23654a7611c5be77dc6565e10435260fe (diff)
downloadopenshift-fdb012e7f930e3a037a7b434db5b1ac310739f8f.tar.gz
openshift-fdb012e7f930e3a037a7b434db5b1ac310739f8f.tar.bz2
openshift-fdb012e7f930e3a037a7b434db5b1ac310739f8f.tar.xz
openshift-fdb012e7f930e3a037a7b434db5b1ac310739f8f.zip
Merge pull request #2254 from smunilla/arbitrary_deployment_vars
a-o-i: Allow Arbitrary Deployment Variables
Diffstat (limited to 'utils/src/ooinstall')
-rw-r--r--utils/src/ooinstall/oo_config.py24
1 files changed, 11 insertions, 13 deletions
diff --git a/utils/src/ooinstall/oo_config.py b/utils/src/ooinstall/oo_config.py
index e37892c9b..69ad2b4c5 100644
--- a/utils/src/ooinstall/oo_config.py
+++ b/utils/src/ooinstall/oo_config.py
@@ -17,11 +17,9 @@ CONFIG_PERSIST_SETTINGS = [
'variant_version',
]
-DEPLOYMENT_PERSIST_SETTINGS = [
- 'master_routingconfig_subdomain',
- 'proxy_http',
- 'proxy_https',
- 'proxy_exclude_hosts',
+DEPLOYMENT_VARIABLES_BLACKLIST = [
+ 'hosts',
+ 'roles',
]
DEFAULT_REQUIRED_FACTS = ['ip', 'public_ip', 'hostname', 'public_hostname']
@@ -191,10 +189,11 @@ class OOConfig(object):
except KeyError:
continue
- for setting in DEPLOYMENT_PERSIST_SETTINGS:
+ for setting in loaded_config['deployment']:
try:
- self.deployment.variables[setting] = \
- str(loaded_config['deployment'][setting])
+ if setting not in DEPLOYMENT_VARIABLES_BLACKLIST:
+ self.deployment.variables[setting] = \
+ str(loaded_config['deployment'][setting])
except KeyError:
continue
@@ -306,21 +305,20 @@ class OOConfig(object):
if setting in self.settings and self.settings[setting]:
p_settings[setting] = self.settings[setting]
-
p_settings['deployment'] = {}
p_settings['deployment']['hosts'] = []
p_settings['deployment']['roles'] = {}
- for setting in DEPLOYMENT_PERSIST_SETTINGS:
- if setting in self.deployment.variables:
- p_settings['deployment'][setting] = self.deployment.variables[setting]
-
for host in self.deployment.hosts:
p_settings['deployment']['hosts'].append(host.to_dict())
for name, role in self.deployment.roles.iteritems():
p_settings['deployment']['roles'][name] = role.variables
+ for setting in self.deployment.variables:
+ if setting not in DEPLOYMENT_VARIABLES_BLACKLIST:
+ p_settings['deployment'][setting] = self.deployment.variables[setting]
+
try:
p_settings['variant'] = self.settings['variant']
p_settings['variant_version'] = self.settings['variant_version']