diff options
author | Samuel Munilla <smunilla@redhat.com> | 2016-07-27 10:58:48 -0400 |
---|---|---|
committer | Samuel Munilla <smunilla@redhat.com> | 2016-07-27 14:38:30 -0400 |
commit | 3b5e5409e6b2cbb406ece8b5a20ec1f19ab18f72 (patch) | |
tree | 42b9af63341b8a9210519ddba2267af0cee2ac7e /utils/src/ooinstall/oo_config.py | |
parent | de664ef0826c816b5e9dd7bee835d05a1724a42e (diff) | |
download | openshift-3b5e5409e6b2cbb406ece8b5a20ec1f19ab18f72.tar.gz openshift-3b5e5409e6b2cbb406ece8b5a20ec1f19ab18f72.tar.bz2 openshift-3b5e5409e6b2cbb406ece8b5a20ec1f19ab18f72.tar.xz openshift-3b5e5409e6b2cbb406ece8b5a20ec1f19ab18f72.zip |
a-o-i: Support for arbitrary host-level variables
This allows the user to set a block containing any variables they want to set per-host
instead of per-role.
Diffstat (limited to 'utils/src/ooinstall/oo_config.py')
-rw-r--r-- | utils/src/ooinstall/oo_config.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/src/ooinstall/oo_config.py b/utils/src/ooinstall/oo_config.py index fc06a0c4a..e37892c9b 100644 --- a/utils/src/ooinstall/oo_config.py +++ b/utils/src/ooinstall/oo_config.py @@ -56,6 +56,8 @@ class Host(object): # allowable roles: master, node, etcd, storage, master_lb, new self.roles = kwargs.get('roles', []) + self.other_variables = kwargs.get('other_variables', {}) + if self.connect_to is None: raise OOConfigInvalidHostError( "You must specify either an ip or hostname as 'connect_to'") @@ -71,7 +73,8 @@ class Host(object): d = {} for prop in ['ip', 'hostname', 'public_ip', 'public_hostname', 'connect_to', - 'preconfigured', 'containerized', 'schedulable', 'roles', 'node_labels']: + 'preconfigured', 'containerized', 'schedulable', 'roles', 'node_labels', + 'other_variables']: # If the property is defined (not None or False), export it: if getattr(self, prop): d[prop] = getattr(self, prop) |