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.1 KiB

  1. ---
  2. - hosts: localhost
  3. tasks:
  4. - name: Check ansible version <2.7
  5. assert:
  6. msg: "Ansible V2.7.0 can't be used until: https://github.com/ansible/ansible/issues/46600 is fixed"
  7. that:
  8. - ansible_version.string is version("2.7.0", "<")
  9. - ansible_version.string is version("2.5.0", ">=")
  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:vault: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 }