summaryrefslogtreecommitdiffstats
path: root/playbooks/provisioning/openstack/post-provision-openstack.yml
diff options
context:
space:
mode:
authorRyan Cook <rcook@redhat.com>2017-06-16 10:27:41 -0700
committerGitHub <noreply@github.com>2017-06-16 10:27:41 -0700
commitaa0c8c910a0b8c29afb83d1562c252affcd4a2cb (patch)
treefbde420c20e6f18fcc8063e268a1525f8848c8d0 /playbooks/provisioning/openstack/post-provision-openstack.yml
parent7ba2ef768b25b99f628c88a8e6348a8d0df630a0 (diff)
parent9369c9dfd722e697f83a225d78c2c1dcd1247976 (diff)
downloadopenshift-aa0c8c910a0b8c29afb83d1562c252affcd4a2cb.tar.gz
openshift-aa0c8c910a0b8c29afb83d1562c252affcd4a2cb.tar.bz2
openshift-aa0c8c910a0b8c29afb83d1562c252affcd4a2cb.tar.xz
openshift-aa0c8c910a0b8c29afb83d1562c252affcd4a2cb.zip
Merge pull request #466 from tomassedovic/openstack-provider
Openstack provider
Diffstat (limited to 'playbooks/provisioning/openstack/post-provision-openstack.yml')
-rw-r--r--playbooks/provisioning/openstack/post-provision-openstack.yml58
1 files changed, 58 insertions, 0 deletions
diff --git a/playbooks/provisioning/openstack/post-provision-openstack.yml b/playbooks/provisioning/openstack/post-provision-openstack.yml
new file mode 100644
index 000000000..4e42c1c7f
--- /dev/null
+++ b/playbooks/provisioning/openstack/post-provision-openstack.yml
@@ -0,0 +1,58 @@
+---
+# Assign hostnames
+- hosts: cluster_hosts
+ become: true
+ pre_tasks:
+ - include: pre_tasks.yml
+ roles:
+ - role: hostnames
+
+# Subscribe DNS Host to allow for configuration below
+- hosts: dns
+ become: true
+ roles:
+ - role: subscription-manager
+ when: hostvars.localhost.rhsm_register
+ tags: 'subscription-manager'
+
+# Determine which DNS server(s) to use for our generated records
+- hosts: localhost
+ roles:
+ - dns-server-detect
+
+# Build the DNS Server Views and Configure DNS Server(s)
+- hosts: dns
+ become: true
+ pre_tasks:
+ - include: pre_tasks.yml
+ - name: "Generate dns-server views"
+ include: openstack_dns_views.yml
+ roles:
+ - role: dns-server
+
+# Build and process DNS Records
+- hosts: localhost
+ pre_tasks:
+ - include: pre_tasks.yml
+ - name: "Generate dns records"
+ include: openstack_dns_records.yml
+ roles:
+ - role: dns
+
+# OpenShift Pre-Requisites
+- hosts: OSEv3
+ 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
+ dest: /etc/sysconfig/network
+ regexp: "IP4_NAMESERVERS={{ hostvars['localhost'].private_dns_server }}"
+ line: "IP4_NAMESERVERS={{ hostvars['localhost'].private_dns_server }}"