community.general.pritunl_user_info (8.5.0) — module

List Pritunl Users using the Pritunl API

| "added in version" 2.3.0 of community.general"

Authors: Florian Dambrine (@Lowess)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

A module to list Pritunl users using the Pritunl API.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List all existing users part of the organization MyOrg
  community.general.pritunl_user_info:
    state: list
    organization: MyOrg
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Search for the user named Florian part of the organization MyOrg
  community.general.pritunl_user_info:
    state: list
    organization: MyOrg
    user_name: Florian

Inputs

    
user_name:
    description:
    - Name of the user to filter on Pritunl.
    required: false
    type: str

user_type:
    choices:
    - client
    - server
    default: client
    description:
    - Type of the user O(user_name).
    required: false
    type: str

pritunl_url:
    description:
    - URL and port of the Pritunl server on which the API is enabled.
    required: true
    type: str

organization:
    aliases:
    - org
    description:
    - The name of the organization the user is part of.
    required: true
    type: str

validate_certs:
    default: true
    description:
    - If certificates should be validated or not.
    - This should never be set to V(false), except if you are very sure that your connection
      to the server can not be subject to a Man In The Middle attack.
    required: false
    type: bool

pritunl_api_token:
    description:
    - API Token of a Pritunl admin user.
    - It needs to be enabled in Administrators > USERNAME > Enable Token Authentication.
    required: true
    type: str

pritunl_api_secret:
    description:
    - API Secret found in Administrators > USERNAME > API Secret.
    required: true
    type: str

Outputs

users:
  description: List of Pritunl users.
  elements: dict
  returned: success
  sample:
  - audit: false
    auth_type: google
    bypass_secondary: false
    client_to_client: false
    disabled: false
    dns_mapping: null
    dns_servers: null
    dns_suffix: null
    email: foo@bar.com
    gravatar: true
    groups:
    - foo
    - bar
    id: 5d070dafe63q3b2e6s472c3b
    name: foo@acme.com
    network_links: []
    organization: 58070daee6sf342e6e4s2c36
    organization_name: Acme
    otp_auth: true
    otp_secret: 35H5EJA3XB2$4CWG
    pin: false
    port_forwarding: []
    servers: []
  type: list