def _get_script_action_method(self): task = WrappedCallableTask(self._run_script_with_settings, name=self.name, alias=self.action_exec_id, parallel=self.parallel, sudo=self.sudo) task.parallel = self.parallel task.serial = not self.parallel return task
def get_fabric_task(self): action_method = self._get_action_method() LOG.debug('action_method is %s', action_method) task = WrappedCallableTask(action_method, name=self.name, alias=self.action_exec_id, parallel=self.parallel, sudo=self.sudo) # We need to explicitly set that since WrappedCallableTask abuses kwargs # and doesn't do anything with "parallel" and "serial" kwarg. # We also need to explicitly set serial since we default to # parallel=True in the environment so just "parallel" won't do. task.parallel = self.parallel task.serial = not self.parallel return task