From d904433e0a7f48c633aa78d5c76bdf70ddd0d88b Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 25 May 2021 18:30:32 +0200 Subject: [PATCH] chore: dont remove default yum-cron cronjob --- tasks/yum_cron.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tasks/yum_cron.yml b/tasks/yum_cron.yml index 5f25cef..fbb16b9 100644 --- a/tasks/yum_cron.yml +++ b/tasks/yum_cron.yml @@ -22,10 +22,12 @@ become_user: root - block: - - name: Remove default cronjobs for yum-cron - file: - path: "{{ item }}" - state: absent + - name: Disable default cronjobs for yum-cron + copy: + content: | + # Ansible managed. + # File was moved to '/etc/cron.d/x-yum' + dest: "{{ item }}" loop: - /etc/cron.daily/0yum-daily.cron - /etc/cron.hourly/0yum-hourly.cron