main.yml 499 B

1234567891011121314151617
  1. ---
  2. # tasks file for kubernetes_proxy
  3. - name: Install kubernetes
  4. yum: pkg=kubernetes state=installed
  5. - name: Configure kubernetes-proxy etcd servers
  6. lineinfile: >
  7. dest=/etc/sysconfig/kubernetes
  8. regexp={{ item.regex }}
  9. line="{{ item.line }}"
  10. with_items:
  11. - { regex: '^KUBE_ETCD_SERVERS=', line: 'KUBE_ETCD_SERVERS=\"http://{{ oo_master_ips[0] }}:4001\"' }
  12. notify:
  13. - restart kubernetes-proxy
  14. - name: Enable proxy
  15. service: name=kubernetes-proxy enabled=yes state=started