diff options
author | Jhon Honce <jhonce@redhat.com> | 2014-10-01 15:39:26 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2014-10-02 15:36:11 -0700 |
commit | b1b2cbe00cfe766a414972352730454c1e79c2c2 (patch) | |
tree | da75bd9df2bca097bf5937f760597990e85e9b4c /roles/openshift_minion/tasks | |
parent | 2808f726dacb60e58c289c18a91258e0526705a3 (diff) | |
download | openshift-b1b2cbe00cfe766a414972352730454c1e79c2c2.tar.gz openshift-b1b2cbe00cfe766a414972352730454c1e79c2c2.tar.bz2 openshift-b1b2cbe00cfe766a414972352730454c1e79c2c2.tar.xz openshift-b1b2cbe00cfe766a414972352730454c1e79c2c2.zip |
Finish origin -> openshift rename
Diffstat (limited to 'roles/openshift_minion/tasks')
-rw-r--r-- | roles/openshift_minion/tasks/main.yml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/roles/openshift_minion/tasks/main.yml b/roles/openshift_minion/tasks/main.yml new file mode 100644 index 000000000..c43575945 --- /dev/null +++ b/roles/openshift_minion/tasks/main.yml @@ -0,0 +1,30 @@ +--- +# tasks file for openshift_minion +- name: Install OpenShift + yum: pkg=origin state=installed + +- name: Configure OpenShift 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=\"{{ hostvars[inventory_hostname].ansible_eth0.ipv4.address }}\"'} + notify: + - restart openshift-minion + +- 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 + + # 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\":\"{{ hostvars[inventory_hostname].ansible_eth0.ipv4.address }}\", \"apiVersion\":\"v1beta1\", \"hostIP\":\"{{ hostvars[inventory_hostname].ansible_eth0.ipv4.address }}\" }' http://{{ oo_master_ips[0] }}:8080/api/v1beta1/minions" + when: oo_master_ips[0] != '' |