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
This commit is contained in:
Christian Berendt 2016-05-26 22:04:25 +02:00 committed by Christian Berendt
parent b40bf517ae
commit 52d7daadd2
1 changed files with 3 additions and 1 deletions

View File

@ -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