mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch '2017.7' into 49661_starting_salt_master_openssl
This commit is contained in:
commit
f647b9557c
1 changed files with 5 additions and 1 deletions
|
@ -21,6 +21,7 @@ from __future__ import absolute_import
|
|||
|
||||
# Import python libs
|
||||
import logging
|
||||
import json
|
||||
import salt.utils
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
@ -66,7 +67,10 @@ def present(name,
|
|||
if policy:
|
||||
if policy.get('pattern') != pattern:
|
||||
updates.append('Pattern')
|
||||
if policy.get('definition') != definition:
|
||||
current_definition = policy.get('definition')
|
||||
current_definition = json.loads(current_definition) if current_definition else ''
|
||||
new_definition = json.loads(definition) if definition else ''
|
||||
if current_definition != new_definition:
|
||||
updates.append('Definition')
|
||||
if int(policy.get('priority')) != priority:
|
||||
updates.append('Priority')
|
||||
|
|
Loading…
Add table
Reference in a new issue