effectivelywild.technitium_dns.technitium_dns_list_sessions module – List active user sessions

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_list_sessions.

New in effectivelywild.technitium_dns 0.5.0

Synopsis

  • Retrieve a list of all active user sessions.

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

validate_certs

boolean

Whether to validate SSL certificates when making API requests.

Choices:

  • false

  • true ← (default)

See Also

Examples

- name: List all active sessions from Technitium DNS
  technitium_dns_list_sessions:
    api_url: "http://localhost"
    api_token: "myapitoken"
  register: result

- debug:
    var: result.sessions

Return Values

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

Key

Description

changed

boolean

Whether the module made changes (always false for list operations)

Returned: always

Sample: false

failed

boolean

Whether the module failed

Returned: always

Sample: false

sessions

list / elements=dictionary

List of active sessions from the Technitium DNS server

Returned: always

isCurrentSession

boolean

Whether this is the current session

Returned: always

Sample: true

lastSeen

string

Timestamp of last activity (ISO 8601 format)

Returned: always

Sample: "2022-09-17T13:23:44.9972772Z"

lastSeenRemoteAddress

string

Remote IP address of last activity

Returned: always

Sample: "127.0.0.1"

lastSeenUserAgent

string

User agent string of last activity

Returned: always

Sample: "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0"

partialToken

string

Partial token for the session

Returned: always

Sample: "272f4890427b9ab5"

tokenName

string

Name of the API token (null for standard sessions)

Returned: always

Sample: "MyToken1"

type

string

Type of session (Standard or ApiToken)

Returned: always

Sample: "Standard"

username

string

Username for the session

Returned: always

Sample: "admin"

Authors

  • Frank Muise (@effectivelywild)