summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2015-12-03 14:11:39 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2015-12-03 14:11:39 -0500
commit64d40b71f3b52b69999831a7d6e13916ec5ad1cd (patch)
tree9087a58294e551046962e1ea267c165a5a315290 /roles/openshift_node
parent15aa17c6162c036f6b164f225d2a071c138af965 (diff)
parent192ccc8e6e6f465351828f32e9dc43b840897b67 (diff)
downloadopenshift-64d40b71f3b52b69999831a7d6e13916ec5ad1cd.tar.gz
openshift-64d40b71f3b52b69999831a7d6e13916ec5ad1cd.tar.bz2
openshift-64d40b71f3b52b69999831a7d6e13916ec5ad1cd.tar.xz
openshift-64d40b71f3b52b69999831a7d6e13916ec5ad1cd.zip
Merge pull request #1012 from abutcher/dns-ip-override
Refactor dns options and facts
Diffstat (limited to 'roles/openshift_node')
-rw-r--r--roles/openshift_node/tasks/main.yml7
-rw-r--r--roles/openshift_node/templates/node.yaml.v1.j26
2 files changed, 5 insertions, 8 deletions
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
index 36bcc1a90..29e7eb532 100644
--- a/roles/openshift_node/tasks/main.yml
+++ b/roles/openshift_node/tasks/main.yml
@@ -1,12 +1,6 @@
---
# TODO: allow for overriding default ports where possible
- fail:
- msg: This role requres that osn_cluster_dns_domain is set
- when: osn_cluster_dns_domain is not defined or not osn_cluster_dns_domain
-- fail:
- msg: This role requres that osn_cluster_dns_ip is set
- when: osn_cluster_dns_ip is not defined or not osn_cluster_dns_ip
-- fail:
msg: "SELinux is disabled, This deployment type requires that SELinux is enabled."
when: (not ansible_selinux or ansible_selinux.status != 'enabled') and deployment_type in ['enterprise', 'online', 'atomic-enterprise', 'openshift-enterprise']
@@ -20,6 +14,7 @@
hostname: "{{ openshift_hostname | default(none) }}"
public_hostname: "{{ openshift_public_hostname | default(none) }}"
deployment_type: "{{ openshift_deployment_type }}"
+ dns_ip: "{{ openshift_dns_ip | default(openshift_master_cluster_vip | default(None, true), true) }}"
- role: node
local_facts:
annotations: "{{ openshift_node_annotations | default(none) }}"
diff --git a/roles/openshift_node/templates/node.yaml.v1.j2 b/roles/openshift_node/templates/node.yaml.v1.j2
index 41a303dee..23bd81f91 100644
--- a/roles/openshift_node/templates/node.yaml.v1.j2
+++ b/roles/openshift_node/templates/node.yaml.v1.j2
@@ -1,7 +1,9 @@
allowDisabledDocker: false
apiVersion: v1
-dnsDomain: {{ osn_cluster_dns_domain }}
-dnsIP: {{ osn_cluster_dns_ip }}
+dnsDomain: {{ openshift.common.dns_domain }}
+{% if 'dns_ip' in openshift.common %}
+dnsIP: {{ openshift.common.dns_ip }}
+{% endif %}
dockerConfig:
execHandlerName: ""
iptablesSyncPeriod: "{{ openshift.node.iptables_sync_period }}"