community.general.sssd_info module – Check SSSD domain status using D-Bus

Note

This module is part of the community.general collection (version 12.2.0).

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. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: community.general.sssd_info.

New in community.general 12.2.0

Synopsis

  • Check the online status of SSSD domains, list domains, and retrieve active servers using D-Bus.

Requirements

The below requirements are needed on the host that executes this module.

  • dbus

Parameters

Parameter

Comments

action

string / required

The action to perform.

Choices:

  • "active_servers": Get active servers for domain.

  • "domain_list": List all configured domains.

  • "domain_status": Check if domain is online.

  • "list_servers": List all servers for domain.

domain

string

Domain name to check.

Required unless action=domain_list.

When action=domain_list, this parameter is ignored and the module returns a list of all configured domains.

server_type

string

Required parameter when action=active_servers and action=list_servers.

Optional and ignored for all other actions.

At this point, the module supports ONLY the types IPA for FreeIPA servers and AD.

Choices:

  • "IPA"

  • "AD"

Attributes

Attribute

Support

Description

check_mode

Support: full

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: none

Returns details on what has changed (or possibly needs changing in check_mode), when in diff mode.

platform

Platform: posix

This action requires a system with D-Bus and SSSD running.

Examples

- name: Check SSSD domain status
  community.general.sssd_info:
    action: domain_status
    domain: example.com
  register: sssd_status_result

- name: Get domain list
  community.general.sssd_info:
    action: domain_list
  register: domain_list_result

- name: Get active IPA servers for a domain
  community.general.sssd_info:
    action: active_servers
    domain: example.com
    server_type: IPA
  register: active_servers_result

- name: List servers for a domain
  community.general.sssd_info:
    action: list_servers
    domain: example.com
    server_type: AD
  register: list_servers_result

Return Values

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

Key

Description

domain_list

list / elements=string

List of SSSD domains.

Returned: when action=domain_list

Sample: ["ipa.domain", "winad.test"]

list_servers

list / elements=string

List of servers for the specified domain.

Returned: when action=list_servers

Sample: ["server1.winad.test", "server2.winad.test"]

online

string

The online status of the SSSD domain.

Returned: when action=domain_status

Sample: "online"

servers

dictionary

Active servers for the specified domain and type.

Returned: when action=active_servers

Sample: {"Domain Server": "server2.winad.test", "Global Catalog": "server1.winad.test"}

Authors

  • Aleksandr Gabidullin (@a-gabidullin)