summaryrefslogtreecommitdiffstats
path: root/playbooks/provisioning/openstack/post-provision-openstack.yml
diff options
context:
space:
mode:
authorTomas Sedovic <tomas@sedovic.cz>2017-06-30 14:39:27 +0200
committerGitHub <noreply@github.com>2017-06-30 14:39:27 +0200
commitd068121e2e68ddce8f086c281a9f21542df47250 (patch)
tree723d310d605e001d5e36872fc258cb8a73f051a5 /playbooks/provisioning/openstack/post-provision-openstack.yml
parent47f262e1d3350786e5890ef85cec212b298df50b (diff)
parent1409e0a52d45b7781b3a23f3f7eaa8fe09d26cd6 (diff)
downloadopenshift-d068121e2e68ddce8f086c281a9f21542df47250.tar.gz
openshift-d068121e2e68ddce8f086c281a9f21542df47250.tar.bz2
openshift-d068121e2e68ddce8f086c281a9f21542df47250.tar.xz
openshift-d068121e2e68ddce8f086c281a9f21542df47250.zip
Merge pull request #522 from bogdando/native_dns_first
Persist DNS configuration for nodes for openstack provider
Diffstat (limited to 'playbooks/provisioning/openstack/post-provision-openstack.yml')
-rw-r--r--playbooks/provisioning/openstack/post-provision-openstack.yml42
1 files changed, 23 insertions, 19 deletions
diff --git a/playbooks/provisioning/openstack/post-provision-openstack.yml b/playbooks/provisioning/openstack/post-provision-openstack.yml
index 918f9e065..412ccd221 100644
--- a/playbooks/provisioning/openstack/post-provision-openstack.yml
+++ b/playbooks/provisioning/openstack/post-provision-openstack.yml
@@ -1,6 +1,6 @@
---
-# Assign hostnames
-- hosts: cluster_hosts
+- name: Assign hostnames
+ hosts: cluster_hosts
gather_facts: False
become: true
pre_tasks:
@@ -8,8 +8,8 @@
roles:
- role: hostnames
-# Subscribe DNS Host to allow for configuration below
-- hosts: dns
+- name: Subscribe DNS Host to allow for configuration below
+ hosts: dns
gather_facts: False
become: true
roles:
@@ -17,15 +17,15 @@
when: hostvars.localhost.rhsm_register
tags: 'subscription-manager'
-# Determine which DNS server(s) to use for our generated records
-- hosts: localhost
+- name: Determine which DNS server(s) to use for our generated records
+ hosts: localhost
gather_facts: False
become: False
roles:
- dns-server-detect
-# Build the DNS Server Views and Configure DNS Server(s)
-- hosts: dns
+- name: Build the DNS Server Views and Configure DNS Server(s)
+ hosts: dns
gather_facts: False
become: true
pre_tasks:
@@ -35,8 +35,8 @@
roles:
- role: dns-server
-# Build and process DNS Records
-- hosts: localhost
+- name: Build and process DNS Records
+ hosts: localhost
gather_facts: False
become: False
pre_tasks:
@@ -46,18 +46,22 @@
roles:
- role: dns
-# OpenShift Pre-Requisites
-- hosts: OSEv3
+- name: Switch the stack subnet to the configured private DNS server
+ hosts: localhost
+ gather_facts: False
+ become: False
+ vars_files:
+ - stack_params.yaml
+ tasks:
+ - include_role:
+ name: openstack-stack
+ tasks_from: subnet_update_dns_servers
+
+- name: OpenShift Pre-Requisites
+ hosts: OSEv3
gather_facts: False
become: true
tasks:
- - name: "Edit /etc/resolv.conf on masters/nodes"
- lineinfile:
- state: present
- dest: /etc/resolv.conf
- regexp: "nameserver {{ hostvars['localhost'].private_dns_server }}"
- line: "nameserver {{ hostvars['localhost'].private_dns_server }}"
- insertafter: search*
- name: "Include DNS configuration to ensure proper name resolution"
lineinfile:
state: present