code: def regen_keys():
      '''
      Used to regenerate the minion keys.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' saltutil.regen_keys
      '''
      for fn_ in os.listdir(__opts__['pki_dir']):
          path = os.path.join(__opts__['pki_dir'], fn_)
          try:
              os.remove(path)
          except os.error:
              pass
      # TODO: move this into a channel function? Or auth?
      # create a channel again, this will force the key regen
      channel = salt.transport.client.ReqChannel.factory(__opts__)
      channel.close(f regen_keys():
      '''
      Used to regenerate the minion keys.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' saltutil.regen_keys
      '''
      for fn_ in os.listdir(__opts__['pki_dir']):
          path = os.path.join(__opts__['pki_dir'], fn_)
          try:
              os.remove(path)
          except os.error:
              pass
      # TODO: move this into a channel function? Or auth?
      # create a channel again, this will force the key regen
      channel = salt.transport.client.ReqChannel.factory(__opts__)
      channel.close()
docs: Used to regenerate the minion keys.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' saltutil.regen_keys