Coverage: Use find and file module instead of shell command

This commit is contained in:
Akash Saini 2020-04-01 14:09:23 +05:30 committed by Till Maas
parent 185075fdfb
commit 255aed57a4

View file

@ -37,8 +37,18 @@
state: absent
path: "{{ coverage_file }}"
- name: find coverage files to delete
find:
path: "{{ ansible_env.HOME }}"
patterns: ".coverage.*"
hidden: yes
register: files_to_delete
- name: remove old data
shell: rm -f .coverage.*
file:
path: "{{ item.path }}"
state: absent
with_items: "{{ files_to_delete.files }}"
- name: copy coveragerc
copy: