c12s-kubespray/roles/kubernetes/master/tasks/kubeadm-cleanup-old-certs.yml

13 lines
291 B
YAML
Raw Normal View History

---
- name: kubeadm | Retrieve files to purge
find:
paths: "{{kube_cert_dir }}"
patterns: '*.pem'
register: files_to_purge_for_kubeadm
- name: kubeadm | Purge old certs
file:
path: "{{ item.path }}"
state: absent
with_items: "{{ files_to_purge_for_kubeadm.files }}"