From d7b3c872cd4adeb6c6bcc27c0fa31826773d6a5d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 31 Oct 2019 22:49:12 +0300 Subject: [PATCH] Feat(ansible/cleanup-tmp): Use args `chdir`; ignore errors with `failed_when` --- playbooks/ansible/cleanup-tmp.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/playbooks/ansible/cleanup-tmp.yml b/playbooks/ansible/cleanup-tmp.yml index eb5bc37..8d49e6a 100644 --- a/playbooks/ansible/cleanup-tmp.yml +++ b/playbooks/ansible/cleanup-tmp.yml @@ -3,4 +3,7 @@ gather_facts: false tasks: - name: Cleanup ~/.ansible/tmp - shell: "cd ~/.ansible/tmp && exec rm -rf * || :" + shell: "exec rm -rf *" + args: + chdir: "~/.ansible/tmp" + failed_when: false -- 2.39.5