You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.1 KiB

9 years ago
  1. ---
  2. - name: Install calicoctl bin
  3. copy:
  4. src={{ local_release_dir }}/calico/bin/calicoctl
  5. dest={{ bin_dir }}
  6. mode=u+x
  7. notify: restart calico-node
  8. - name: Create calicoctl symlink (needed by kubelet)
  9. file: src=/usr/local/bin/calicoctl dest=/usr/bin/calicoctl state=link
  10. - name: Write calico-node systemd init file
  11. template: src=calico/calico-node.service.j2 dest=/etc/systemd/system/calico-node.service
  12. notify:
  13. - reload systemd
  14. - restart calico-node
  15. - name: Write network-environment
  16. template: src=calico/network-environment.j2 dest=/etc/network-environment mode=u+x
  17. notify:
  18. - reload systemd
  19. - restart calico-node
  20. - name: Enable calico-node
  21. service: name=calico-node enabled=yes state=started
  22. - name: Configure calico-node remove default pool
  23. shell: calicoctl pool remove 192.168.0.0/16
  24. environment:
  25. ETCD_AUTHORITY: "{{ groups['kube-master'][0] }}:4001"
  26. run_once: true
  27. - name: Configure calico-node desired pool
  28. shell: calicoctl pool add {{ overlay_network_subnet }}
  29. environment:
  30. ETCD_AUTHORITY: "{{ groups['kube-master'][0] }}:4001"
  31. run_once: true