diff options
author | 2020-12-15 16:33:46 +0000 | |
---|---|---|
committer | 2020-12-17 09:32:19 +0000 | |
commit | d513fb2ae6cba746b9e4456c544668a07b5d40f2 (patch) | |
tree | a42b62ea9eb35c22958ea0a8a27b3f63d8de0fac /resources/tools/testbed-setup/ansible/roles/cleanup/tasks/sut.yaml | |
parent | d910b96c6e5215f0d8961c121f086cd3c2703e43 (diff) |
Ansible: Fix cleanup procedures
Signed-off-by: pmikus <pmikus@cisco.com>
Change-Id: Ib0c3a508b32a4d5929cfc20a7a7813752350b7d9
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/cleanup/tasks/sut.yaml')
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/cleanup/tasks/sut.yaml | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/sut.yaml b/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/sut.yaml index c24b5e6a7f..53a65dd608 100644 --- a/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/sut.yaml +++ b/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/sut.yaml @@ -33,26 +33,38 @@ process: "vpp_echo" tags: kill-process + - name: Find file or dir - Core zip file + find: + paths: "/tmp/" + patterns: "*tar.lzo.lrz.xz*" + register: files_to_delete + tags: remove-file-dir + - name: Remove file or dir - Core zip file file: + path: "{{ item.path }}" state: absent - path: "/tmp/*tar.lzo.lrz.xz*" + with_items: "{{ files_to_delete.files }}" + tags: remove-file-dir + + - name: Find file or dir - Core dump file + find: + paths: "/tmp/" + patterns: "*core*" + register: files_to_delete tags: remove-file-dir - name: Remove file or dir - Core dump file file: + path: "{{ item.path }}" state: absent - path: "/tmp/*core*" + with_items: "{{ files_to_delete.files }}" tags: remove-file-dir - name: Kill containers - Remove all containers import_tasks: kill_containers.yaml tags: kill-containers - - name: Kubernetes - Reset - raw: 'kubeadm reset --force' - tags: kill-kubernetes - - name: Remove packages - Remove VPP import_tasks: remove_package.yaml vars: |