aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/cleanup/tasks/sut.yaml
blob: 5524277f52b1bced7ebf2b858e085c748fccc06e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
# file: roles/cleanup/tasks/sut.yaml

- name: Host Cleanup
  block:
    - name: Kill Processes - Qemu
      import_tasks: kill_process.yaml
      vars:
        process: "qemu"
      tags:
        - kill-process

    - name: Kill Processes - L3fwd
      import_tasks: kill_process.yaml
      vars:
        process: "l3fwd"
      tags:
        - kill-process

    - name: Kill Processes - Testpmd
      import_tasks: kill_process.yaml
      vars:
        process: "testpmd"
      tags:
        - kill-process

    - name: Kill Processes - iPerf3
      import_tasks: kill_process.yaml
      vars:
        process: "iperf3"
      tags:
        - kill-process

    - name: Kill Processes - nohup
      import_tasks: kill_process.yaml
      vars:
        process: "nohup"
      tags:
        - kill-process

    - name: Kill Processes - vpp_echo
      import_tasks: kill_process.yaml
      vars:
        process: "vpp_echo"
      tags:
        - kill-process

    - name: Find File Or Dir - Core Zip File
      ansible.builtin.find:
        paths: "/tmp/"
        patterns: "*tar.lzo.lrz.xz*"
      register: files_to_delete
      tags:
        - remove-file-dir

    - name: Remove File Or Dir - Core Zip File
      ansible.builtin.file:
        path: "{{ item.path }}"
        state: absent
      with_items: "{{ files_to_delete.files }}"
      tags:
        - remove-file-dir

    - name: Find File Or Dir - Core Dump File
      ansible.builtin.find:
        paths: "/tmp/"
        patterns: "*core*"
      register: files_to_delete
      tags:
        - remove-file-dir

    - name: Remove File Or Dir - Core Dump File
      ansible.builtin.file:
        path: "{{ item.path }}"
        state: absent
      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: Remove Packages - Remove VPP
      import_tasks: remove_package.yaml
      vars:
        package: "*vpp*"
      tags:
        - remove-package