Fixes #3791 cron always returning changed state for multiline jobs (#4285)

Strip only newlines and carriage returns. Instead of stripping ALL whitespace, which may have unintended side effects
pull/18777/head
Evan Kaufman 8 years ago committed by Matt Clay
parent 766413e79d
commit 3a44d60fbc

@ -383,6 +383,9 @@ class CronTab(object):
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:

Loading…
Cancel
Save