]> git.phdru.name Git - ansible.git/commitdiff
Feat: Add playbooks related to ~/.ansible/tmp
authorOleg Broytman <phd@phdru.name>
Sun, 14 Jul 2019 06:39:05 +0000 (09:39 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 16 Jul 2019 18:28:41 +0000 (21:28 +0300)
playbooks/ansible-cleanup-tmp.yml [new file with mode: 0644]
playbooks/ansible-list-tmp.yml [new file with mode: 0644]

diff --git a/playbooks/ansible-cleanup-tmp.yml b/playbooks/ansible-cleanup-tmp.yml
new file mode 100644 (file)
index 0000000..2b46a32
--- /dev/null
@@ -0,0 +1,9 @@
+- name: Cleanup ~/.ansible/tmp
+  hosts: "{{ hosts | default('all') }}"
+  gather_facts: false
+  tasks:
+    - name: Cleanup ~/.ansible/tmp
+      command: "rm -rf ~/.ansible/tmp/*"
+      args:
+        warn: false
+      ignore_errors: true
diff --git a/playbooks/ansible-list-tmp.yml b/playbooks/ansible-list-tmp.yml
new file mode 100644 (file)
index 0000000..ca3e996
--- /dev/null
@@ -0,0 +1,9 @@
+- name: List ~/.ansible/tmp
+  hosts: "{{ hosts | default('all') }}"
+  gather_facts: false
+  tasks:
+    - name: List ~/.ansible/tmp
+      command: "ls -lAF ~/.ansible/tmp"
+      register: ls
+    - debug:
+        msg: "{{ ls.stdout }}"