---
- name: write the config files for kubelet
  template: src=kubelet.j2 dest=/etc/kubernetes/kubelet
  notify:
          - restart kubelet

- name: write the config files for proxy
  copy: src=proxy dest=/etc/kubernetes/proxy
  notify:
          - restart proxy

- name: Enable kubelet
  service: name=kubelet enabled=yes state=started

- name: Enable proxy
  service: name=kube-proxy enabled=yes state=started

- include: firewalld.yml
  when: has_firewalld

- include: iptables.yml
  when: not has_firewalld and has_iptables
