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.

16 lines
455 B

  1. ---
  2. - name: remove-node | Drain node except daemonsets resource
  3. command: >-
  4. {{ bin_dir }}/kubectl drain
  5. --force
  6. --ignore-daemonsets
  7. --grace-period {{ drain_grace_period }}
  8. --timeout {{ drain_timeout }}
  9. --delete-local-data {{ item }}
  10. with_items:
  11. - "{{ node.split(',') | default(groups['kube-node']) }}"
  12. failed_when: false
  13. delegate_to: "{{ groups['kube-master']|first }}"
  14. run_once: true
  15. ignore_errors: yes