summaryrefslogtreecommitdiffstats
path: root/utils/src/ooinstall/openshift_ansible.py
diff options
context:
space:
mode:
authorSamuel Munilla <smunilla@redhat.com>2016-07-27 10:58:48 -0400
committerSamuel Munilla <smunilla@redhat.com>2016-07-27 14:38:30 -0400
commit3b5e5409e6b2cbb406ece8b5a20ec1f19ab18f72 (patch)
tree42b9af63341b8a9210519ddba2267af0cee2ac7e /utils/src/ooinstall/openshift_ansible.py
parentde664ef0826c816b5e9dd7bee835d05a1724a42e (diff)
downloadopenshift-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/openshift_ansible.py')
-rw-r--r--utils/src/ooinstall/openshift_ansible.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/src/ooinstall/openshift_ansible.py b/utils/src/ooinstall/openshift_ansible.py
index 352955026..df25be40a 100644
--- a/utils/src/ooinstall/openshift_ansible.py
+++ b/utils/src/ooinstall/openshift_ansible.py
@@ -191,6 +191,7 @@ def write_proxy_settings(base_inventory):
pass
+# pylint: disable=too-many-branches
def write_host(host, inventory, schedulable=None):
global CFG
@@ -205,6 +206,9 @@ def write_host(host, inventory, schedulable=None):
facts += ' openshift_public_hostname={}'.format(host.public_hostname)
if host.containerized:
facts += ' containerized={}'.format(host.containerized)
+ if host.other_variables:
+ for variable, value in host.other_variables.iteritems():
+ facts += " {}={}".format(variable, value)
# Distinguish between three states, no schedulability specified (use default),
# explicitly set to True, or explicitly set to False: