diff --git a/lib/ansible/modules/system/cron.py b/lib/ansible/modules/system/cron.py index ae4b3b27b1..ac9ee9a4a4 100644 --- a/lib/ansible/modules/system/cron.py +++ b/lib/ansible/modules/system/cron.py @@ -726,7 +726,7 @@ def main(): changed = True # no changes to env/job, but existing crontab needs a terminating newline - if not changed: + if not changed and not crontab.existing == '': if not (crontab.existing.endswith('\r') or crontab.existing.endswith('\n')): changed = True