mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
cron: change identifier default value to False
this allows the user to set it explicitly to None if they want to manage a cronjob with no identifier. realistically, this is probably a rare usecase.
This commit is contained in:
parent
ad444b6e7b
commit
f22ad837c3
1 changed files with 4 additions and 4 deletions
|
@ -216,7 +216,7 @@ def present(name,
|
|||
month='*',
|
||||
dayweek='*',
|
||||
comment=None,
|
||||
identifier=None):
|
||||
identifier=False):
|
||||
'''
|
||||
Verifies that the specified cron job is present for the specified user.
|
||||
For more advanced information about what exactly can be set in the cron
|
||||
|
@ -256,7 +256,7 @@ def present(name,
|
|||
edits. This defaults to the state id
|
||||
'''
|
||||
name = ' '.join(name.strip().split())
|
||||
if not identifier:
|
||||
if identifier is False:
|
||||
identifier = name
|
||||
ret = {'changes': {},
|
||||
'comment': '',
|
||||
|
@ -312,7 +312,7 @@ def present(name,
|
|||
|
||||
def absent(name,
|
||||
user='root',
|
||||
identifier=None,
|
||||
identifier=False,
|
||||
**kwargs):
|
||||
'''
|
||||
Verifies that the specified cron job is absent for the specified user; only
|
||||
|
@ -334,7 +334,7 @@ def absent(name,
|
|||
### of unsupported arguments will result in a traceback.
|
||||
|
||||
name = ' '.join(name.strip().split())
|
||||
if not identifier:
|
||||
if identifier is False:
|
||||
identifier = name
|
||||
ret = {'name': name,
|
||||
'result': True,
|
||||
|
|
Loading…
Add table
Reference in a new issue