community.general.pritunl_org (8.5.0) — module

Manages 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 manage Pritunl organizations using the Pritunl API.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure the organization named MyOrg exists
  community.general.pritunl_org:
    state: present
    name: MyOrg
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure the organization named MyOrg does not exist
  community.general.pritunl_org:
    state: absent
    name: MyOrg

Inputs

    
name:
    aliases:
    - org
    description:
    - The name of the organization to manage in Pritunl.
    required: true
    type: str

force:
    default: false
    description:
    - If O(force) is V(true) and O(state) is V(absent), the module will delete the organization,
      no matter if it contains users or not. By default O(force) is V(false), which will
      cause the module to fail the deletion of the organization when it contains users.
    type: bool

state:
    choices:
    - present
    - absent
    default: present
    description:
    - If V(present), the module adds organization O(name) to Pritunl. If V(absent), attempt
      to delete the organization from Pritunl (please read about O(force) usage).
    type: str

pritunl_url:
    description:
    - URL and port of the Pritunl server on which the API is enabled.
    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

response:
  description: JSON representation of a Pritunl Organization.
  returned: success
  sample:
    auth_api: false
    auth_secret: null
    auth_token: null
    id: csftwlu6uhralzi2dpmhekz3
    name: Foo
    user_count: 0
  type: dict