diff options
author | Michal Zegan <m.zegan@samsung.com> | 2019-06-04 15:35:22 +0200 |
---|---|---|
committer | Michal Zegan <m.zegan@samsung.com> | 2019-06-04 15:35:22 +0200 |
commit | 863c0ad7fd25c06efce969fedac85887b1fb7e73 (patch) | |
tree | c189d59b7c000b8c2392213e79c2569ea845b825 | |
parent | 05bd819cfac6ac1412a66c5a88650fb2fc8b93bd (diff) |
Remove cleanup from play-resources
When play-resources does not use
bindmounting, there is no need to manually clean up resource files.
That makes it possible to remove cleanup.yml all together.
This is in preparation to remove the othervise unneeded
cleanup-directories role.
Change-Id: Id6c05700e8cd2e9c8f91a3cfdf46022b170e1e1e
Issue-ID: OOM-1902
Signed-off-by: Michal Zegan <m.zegan@samsung.com>
-rw-r--r-- | ansible/test/play-resources/molecule/default/cleanup.yml | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/ansible/test/play-resources/molecule/default/cleanup.yml b/ansible/test/play-resources/molecule/default/cleanup.yml deleted file mode 100644 index e0c0b624..00000000 --- a/ansible/test/play-resources/molecule/default/cleanup.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -- name: Cleanup data from instance (doing it from hosts requires root access). - hosts: resources - gather_facts: false - ignore_unreachable: true - pre_tasks: - - name: Find files and dirs to delete - find: - paths: /data/ # Only deleting content not dir itself as we get "Device or resource busy" error as it's mounted to container doing the deletion - patterns: "*" - recurse: true - file_type: any - register: files_to_delete - - name: Make file/dir path list - set_fact: - to_delete_paths: "{{ to_delete_paths | default([]) + [item.path] }}" - loop: "{{ files_to_delete.files }}" - when: files_to_delete.files is defined - roles: - - role: cleanup-directories - vars: - directories_files_list_to_remove: "{{ to_delete_paths }}" - when: to_delete_paths is defined |