2017-09-26 09:38:58 +00:00
|
|
|
---
|
2018-10-17 19:27:11 +00:00
|
|
|
- name: kubeadm | Retrieve files to purge
|
|
|
|
find:
|
|
|
|
paths: "{{kube_cert_dir }}"
|
|
|
|
patterns: '*.pem'
|
|
|
|
register: files_to_purge_for_kubeadm
|
|
|
|
|
2017-09-26 09:38:58 +00:00
|
|
|
- name: kubeadm | Purge old certs
|
2018-10-17 19:27:11 +00:00
|
|
|
file:
|
|
|
|
path: "{{ item.path }}"
|
|
|
|
state: absent
|
|
|
|
with_items: "{{ files_to_purge_for_kubeadm.files }}"
|
2018-10-23 12:09:11 +00:00
|
|
|
|
|
|
|
- name: kubeadm | Purge old kubeconfig
|
|
|
|
file:
|
|
|
|
path: /root/.kube/config
|
|
|
|
state: absent
|