mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Strip only newlines and carriage returns. Instead of stripping ALL whitespace, which may have unintended side effects
This commit is contained in:
@@ -383,6 +383,9 @@ class CronTab(object):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
def get_cron_job(self,minute,hour,day,month,weekday,job,special,disabled):
|
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:
|
if disabled:
|
||||||
disable_prefix = '#'
|
disable_prefix = '#'
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user