aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2019-11-13 11:40:17 +0000
committerPeter Mikus <pmikus@cisco.com>2019-11-13 11:41:16 +0000
commitcd76618409eee49089d5e6aa7b2ea2e575b562cc (patch)
tree2dcc9a8b4c630b6ef57c405f6bdba1c579ba0a93 /resources/tools/testbed-setup
parentfb30f887863e9cb15a6224a17b8f8b6a5982d1a2 (diff)
FIX: Ansible container cleanup
Change-Id: I233baca48a3f01d1a206fd004b0503b0f1fad5d9 Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/tools/testbed-setup')
-rw-r--r--resources/tools/testbed-setup/ansible/roles/cleanup/tasks/kill_containers.yaml10
1 files changed, 2 insertions, 8 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/kill_containers.yaml b/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/kill_containers.yaml
index f5948fb3b3..20306100e6 100644
--- a/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/kill_containers.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/kill_containers.yaml
@@ -8,10 +8,7 @@
tags: kill-containers
- name: Kill container - Remove all Docker containers
- become: yes
- docker_container:
- name: "{{ item }}"
- state: absent
+ shell: "docker rm --force {{ item }}"
with_items: "{{ running_containers.stdout_lines }}"
tags: kill-containers
@@ -22,9 +19,6 @@
tags: kill-containers
- name: Kill container - Remove all LXC containers
- become: yes
- lxc_container:
- name: '{{ item }}'
- state: absent
+ shell: "lxc-destroy --force -n {{ item }}"
with_items: "{{ running_containers.stdout_lines }}"
tags: kill-containers