summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@redhat.com>2016-12-05 11:44:26 -0500
committerAndrew Butcher <abutcher@redhat.com>2016-12-05 11:44:26 -0500
commit4681da7ad9aafbc72adc45693655fc48543938b0 (patch)
treef3b7e6968e83bfb3c24d981bb482e5c346410aac
parent3041cb8a4df8914f5f006f390ebb4cdb3feff47a (diff)
downloadopenshift-4681da7ad9aafbc72adc45693655fc48543938b0.tar.gz
openshift-4681da7ad9aafbc72adc45693655fc48543938b0.tar.bz2
openshift-4681da7ad9aafbc72adc45693655fc48543938b0.tar.xz
openshift-4681da7ad9aafbc72adc45693655fc48543938b0.zip
Conditionalize master config update for admission_plugin_config.
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_3/master_config_upgrade.yml1
-rw-r--r--playbooks/common/openshift-cluster/upgrades/v3_4/master_config_upgrade.yml1
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py4
-rw-r--r--roles/openshift_master_facts/defaults/main.yml2
4 files changed, 6 insertions, 2 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_3/master_config_upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_3/master_config_upgrade.yml
index 8c0bd272c..68c71a132 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_3/master_config_upgrade.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_3/master_config_upgrade.yml
@@ -53,6 +53,7 @@
dest: "{{ openshift.common.config_base}}/master/master-config.yaml"
yaml_key: 'admissionConfig.pluginConfig'
yaml_value: "{{ openshift.master.admission_plugin_config }}"
+ when: "{{ 'admission_plugin_config' in openshift.master }}"
- modify_yaml:
dest: "{{ openshift.common.config_base}}/master/master-config.yaml"
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_4/master_config_upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_4/master_config_upgrade.yml
index 32de9d94a..43c2ffcd4 100644
--- a/playbooks/common/openshift-cluster/upgrades/v3_4/master_config_upgrade.yml
+++ b/playbooks/common/openshift-cluster/upgrades/v3_4/master_config_upgrade.yml
@@ -3,6 +3,7 @@
dest: "{{ openshift.common.config_base}}/master/master-config.yaml"
yaml_key: 'admissionConfig.pluginConfig'
yaml_value: "{{ openshift.master.admission_plugin_config }}"
+ when: "{{ 'admission_plugin_config' in openshift.master }}"
- modify_yaml:
dest: "{{ openshift.common.config_base}}/master/master-config.yaml"
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index eb29848ff..2495ad46c 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -1647,10 +1647,10 @@ def set_proxy_facts(facts):
# If we're actually defining a proxy config then create admission_plugin_config
# if it doesn't exist, then merge builddefaults[config] structure
# into admission_plugin_config
- if 'admission_plugin_config' not in facts['master']:
- facts['master']['admission_plugin_config'] = dict()
if 'config' in builddefaults and ('http_proxy' in builddefaults or
'https_proxy' in builddefaults):
+ if 'admission_plugin_config' not in facts['master']:
+ facts['master']['admission_plugin_config'] = dict()
facts['master']['admission_plugin_config'].update(builddefaults['config'])
facts['builddefaults'] = builddefaults
diff --git a/roles/openshift_master_facts/defaults/main.yml b/roles/openshift_master_facts/defaults/main.yml
new file mode 100644
index 000000000..f1cbbeb2d
--- /dev/null
+++ b/roles/openshift_master_facts/defaults/main.yml
@@ -0,0 +1,2 @@
+---
+openshift_master_default_subdomain: "{{ lookup('oo_option', 'openshift_master_default_subdomain') | default(None, true) }}"