2017-09-26 09:38:58 +00:00
|
|
|
---
|
2018-10-17 19:27:11 +00:00
|
|
|
- name: kubeadm | Retrieve files to purge
|
|
|
|
find:
|
2018-12-06 10:33:38 +00:00
|
|
|
paths: "{{ kube_cert_dir }}"
|
2018-10-17 19:27:11 +00:00
|
|
|
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:
|
2019-06-06 09:06:11 +00:00
|
|
|
path: "{{ ansible_env.HOME | default('/root') }}/.kube/config"
|
2018-10-23 12:09:11 +00:00
|
|
|
state: absent
|