On this page
community.general.pritunl_org – Manages Pritunl Organizations using the Pritunl API
Note
This plugin is part of the community.general collection (version 3.8.1).
You might already have this collection installed if you are using the ansible package. 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_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
         | 
      
       
  | 
      
        
        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
         | 
      
       
  | 
      
        
        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
         | 
      
       
  | 
      
        
        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)
 
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
 https://docs.ansible.com/ansible/latest/collections/community/general/pritunl_org_module.html