From 52d7daadd248be4d527d1a1e1511e27853612543 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Thu, 26 May 2016 22:04:25 +0200 Subject: [PATCH] Use file module instead of running rm to remove a directory This will solve the following issue when running the kolla-ansible cleanup command: [WARNING]: Consider using file module with state=absent rather than running rm Closes-bug: #1586406 Change-Id: I366b6f27e697b24c6c54882c08afe4048803b4e8 --- ansible/roles/cleanup/tasks/cleanup_host.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/roles/cleanup/tasks/cleanup_host.yml b/ansible/roles/cleanup/tasks/cleanup_host.yml index 36a65fb791..266ce1752e 100644 --- a/ansible/roles/cleanup/tasks/cleanup_host.yml +++ b/ansible/roles/cleanup/tasks/cleanup_host.yml @@ -3,4 +3,6 @@ command: /tmp/kolla-cleanup/tools/cleanup-host - name: Removing kolla-cleanup folder - command: rm -rf /tmp/kolla-cleanup + file: + path: /tmp/kolla-cleanup + state: absent