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.

34 lines
1.0 KiB

  1. #FIXME: remove if kubernetes/features#124 is implemented
  2. - name: Weave | Purge old weave daemonset
  3. kube:
  4. name: "weave-net"
  5. kubectl: "{{ bin_dir }}/kubectl"
  6. filename: "{{ kube_config_dir }}/weave-net.yml"
  7. resource: "ds"
  8. namespace: "{{system_namespace}}"
  9. state: absent
  10. when: inventory_hostname == groups['kube-master'][0] and weave_manifest.changed
  11. - name: Weave | Start Resources
  12. kube:
  13. name: "weave-net"
  14. kubectl: "{{ bin_dir }}/kubectl"
  15. filename: "{{ kube_config_dir }}/weave-net.yml"
  16. resource: "ds"
  17. namespace: "{{system_namespace}}"
  18. state: "{{ item | ternary('latest','present') }}"
  19. with_items: "{{ weave_manifest.changed }}"
  20. when: inventory_hostname == groups['kube-master'][0]
  21. - name: "Weave | wait for weave to become available"
  22. uri:
  23. url: http://127.0.0.1:6784/status
  24. return_content: yes
  25. register: weave_status
  26. retries: 180
  27. delay: 5
  28. until: "{{ weave_status.status == 200 and
  29. 'Status: ready' in weave_status.content }}"
  30. when: inventory_hostname == groups['kube-master'][0]