Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
754 B

---
- name: List sources
shell: find {{ pki_root_dir }}/src -maxdepth 1 -mindepth 1 -exec basename "{}" \;
register: pki_sources
changed_when: False
tags: pki
# Note : we keep sources and tgz for the currently installed version
- name: Remove previous sources
file: path={{ pki_root_dir }}/src/{{ item }} state=absent
loop: "{{ pki_sources.stdout_lines }}"
when:
- item != 'openxpki-' ~ pki_version
- item != 'openxpki-' ~ pki_version ~ '.tar.gz'
- item != 'openxpki-config-' ~ pki_config_version
- item != 'openxpki-config-' ~ pki_config_version ~ '.tar.gz'
tags: pki
- name: Remove obsolete and temp files and directories
file: path={{ item }} state=absent
loop:
- "{{ pki_root_dir }}/db_dumps"
tags: pki