From 4507508a1092ae9682da197452d3fa02c88e3b6b Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 23 Dec 2022 17:48:53 +0100 Subject: [PATCH] tmpreaper: permit to switch back to ctime --- tasks/tmpreaper.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tasks/tmpreaper.yml b/tasks/tmpreaper.yml index bb2ef6f..374f70c 100644 --- a/tasks/tmpreaper.yml +++ b/tasks/tmpreaper.yml @@ -11,10 +11,17 @@ - name: Change the date check criteria from ctime to mtime ansible.builtin.lineinfile: path: /etc/cron.daily/tmpreaper - regexp: '^ --ctime \\' + regexp: '^ --[c|m]time \\' line: ' --mtime \' when: not tmpreaper_use_ctime + - name: Change the date check criteria from ctime to mtime + ansible.builtin.lineinfile: + path: /etc/cron.daily/tmpreaper + regexp: '^ --[c|m]time \\' + line: ' --ctime \' + when: tmpreaper_use_ctime + - name: Install the tmpreaper configuration ansible.builtin.template: src=tmpreaper.conf.j2 dest=/etc/tmpreaper.conf owner=root group=root mode=0444