mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 10:25:28 +00:00
Coverage: Use find and file module instead of shell command
This commit is contained in:
parent
185075fdfb
commit
255aed57a4
1 changed files with 11 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue