community.general.pritunl_user module – Manage Pritunl Users using the Pritunl API
Note
This module is part of the community.general collection (version 9.4.0).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.pritunl_user
.
New in community.general 2.3.0
Synopsis
A module to manage Pritunl users using the Pritunl API.
Parameters
Parameter |
Comments |
---|---|
The name of the organization the user is part of. |
|
API Secret found in Administrators > USERNAME > API Secret. |
|
API Token of a Pritunl admin user. It needs to be enabled in Administrators > USERNAME > Enable Token Authentication. |
|
URL and port of the Pritunl server on which the API is enabled. |
|
If Choices:
|
|
Email address associated with the user |
|
List of groups associated with the user |
|
Allowed MAC addresses for the user |
|
Name of the user to create or delete from Pritunl. |
|
If certificates should be validated or not. This should never be set to Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: none |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Create the user Foo with email address foo@bar.com in MyOrg
community.general.pritunl_user:
state: present
organization: MyOrg
user_name: Foo
user_email: foo@bar.com
user_mac_addresses:
- "00:00:00:00:00:99"
- name: Disable the user Foo but keep it in Pritunl
community.general.pritunl_user:
state: present
organization: MyOrg
user_name: Foo
user_email: foo@bar.com
user_disabled: true
- name: Make sure the user Foo is not part of MyOrg anymore
community.general.pritunl_user:
state: absent
organization: MyOrg
user_name: Foo
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
JSON representation of Pritunl Users. Returned: success Sample: |