effectivelywild.technitium_dns.technitium_dns_set_permission_details module – Set permission details for a specific section
Note
This module is part of the effectivelywild.technitium_dns collection (version 0.9.1).
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 effectivelywild.technitium_dns.
To use it in a playbook, specify: effectivelywild.technitium_dns.technitium_dns_set_permission_details.
New in effectivelywild.technitium_dns 0.5.0
Synopsis
Change permissions for a specific section.
Allows setting user permissions and group permissions with view, modify, and delete access.
Built-in groups (Administrators, DHCP Administrators, DNS Administrators) are automatically preserved and cannot be cleared.
Parameters
Parameter |
Comments |
|---|---|
Port for the Technitium DNS API. Defaults to 5380 Default: |
|
API token for authenticating with the Technitium DNS API |
|
Base URL for the Technitium DNS API |
|
List of group permissions to set for this section Each item should contain group name, canView, canModify, and canDelete |
|
Whether the group can delete from this section Choices:
|
|
Whether the group can modify this section Choices:
|
|
Whether the group can view this section Choices:
|
|
Group name to set permissions for |
|
The name of the section to set permissions for Should match a section name from the list permissions API call |
|
List of user permissions to set for this section Each item should contain username, canView, canModify, and canDelete |
|
Whether the user can delete from this section Choices:
|
|
Whether the user can modify this section Choices:
|
|
Whether the user can view this section Choices:
|
|
Username to set permissions for |
|
Whether to validate SSL certificates when making API requests Choices:
|
See Also
See also
- effectivelywild.technitium_dns.technitium_dns_get_permission_details
Get permission details for a specific section
- effectivelywild.technitium_dns.technitium_dns_list_permissions
List all permissions
- effectivelywild.technitium_dns.technitium_dns_list_users
List all users
- effectivelywild.technitium_dns.technitium_dns_list_groups
List all groups
Examples
- name: Set Dashboard permissions for a user
technitium_dns_set_permission_details:
api_url: "http://localhost"
api_token: "myapitoken"
section: "Dashboard"
userPermissions:
- username: "testuser"
canView: true
canModify: true
canDelete: false
- name: Set Cache permissions for a group
technitium_dns_set_permission_details:
api_url: "http://localhost"
api_token: "myapitoken"
section: "Cache"
groupPermissions:
- name: "testgroup"
canView: true
canModify: true
canDelete: true
- name: Set both user and group permissions for Zones
technitium_dns_set_permission_details:
api_url: "http://localhost"
api_token: "myapitoken"
section: "Zones"
userPermissions:
- username: "user1"
canView: true
canModify: false
canDelete: false
groupPermissions:
- name: "Administrators"
canView: true
canModify: true
canDelete: true
- name: "Everyone"
canView: true
canModify: false
canDelete: false
- name: Clear all user permissions for a section
technitium_dns_set_permission_details:
api_url: "http://localhost"
api_token: "myapitoken"
section: "Dashboard"
userPermissions: []
- name: Clear all group permissions (built-in groups are preserved automatically)
technitium_dns_set_permission_details:
api_url: "http://localhost"
api_token: "myapitoken"
section: "Dashboard"
groupPermissions: [] # Built-in groups like Administrators will be preserved
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Complete raw API response from Technitium DNS Returned: always |
|
Updated permission details from the API Returned: success |
|
Updated group permissions for this section Returned: always |
|
The name of the permission section Returned: always Sample: |
|
Updated user permissions for this section Returned: always |
|
API response status Returned: always Sample: |
|
Whether the module made changes Returned: always Sample: |
|
Dictionary showing what changed, with current and desired values Returned: when changes are made Sample: |
|
Whether the module failed Returned: always Sample: |
|
Human readable message describing the result Returned: always Sample: |