summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node/tasks
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2015-02-12 11:26:56 -0700
committerJhon Honce <jhonce@redhat.com>2015-02-16 15:53:18 -0700
commit7d74d1913274cba4c4732cbc5f0a573cb99e5248 (patch)
tree91b943f553a4d37673e0dd32647528b4cd89ad1f /roles/openshift_node/tasks
parent65e50b4dd338a4757a2bfb883d34d803350c3aae (diff)
downloadopenshift-7d74d1913274cba4c4732cbc5f0a573cb99e5248.tar.gz
openshift-7d74d1913274cba4c4732cbc5f0a573cb99e5248.tar.bz2
openshift-7d74d1913274cba4c4732cbc5f0a573cb99e5248.tar.xz
openshift-7d74d1913274cba4c4732cbc5f0a573cb99e5248.zip
- Rename minion to node
- Update playbooks to support latest code
Diffstat (limited to 'roles/openshift_node/tasks')
-rw-r--r--roles/openshift_node/tasks/main.yml38
1 files changed, 38 insertions, 0 deletions
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
new file mode 100644
index 000000000..9da269888
--- /dev/null
+++ b/roles/openshift_node/tasks/main.yml
@@ -0,0 +1,38 @@
+---
+# tasks file for openshift_node
+- name: Install OpenShift
+ yum: pkg=openshift-node state=installed
+
+ # fixme: Once openshift stops resolving hostnames for node queries remove this...
+- name: Set hostname to IP Addr (WORKAROUND)
+ command: /usr/bin/hostname {{ oo_bind_ip }}
+
+- name: Retrieve OpenShift Master credentials
+ local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' root@{{ oo_master_public_ips[0] }}:/var/lib/openshift/openshift.local.certificates/admin/ /tmp/openshift
+ ignore_errors: yes
+
+- file: path=/var/lib/openshift/openshift.local.certificates/admin state=directory
+
+- name: Store OpenShift Master credentials
+ local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' /tmp/openshift/ root@{{ oo_public_ip }}:/var/lib/openshift/openshift.local.certificates/admin
+ ignore_errors: yes
+
+- name: Configure OpenShift Node settings
+ lineinfile:
+ dest: /etc/sysconfig/openshift-node
+ regexp: "{{ item.regex }}"
+ line: "{{ item.line }}"
+ with_items:
+ - { regex: '^OPTIONS=', line: 'OPTIONS=\"--master=http://{{ oo_master_ips[0] }}:8080 --loglevel=5\"' }
+ notify:
+ - restart openshift-node
+
+- name: Open firewalld port for OpenShift
+ firewalld: port=10250/tcp permanent=false state=enabled
+
+- name: Save firewalld port for OpenShift
+ firewalld: port=10250/tcp permanent=true state=enabled
+
+- name: Enable OpenShift
+ service: name=openshift-node enabled=yes state=started
+