From 6d2506a0ce2e5fae665d95fa85b259adc77f1993 Mon Sep 17 00:00:00 2001 From: Victor LABORIE Date: Mon, 6 Nov 2017 11:51:01 +0100 Subject: [PATCH] packweb-apache: comment cron task instead of remove it and don't remove buildstatic.sh --- packweb-apache/tasks/awstats.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packweb-apache/tasks/awstats.yml b/packweb-apache/tasks/awstats.yml index 6d8d9eba..5ea0fa57 100644 --- a/packweb-apache/tasks/awstats.yml +++ b/packweb-apache/tasks/awstats.yml @@ -47,11 +47,10 @@ regexp: '-config=awstats' line: "10 */6 * * * root umask 033; [ -x /usr/lib/cgi-bin/awstats.pl -a -f /etc/awstats/awstats.conf -a -r /var/log/apache2/access.log ] && /usr/lib/cgi-bin/awstats.pl -config=awstats -update >/dev/null" -- name: Remove default awstat cron's tasks +- name: Comment default awstat cron's tasks lineinfile: dest: /etc/cron.d/awstats - regexp: "{{ item }}" - state: absent - with_items: - - 'update\.sh' - - 'buildstatic\.sh' + regexp: "(?i)^([^#]*update\\.sh.*)" + line: '#\1' + backrefs: yes + state: present