community.general.pritunl_org_info (8.5.0) — module

List Pritunl Organizations using the Pritunl API

| "added in version" 2.5.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 organizations using the Pritunl API.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List all existing Pritunl organizations
  community.general.pritunl_org_info:
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Search for an organization named MyOrg
  community.general.pritunl_user_info:
    organization: MyOrg

Inputs

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

organization:
    aliases:
    - org
    default: null
    description:
    - Name of the Pritunl organization to search for. If none provided, the module will
      return all Pritunl organizations.
    required: false
    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

organizations:
  description: List of Pritunl organizations.
  elements: dict
  returned: success
  sample:
  - auth_api: false
    auth_secret: null
    auth_token: null
    id: csftwlu6uhralzi2dpmhekz3
    name: FooOrg
    user_count: 0
  - auth_api: false
    auth_secret: null
    auth_token: null
    id: 58070daee63f3b2e6e472c36
    name: MyOrg
    user_count: 3
  - auth_api: false
    auth_secret: null
    auth_token: null
    id: v1sncsxxybnsylc8gpqg85pg
    name: BarOrg
    user_count: 0
  type: list