diff --git a/ipaplatform/base/tasks.py b/ipaplatform/base/tasks.py index 9b15119c4..ff71c2bd1 100644 --- a/ipaplatform/base/tasks.py +++ b/ipaplatform/base/tasks.py @@ -152,7 +152,8 @@ class BaseTaskNamespace(object): :param required_settings: A dictionary mapping the boolean names to desired_values. - The desired value can be 'on' or 'off'. + The desired value can be 'on' or 'off', + or None to leave the setting unchanged. :param backup_func: A function called for each boolean with two arguments: the name and the previous value diff --git a/ipaplatform/redhat/tasks.py b/ipaplatform/redhat/tasks.py index cb0a27f73..b26604aa7 100644 --- a/ipaplatform/redhat/tasks.py +++ b/ipaplatform/redhat/tasks.py @@ -363,6 +363,8 @@ class RedHatTaskNamespace(BaseTaskNamespace): updated_vars = {} failed_vars = {} for setting, state in required_settings.iteritems(): + if state is None: + continue try: (stdout, stderr, rc) = ipautil.run([paths.GETSEBOOL, setting]) original_state = stdout.split()[2]