diff options
author | Thomas Wiest <twiest@users.noreply.github.com> | 2015-02-27 09:23:43 -0500 |
---|---|---|
committer | Thomas Wiest <twiest@users.noreply.github.com> | 2015-02-27 09:23:43 -0500 |
commit | 98d53c4119170bf87e635207152ac180a5420e21 (patch) | |
tree | 4c91c670d915a1f6e2ca933756a8b64b45dbb237 /roles/openshift_node/tasks | |
parent | 50f53296253953fb2d3fff6bd7d7d3e538b9430b (diff) | |
parent | 20b2f13b0a7b7aa87804a0d7d861dfe68f715928 (diff) | |
download | openshift-98d53c4119170bf87e635207152ac180a5420e21.tar.gz openshift-98d53c4119170bf87e635207152ac180a5420e21.tar.bz2 openshift-98d53c4119170bf87e635207152ac180a5420e21.tar.xz openshift-98d53c4119170bf87e635207152ac180a5420e21.zip |
Merge pull request #82 from detiber/commonRole
create openshift-common role
Diffstat (limited to 'roles/openshift_node/tasks')
-rw-r--r-- | roles/openshift_node/tasks/main.yml | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index 8a0694905..e103daa83 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -1,45 +1,43 @@ --- - -# tasks file for openshift_node -- name: Install OpenShift +- name: Install OpenShift Node package yum: pkg=openshift-node state=installed - # fixme: Once openshift stops resolving hostnames for node queries remove this... -- name: Set hostname to IP Addr (WORKAROUND) - hostname: name={{ oo_bind_ip }} +- name: Set OpenShift node facts + include: "{{ role_path | dirname }}/openshift_common/tasks/set_facts.yml" + facts: + - { section: node, option: debug_level, value: "{{ openshift_node_debug_level }}" } - local_action: command /usr/bin/mktemp -d /tmp/openshift-ansible-XXXXXXX register: mktemp - 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/ {{ mktemp.stdout }} + local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' root@{{ openshift_master_public_ips[0] }}:/var/lib/openshift/openshift.local.certificates/admin/ {{ mktemp.stdout }} 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' {{ mktemp.stdout }}/ root@{{ oo_public_ip }}:/var/lib/openshift/openshift.local.certificates/admin + local_action: command /usr/bin/rsync --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' {{ mktemp.stdout }}/ root@{{ openshift_public_ip }}:/var/lib/openshift/openshift.local.certificates/admin ignore_errors: yes + # fixme: Once the openshift_cluster playbook is published state should be started + # Always bounce service to pick up new credentials + notify: restart openshift-node + +- local_action: file name={{ mktemp.stdout }} state=absent + +- name: Configure firewall for OpenShift Node + include: "{{ role_path | dirname }}/openshift_common/tasks/firewall.yml" + allow: + - { service: OpenShift kubelet, port: 10250/tcp } - name: Configure OpenShift Node settings lineinfile: dest: /etc/sysconfig/openshift-node - regexp: "{{ item.regex }}" - line: "{{ item.line }}" - with_items: - - { regex: '^OPTIONS=', line: 'OPTIONS=\"--master=https://{{ oo_master_ips[0] }}:8443 --loglevel=5\"' } + regexp: '^OPTIONS=' + line: "OPTIONS=\"--master=http://{{ openshift_master_ips[0] }}:8080 --loglevel={{ openshift_node_debug_level }}\"" notify: - - restart openshift-node + - 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 - - # fixme: Once the openshift_cluster playbook is published state should be started - # Always bounce service to pick up new credentials -- name: Enable OpenShift - service: name=openshift-node enabled=yes state=restarted - -- local_action: file name={{ mktemp.stdout }} state=absent +- name: Start and enable openshift-node + service: name=openshift-node enabled=yes state=started + when: not openshift_node_manage_service_externally |