code: def on_action_run(self, task_vars, delegate_to_hostname, loader_basedir):
          
          self.inventory_hostname = task_vars['inventory_hostname']
          self._task_vars = task_vars
          self.host_vars = task_vars['hostvars']
          self.delegate_to_hostname = delegate_to_hostname
          self.loader_basedir = loader_basedir
          self._mitogen_reset(mode='put')
docs: Invoked by ActionModuleMixin to indicate a new task is about to start
          executing. We use the opportunity to grab relevant bits from the
          task-specific data.
  
          :param dict task_vars:
              Task variable dictionary.
          :param str delegate_to_hostname:
              :data:`None`, or the template-expanded inventory hostname this task
              is being delegated to. A similar variable exists on PlayContext
              when ``delegate_to:`` is active, however it is unexpanded.
          :param str loader_basedir:
              Loader base directory; see :attr:`loader_basedir`.