summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/integration/targets/cron/tasks/main.yml23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/integration/targets/cron/tasks/main.yml b/test/integration/targets/cron/tasks/main.yml
index cc892c8e06..155fc2d580 100644
--- a/test/integration/targets/cron/tasks/main.yml
+++ b/test/integration/targets/cron/tasks/main.yml
@@ -99,3 +99,26 @@
- assert:
that: remove_cron_file is not changed
+
+- name: Removing a cron file when the name is specified is allowed (#57471)
+ block:
+ - name: Cron file creation
+ cron:
+ cron_file: cron_filename
+ name: "integration test cron"
+ job: 'ls'
+ user: root
+
+ - name: Cron file deletion
+ cron:
+ cron_file: cron_filename
+ name: "integration test cron"
+ state: absent
+
+ - name: Check file succesfull deletion
+ stat:
+ path: /etc/cron.d/cron_filename
+ register: cron_file_stats
+
+ - assert:
+ that: not cron_file_stats.stat.exists