mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
if task is not defined, it's not up to date
This commit is contained in:
parent
c3ab954c6e
commit
8648775c2a
1 changed files with 4 additions and 1 deletions
|
@ -72,8 +72,11 @@ def task_present(name,
|
|||
with salt.utils.fopen(script_path, 'r') as file:
|
||||
new_script = file.read().replace('\t', ' ')
|
||||
|
||||
is_up_to_date = old_script == new_script and task_type == task['type'] and \
|
||||
is_up_to_date = task and (
|
||||
old_script == new_script and
|
||||
task_type == task['type'] and
|
||||
task['dbrps'] == [{'db': database, 'rp': retention_policy}]
|
||||
)
|
||||
|
||||
if is_up_to_date:
|
||||
comments.append('Task script is already up-to-date')
|
||||
|
|
Loading…
Add table
Reference in a new issue