mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-03 04:34:24 -07:00
Update plugins/modules/cronvar.py
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
2abd9b5e21
commit
1eecd94070
1 changed files with 1 additions and 1 deletions
|
@ -136,7 +136,7 @@ class CronVar(object):
|
|||
else:
|
||||
self.cron_file = os.path.join('/etc/cron.d', cron_file)
|
||||
parent_dir = os.path.dirname(self.cron_file)
|
||||
if not os.path.isdir(parent_dir):
|
||||
if parent_dir and not os.path.isdir(parent_dir):
|
||||
module.fail_json(msg="Parent directory '{}' does not exist for cron_file: '{}'".format(parent_dir, cron_file))
|
||||
else:
|
||||
self.cron_file = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue