Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
Fixes #3791 cron always returning changed state for multiline jobs (#…
Browse files Browse the repository at this point in the history
…4285)

Strip only newlines and carriage returns. Instead of stripping ALL whitespace, which may have unintended side effects
  • Loading branch information
EvanK authored and resmo committed Aug 10, 2016
1 parent 7c4de52 commit 4905ab6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions system/cron.py
Expand Up @@ -383,6 +383,9 @@ def find_env(self, name):
return []

def get_cron_job(self,minute,hour,day,month,weekday,job,special,disabled):
# normalize any leading/trailing newlines (ansible/ansible-modules-core#3791)
job = job.strip('\r\n')

if disabled:
disable_prefix = '#'
else:
Expand Down

0 comments on commit 4905ab6

Please sign in to comment.