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.

45 lines
1.2 KiB

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