@ -25,6 +25,10 @@ class ActionModule(ActionBase):
TRANSFERS_FILES = False
TRANSFERS_FILES = False
UNUSED_PARAMS = {
' systemd ' : [ ' pattern ' , ' runlevels ' , ' sleep ' , ' arguments ' ] ,
}
def run ( self , tmp = None , task_vars = None ) :
def run ( self , tmp = None , task_vars = None ) :
''' handler for package operations '''
''' handler for package operations '''
if task_vars is None :
if task_vars is None :
@ -59,6 +63,12 @@ class ActionModule(ActionBase):
if ' state ' in new_module_args and new_module_args [ ' state ' ] == ' running ' :
if ' state ' in new_module_args and new_module_args [ ' state ' ] == ' running ' :
new_module_args [ ' state ' ] = ' started '
new_module_args [ ' state ' ] = ' started '
if module in self . UNUSED_PARAMS :
for unused in self . UNUSED_PARAMS [ module ] :
if unused in new_module_args :
del new_module_args [ unused ]
self . _display . warning ( ' Ignoring " %s " as it is not used in " %s " ' % ( unused , module ) )
self . _display . vvvv ( " Running %s " % module )
self . _display . vvvv ( " Running %s " % module )
result . update ( self . _execute_module ( module_name = module , module_args = new_module_args , task_vars = task_vars ) )
result . update ( self . _execute_module ( module_name = module , module_args = new_module_args , task_vars = task_vars ) )
else :
else :