summaryrefslogtreecommitdiffstats
path: root/playbooks/common
diff options
context:
space:
mode:
authorRussell Teague <rteague@redhat.com>2017-08-15 08:25:31 -0400
committerRussell Teague <rteague@redhat.com>2017-08-15 08:25:31 -0400
commitba6b4e8c24c9ef21eeed43c554b9b23a33946e87 (patch)
tree2d25a52c3cb29e5773b70873f1224ab2d23de4f8 /playbooks/common
parent2bc68321f54ed405819d168a4930c75d9ab8fadc (diff)
downloadopenshift-ba6b4e8c24c9ef21eeed43c554b9b23a33946e87.tar.gz
openshift-ba6b4e8c24c9ef21eeed43c554b9b23a33946e87.tar.bz2
openshift-ba6b4e8c24c9ef21eeed43c554b9b23a33946e87.tar.xz
openshift-ba6b4e8c24c9ef21eeed43c554b9b23a33946e87.zip
Cleanup validate_hostnames
Diffstat (limited to 'playbooks/common')
-rw-r--r--playbooks/common/openshift-cluster/validate_hostnames.yml15
1 files changed, 10 insertions, 5 deletions
diff --git a/playbooks/common/openshift-cluster/validate_hostnames.yml b/playbooks/common/openshift-cluster/validate_hostnames.yml
index 33fc5630f..be2e6a15a 100644
--- a/playbooks/common/openshift-cluster/validate_hostnames.yml
+++ b/playbooks/common/openshift-cluster/validate_hostnames.yml
@@ -1,17 +1,22 @@
---
-- name: Gather and set facts for node hosts
+- name: Validate node hostnames
hosts: oo_nodes_to_config
- roles:
- - openshift_facts
tasks:
- - shell:
+ - name: Query DNS for IP address of {{ openshift.common.hostname }}
+ shell:
getent ahostsv4 {{ openshift.common.hostname }} | head -n 1 | awk '{ print $1 }'
register: lookupip
changed_when: false
failed_when: false
- name: Warn user about bad openshift_hostname values
pause:
- prompt: "The hostname \"{{ openshift.common.hostname }}\" for \"{{ ansible_nodename }}\" doesn't resolve to an ip address owned by this host. Please set openshift_hostname variable to a hostname that when resolved on the host in question resolves to an IP address matching an interface on this host. This host will fail liveness checks for pods utilizing hostPorts, press ENTER to continue or CTRL-C to abort."
+ prompt:
+ The hostname {{ openshift.common.hostname }} for {{ ansible_nodename }}
+ doesn't resolve to an IP address owned by this host. Please set
+ openshift_hostname variable to a hostname that when resolved on the host
+ in question resolves to an IP address matching an interface on this
+ host. This host will fail liveness checks for pods utilizing hostPorts,
+ press ENTER to continue or CTRL-C to abort.
seconds: "{{ 10 if openshift_override_hostname_check | default(false) | bool else omit }}"
when:
- lookupip.stdout != '127.0.0.1'