effectivelywild.technitium_dns.technitium_dns_create_user module – Create a user account 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_create_user.

New in effectivelywild.technitium_dns 0.4.0

Synopsis

  • Create a new user account in Technitium DNS server using its API.

  • This will not update existing users; it only creates new ones (see technitium_dns_set_user_details).

  • Note that the password is passed in plaintext to the API and could be logged depending on your setup.

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

displayName

string / required

The display name for the user account

password

string / required

A password for the user account

username

string / required

A unique username for the user account

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_list_users

List all users from 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_set_user_details

Set user account details on Technitium DNS server

Examples

- name: Create a user account
  technitium_dns_create_user:
    api_url: "http://localhost"
    api_token: "myapitoken"
    username: "testuser"
    password: "securepassword"
    displayName: "Test User"

- name: Create user in check mode
  technitium_dns_create_user:
    api_url: "http://localhost"
    api_token: "myapitoken"
    username: "checkuser"
    password: "testpass"
    displayName: "Check Mode User"
  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

The core data payload from the API

Returned: always

disabled

boolean

Whether the user account is disabled

Returned: always

Sample: false

displayName

string

Display name of the created user

Returned: always

Sample: "Test User"

previousSessionLoggedOn

string

Timestamp of previous session login

Returned: always

Sample: "0001-01-01T00:00:00"

previousSessionRemoteAddress

string

Remote IP address of previous session

Returned: always

Sample: "0.0.0.0"

recentSessionLoggedOn

string

Timestamp of most recent session login

Returned: always

Sample: "0001-01-01T00:00:00"

recentSessionRemoteAddress

string

Remote IP address of most recent session

Returned: always

Sample: "0.0.0.0"

username

string

Username of the created user

Returned: always

Sample: "testuser"

status

string

API response status

Returned: always

Sample: "ok"

changed

boolean

Whether the module made changes to create a new user

Returned: always

Sample: true

failed

boolean

Whether the module failed to complete the user creation

Returned: always

Sample: false

msg

string

Human-readable message describing the user creation result

Returned: always

Sample: "User 'testuser' created."

Authors

  • Frank Muise (@effectivelywild)