code: def list_running():
      '''
      Lists running nspawn containers
  
      .. note::
  
          ``nspawn.list`` also works to list running containers
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion nspawn.list_running
          salt myminion nspawn.list
      '''
      ret = []
      for line in _machinectl('list')['stdout'].splitlines():
          try:
              ret.append(line.split()[0])
          except IndexError:
              pass
      return sorted(retf list_running():
      '''
      Lists running nspawn containers
  
      .. note::
  
          ``nspawn.list`` also works to list running containers
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion nspawn.list_running
          salt myminion nspawn.list
      '''
      ret = []
      for line in _machinectl('list')['stdout'].splitlines():
          try:
              ret.append(line.split()[0])
          except IndexError:
              pass
      return sorted(ret)
docs: Lists running nspawn containers
  
      .. note::
  
          ``nspawn.list`` also works to list running containers
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion nspawn.list_running
          salt myminion nspawn.list