summaryrefslogtreecommitdiffstats
path: root/playbooks/openstack/openshift-cluster/files/heat_stack.yaml
diff options
context:
space:
mode:
authorLénaïc Huard <lhuard@amadeus.com>2016-09-22 18:14:05 +0200
committerLénaïc Huard <lhuard@amadeus.com>2016-09-22 18:14:05 +0200
commitaaaf82ba6032d0b1e9c36a39a7eda25b8c5f4b84 (patch)
tree67f8e4512345190190c59fd8ee13565929ada9fe /playbooks/openstack/openshift-cluster/files/heat_stack.yaml
parent06cd13f98ab0a4b18861c5af8aae4d76e12c633e (diff)
downloadopenshift-aaaf82ba6032d0b1e9c36a39a7eda25b8c5f4b84.tar.gz
openshift-aaaf82ba6032d0b1e9c36a39a7eda25b8c5f4b84.tar.bz2
openshift-aaaf82ba6032d0b1e9c36a39a7eda25b8c5f4b84.tar.xz
openshift-aaaf82ba6032d0b1e9c36a39a7eda25b8c5f4b84.zip
Fix the nodeName of the OpenShift nodes on OpenStack
Diffstat (limited to 'playbooks/openstack/openshift-cluster/files/heat_stack.yaml')
-rw-r--r--playbooks/openstack/openshift-cluster/files/heat_stack.yaml87
1 files changed, 50 insertions, 37 deletions
diff --git a/playbooks/openstack/openshift-cluster/files/heat_stack.yaml b/playbooks/openstack/openshift-cluster/files/heat_stack.yaml
index 458cf5ac7..461980ddd 100644
--- a/playbooks/openstack/openshift-cluster/files/heat_stack.yaml
+++ b/playbooks/openstack/openshift-cluster/files/heat_stack.yaml
@@ -637,41 +637,54 @@ resources:
port_id: { get_resource: dns-port }
dns-config:
- type: OS::Heat::MultipartMime
+ type: OS::Heat::CloudConfig
properties:
- parts:
- - config:
- str_replace:
- template: |
- #cloud-config
- disable_root: true
-
- system_info:
- default_user:
- name: openshift
- sudo: ["ALL=(ALL) NOPASSWD: ALL"]
-
- write_files:
- - path: /etc/sudoers.d/00-openshift-no-requiretty
- permissions: 440
- content: |
- Defaults:openshift !requiretty
- - path: /etc/sysconfig/network-scripts/ifcfg-eth0
- content: |
- DEVICE="eth0"
- BOOTPROTO="dhcp"
- DNS1="$dns1"
- DNS2="$dns2"
- PEERDNS="no"
- ONBOOT="yes"
- runcmd:
- - [ "/usr/bin/systemctl", "restart", "network" ]
- params:
- $dns1:
- get_param:
- - dns_nameservers
- - 0
- $dns2:
- get_param:
- - dns_nameservers
- - 1
+ cloud_config:
+ disable_root: true
+
+ hostname:
+ str_replace:
+ template: cluster_id-dns
+ params:
+ cluster_id: { get_param: cluster_id }
+ fqdn:
+ str_replace:
+ template: cluster_id-dns.example.com
+ params:
+ cluster_id: { get_param: cluster_id }
+
+ system_info:
+ default_user:
+ name: openshift
+ sudo: ["ALL=(ALL) NOPASSWD: ALL"]
+
+ write_files:
+ - path: /etc/sudoers.d/00-openshift-no-requiretty
+ permissions: 440
+ # content: Defaults:openshift !requiretty
+ # Encoded in base64 to be sure that we do not forget the trailing newline or
+ # sudo will not be able to parse that file
+ encoding: b64
+ content: RGVmYXVsdHM6b3BlbnNoaWZ0ICFyZXF1aXJldHR5Cg==
+ - path: /etc/sysconfig/network-scripts/ifcfg-eth0
+ content:
+ str_replace:
+ template: |
+ DEVICE="eth0"
+ BOOTPROTO="dhcp"
+ DNS1="$dns1"
+ DNS2="$dns2"
+ PEERDNS="no"
+ ONBOOT="yes"
+ params:
+ $dns1:
+ get_param:
+ - dns_nameservers
+ - 0
+ $dns2:
+ get_param:
+ - dns_nameservers
+ - 1
+
+ runcmd:
+ - [ "/usr/bin/systemctl", "restart", "network" ]