# Copyright (c) Authors of Clover
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0

- name: Resetting kubeadm
  shell: kubeadm reset

- name: Deleting the .kube config directory
  file:
    path: /home/pi/.kube
    state: absent
  when: "'master' in group_names"

- name: Rebooting
  shell: sleep 2 && reboot
  async: 1
  poll: 0
  ignore_errors: true