From 42a805c1985cddd3b18349d9500cc0ea81ac6a31 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 14 Jul 2019 09:39:05 +0300 Subject: [PATCH] Feat: Add playbooks related to ~/.ansible/tmp --- playbooks/ansible-cleanup-tmp.yml | 9 +++++++++ playbooks/ansible-list-tmp.yml | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 playbooks/ansible-cleanup-tmp.yml create mode 100644 playbooks/ansible-list-tmp.yml diff --git a/playbooks/ansible-cleanup-tmp.yml b/playbooks/ansible-cleanup-tmp.yml new file mode 100644 index 0000000..2b46a32 --- /dev/null +++ b/playbooks/ansible-cleanup-tmp.yml @@ -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 index 0000000..ca3e996 --- /dev/null +++ b/playbooks/ansible-list-tmp.yml @@ -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 }}" -- 2.39.5