community.general.pritunl_org – Manages Pritunl Organizations using the Pritunl API

Note

This plugin is part of the community.general collection (version 2.5.1).

To install it use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.pritunl_org.

New in version 2.5.0: of community.general

Synopsis

  • A module to manage Pritunl organizations using the Pritunl API.

Parameters

Parameter Choices/Defaults Comments
force
boolean
    Choices:
  • no ←
  • yes
If force is true and state is absent, the module will delete the organization, no matter if it contains users or not. By default force is false, which will cause the module to fail the deletion of the organization when it contains users.
name
string / required
The name of the organization to manage in Pritunl.

aliases: org
pritunl_api_secret
string / required
API Secret found in Administrators > USERNAME > API Secret.
pritunl_api_token
string / required
API Token of a Pritunl admin user.
It needs to be enabled in Administrators > USERNAME > Enable Token Authentication.
pritunl_url
string / required
URL and port of the Pritunl server on which the API is enabled.
state
string
    Choices:
  • present ←
  • absent
If present, the module adds organization name to Pritunl. If absent, attempt to delete the organization from Pritunl (please read about force usage).
validate_certs
boolean
    Choices:
  • no
  • yes ←
If certificates should be validated or not.
This should never be set to false, except if you are very sure that your connection to the server can not be subject to a Man In The Middle attack.

Examples

- name: Ensure the organization named MyOrg exists
  community.general.pritunl_org:
    state: present
    name: MyOrg

- name: Ensure the organization named MyOrg does not exist
  community.general.pritunl_org:
    state: absent
    name: MyOrg

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
response
dictionary
success
JSON representation of a Pritunl Organization.

Sample:
{'auth_api': False, 'auth_secret': 'None', 'auth_token': 'None', 'id': 'csftwlu6uhralzi2dpmhekz3', 'name': 'Foo', 'user_count': 0}


Authors

  • Florian Dambrine (@Lowess)