Use recommended file-absent method vs rm 28/57528/1
authorDaniel Farrell <dfarrell@redhat.com>
Tue, 5 Apr 2016 19:46:31 +0000 (15:46 -0400)
committerDaniel Farrell <dfarrell@redhat.com>
Fri, 19 May 2017 16:52:25 +0000 (12:52 -0400)
The ansible-lint program complained about using rm to directly remove a
file, vs ensuring it's absent via the Ansible file type.

Change-Id: I3486b974b5ffd7f853aa252c7b89b92c60055665
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
handlers/cleanup_karaf.yml

index efb56fb8e6991ca8cf7ad299da7534b7a084849e..340f7d055a6358ad86d38a0b5abbbdad7f0eca23 100644 (file)
@@ -1,2 +1,4 @@
 - name: Cleanup Karaf
-  command: rm -rf /opt/opendaylight/data
+  file:
+    path=/opt/opendaylight/data
+    state=absent