community / community.general / 6.6.8 / module / pritunl_user Manage Pritunl Users using the Pritunl API | "added in version" 2.3.0 of community.general" Authors: Florian Dambrine (@Lowess)community.general.pritunl_user (6.6.8) — module
Install with ansible-galaxy collection install community.general:==6.6.8
collections: - name: community.general version: 6.6.8
A module to manage Pritunl users using the Pritunl API.
- 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
state: choices: - present - absent default: present description: - If C(present), the module adds user I(user_name) to the Pritunl I(organization). If C(absent), removes the user I(user_name) from the Pritunl I(organization). type: str user_name: default: null description: - Name of the user to create or delete from Pritunl. required: true type: str user_type: choices: - client - server default: client description: - Type of the user I(user_name). required: false type: str user_email: default: null description: - Email address associated with the user I(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 user_groups: default: null description: - List of groups associated with the user I(user_name). elements: str required: false type: list organization: aliases: - org description: - The name of the organization the user is part of. required: true type: str user_disabled: default: null description: - Enable/Disable the user I(user_name). required: false type: bool user_gravatar: default: null description: - Enable/Disable Gravatar usage for the user I(user_name). required: false type: bool validate_certs: default: true description: - If certificates should be validated or not. - This should never be set to C(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 user_mac_addresses: description: - Allowed MAC addresses for the user I(user_name). elements: str type: list version_added: 5.0.0 version_added_collection: community.general
response: description: JSON representation of Pritunl Users. 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: dict