effectivelywild.technitium_dns.technitium_dns_set_user_details module – Set user account profile details in Technitium DNS server

Note

This module is part of the effectivelywild.technitium_dns collection (version 0.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 effectivelywild.technitium_dns.

To use it in a playbook, specify: effectivelywild.technitium_dns.technitium_dns_set_user_details.

New in effectivelywild.technitium_dns 0.4.0

Synopsis

  • Change user account profile details in Technitium DNS server.

  • Allows modifying display name, username, password, enabled/disabled status, session timeout, and group memberships.

Parameters

Parameter

Comments

api_port

integer

Port for the Technitium DNS API. Defaults to 5380

Default: 5380

api_token

string / required

API token for authenticating with the Technitium DNS API

api_url

string / required

Base URL for the Technitium DNS API

disabled

boolean

Set true to disable the user account and delete all its active sessions

Choices:

  • false

  • true

displayName

string

The display name for the user account

iterations

integer

The number of iterations for PBKDF2 SHA256 password hashing. Only used with newPassword option.

memberOfGroups

list / elements=string

A list of group names that the user must be set as a member

newPassword

string

A new password to reset the user account password

newUsername

string

A new username for renaming the user account

sessionTimeoutSeconds

integer

A session timeout value in seconds for the user account

username

string / required

The username for the user account to modify

validate_certs

boolean

Whether to validate SSL certificates when making API requests

Choices:

  • false

  • true ← (default)

See Also

See also

effectivelywild.technitium_dns.technitium_dns_create_user

Create a user account in Technitium DNS server

effectivelywild.technitium_dns.technitium_dns_delete_user

Delete a user from Technitium DNS server

effectivelywild.technitium_dns.technitium_dns_get_user_details

Get user account details from Technitium DNS server

effectivelywild.technitium_dns.technitium_dns_list_users

List all users from Technitium DNS server

Examples

- name: Update user display name
  technitium_dns_set_user_details:
    api_url: "http://localhost"
    api_token: "myapitoken"
    username: "testuser"
    displayName: "Updated Test User"

- name: Disable user account
  technitium_dns_set_user_details:
    api_url: "http://localhost"
    api_token: "myapitoken"
    username: "testuser"
    disabled: true

- name: Change user groups and session timeout
  technitium_dns_set_user_details:
    api_url: "http://localhost"
    api_token: "myapitoken"
    username: "testuser"
    memberOfGroups:
      - "DNS Administrators"
      - "DHCP Administrators"
    sessionTimeoutSeconds: 3600

- name: Reset user password
  technitium_dns_set_user_details:
    api_url: "http://localhost"
    api_token: "myapitoken"
    username: "testuser"
    newPassword: "NewSecurePassword123!"
    iterations: 100000

- name: Rename user account
  technitium_dns_set_user_details:
    api_url: "http://localhost"
    api_token: "myapitoken"
    username: "oldusername"
    newUsername: "newusername"

- name: Check what would change (check mode)
  technitium_dns_set_user_details:
    api_url: "http://localhost"
    api_token: "myapitoken"
    username: "testuser"
    displayName: "New Display Name"
    disabled: false
  check_mode: true

Return Values

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

Key

Description

api_response

dictionary

Complete raw API response from Technitium DNS

Returned: always

response

dictionary

Updated user details from the API

Returned: always

disabled

boolean

Whether the user account is disabled

Returned: always

Sample: false

displayName

string

Display name of the user

Returned: always

Sample: "Updated Test User"

memberOfGroups

list / elements=string

List of groups the user is a member of

Returned: always

Sample: ["Administrators"]

sessionTimeoutSeconds

integer

Session timeout in seconds

Returned: always

Sample: 1800

username

string

Username of the user account

Returned: always

Sample: "testuser"

status

string

API response status

Returned: always

Sample: "ok"

changed

boolean

Whether the module made changes

Returned: always

Sample: true

diff

dictionary

Dictionary showing what changed, with current and desired values

Returned: when changes are made

Sample: {"displayName": {"current": "Old Name", "desired": "New Name"}, "memberOfGroups": {"current": ["Administrators"], "desired": ["DNS Administrators", "DHCP Administrators"]}}

failed

boolean

Whether the module failed

Returned: always

Sample: false

msg

string

Human readable message describing the result

Returned: always

Sample: "User details updated successfully."

Authors

  • Frank Muise (@effectivelywild)