|
@@ -3,14 +3,17 @@
|
|
|
- name: Install OpenShift
|
|
|
yum: pkg=origin state=installed
|
|
|
|
|
|
-- name: Configure OpenShift settings
|
|
|
+- name: Set hostname to IP Addr
|
|
|
+ command: /usr/bin/hostname {{ oo_bind_ip }}
|
|
|
+
|
|
|
+- name: Configure OpenShift Minion settings
|
|
|
lineinfile: >
|
|
|
dest=/etc/sysconfig/openshift
|
|
|
regexp={{ item.regex }}
|
|
|
line="{{ item.line }}"
|
|
|
with_items:
|
|
|
- - { regex: '^OPENSHIFT_MASTER', line: 'OPENSHIFT_MASTER=\"{{ oo_master_ips[0] }}\"' }
|
|
|
- - { regex: '^OPENSHIFT_BIND_ADDR', line: 'OPENSHIFT_BIND_ADDR=\"{{ oo_bind_ip }}\"'}
|
|
|
+ - { regex: '^ROLE=', line: 'ROLE=\"node\"' }
|
|
|
+ - { regex: '^OPTIONS=', line: 'OPTIONS=\"--master=http://{{ oo_master_ips[0] }}:8080 --loglevel=5\"' }
|
|
|
notify:
|
|
|
- restart openshift-minion
|
|
|
|
|
@@ -20,11 +23,6 @@
|
|
|
- name: Save firewalld port for OpenShift
|
|
|
firewalld: port=10250/tcp permanent=true state=enabled
|
|
|
|
|
|
- # POST ${master_ip}:8080/api/v1beta1/minions kind=Minion id=${node_ip} apiVersion=v1beta1 hostIP=${node_ip} >/dev/null
|
|
|
-
|
|
|
- name: Enable OpenShift
|
|
|
service: name=openshift enabled=yes state=started
|
|
|
|
|
|
-- name: Register with OpenShift master
|
|
|
- command: "curl -X POST -H 'Accept: application/json' -d '{\"kind\":\"Minion\", \"id\":\"{{ oo_bind_ip }}\", \"apiVersion\":\"v1beta1\", \"hostIP\":\"{{ oo_bind_ip }}\" }' http://{{ oo_master_ips[0] }}:8080/api/v1beta1/minions"
|
|
|
- when: oo_master_ips[0] != ''
|