diff options
author | pmikus <peter.mikus@protonmail.ch> | 2023-06-07 05:29:07 +0000 |
---|---|---|
committer | pmikus <peter.mikus@protonmail.ch> | 2023-06-07 05:29:07 +0000 |
commit | b8e06ce97d82640528b2180de409e324b41f2fd7 (patch) | |
tree | 64e4d41ffd9fee7daea587a28a6e744ff258ee95 /fdio.infra.ansible/roles/cleanup/tasks/kill_containers.yaml | |
parent | ab30e2e98dafee7b86f449a3dd50b55b68f1ddc3 (diff) |
fix(ansible): Cleanup macros
Signed-off-by: pmikus <peter.mikus@protonmail.ch>
Change-Id: I53a530a07716e09b30b5401b313202460fb235c3
Diffstat (limited to 'fdio.infra.ansible/roles/cleanup/tasks/kill_containers.yaml')
-rw-r--r-- | fdio.infra.ansible/roles/cleanup/tasks/kill_containers.yaml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fdio.infra.ansible/roles/cleanup/tasks/kill_containers.yaml b/fdio.infra.ansible/roles/cleanup/tasks/kill_containers.yaml index 22239b1ebb..dc739eb954 100644 --- a/fdio.infra.ansible/roles/cleanup/tasks/kill_containers.yaml +++ b/fdio.infra.ansible/roles/cleanup/tasks/kill_containers.yaml @@ -1,16 +1,16 @@ --- -# file: roles/cleanup/tasks/kill_containers.yaml +# file: tasks/kill_containers.yaml - name: Kill Docker Containers block: - - name: Kill Container - Get Running Docker Containers + - name: Get Running Docker Containers ansible.builtin.shell: "docker ps -a --filter name=DUT -q" register: running_containers changed_when: false tags: - kill-containers - - name: Kill Container - Remove All Docker Containers + - name: Remove All Docker Containers ansible.builtin.shell: "docker rm --force {{ item }}" with_items: "{{ running_containers.stdout_lines }}" tags: @@ -24,14 +24,14 @@ - name: Kill LXC Containers block: - - name: Kill Container - Get Running LXC Containers + - name: Get Running LXC Containers ansible.builtin.shell: "lxc-ls" register: running_containers changed_when: false tags: - kill-containers - - name: Kill Container - Remove All LXC Containers + - name: Remove All LXC Containers ansible.builtin.shell: "lxc-destroy --force -n {{ item }}" with_items: "{{ running_containers.stdout_lines }}" tags: |