backup_generated_certificates.yml 433 B

12345678910111213
  1. ---
  2. - name: Determine if generated etcd certificates exist
  3. stat:
  4. path: "{{ etcd_conf_dir }}/generated_certs"
  5. register: etcd_generated_certs_dir_stat
  6. - name: Backup generated etcd certificates
  7. command: >
  8. tar -czf {{ etcd_conf_dir }}/etcd-generated-certificate-backup-{{ ansible_date_time.epoch }}.tgz
  9. {{ etcd_conf_dir }}/generated_certs
  10. args:
  11. warn: no
  12. when: etcd_generated_certs_dir_stat.stat.exists | bool