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.

44 lines
1.0 KiB

  1. ---
  2. - hosts: localhost
  3. become: no
  4. tasks:
  5. - name: "Check ansible version >=2.7.8"
  6. assert:
  7. msg: "Ansible must be v2.7.8 or higher"
  8. that:
  9. - ansible_version.string is version("2.7.8", ">=")
  10. tags:
  11. - check
  12. vars:
  13. ansible_connection: local
  14. - hosts: all
  15. vars:
  16. ansible_ssh_pipelining: true
  17. gather_facts: true
  18. - hosts: "{{ node | default('etcd:k8s-cluster:calico-rr') }}"
  19. vars_prompt:
  20. name: "delete_nodes_confirmation"
  21. prompt: "Are you sure you want to delete nodes state? Type 'yes' to delete nodes."
  22. default: "no"
  23. private: no
  24. pre_tasks:
  25. - name: check confirmation
  26. fail:
  27. msg: "Delete nodes confirmation failed"
  28. when: delete_nodes_confirmation != "yes"
  29. - hosts: kube-master
  30. roles:
  31. - { role: remove-node/pre-remove, tags: pre-remove }
  32. - hosts: "{{ node | default('kube-node') }}"
  33. roles:
  34. - { role: kubespray-defaults }
  35. - { role: reset, tags: reset }
  36. - hosts: kube-master
  37. roles:
  38. - { role: remove-node/post-remove, tags: post-remove }