Default variable details
some of debops.saslauthd default variables have more extensive
configuration than simple strings or lists, here you can find documentation and
examples for them.
saslauthd__instances
The saslauthd__*_instances variables are used to configure separate
instances of the saslauthd daemon for different services. The
variables are merged together in the order defined by the
saslauthd__combined_instances variable, therefore it's possible to
modify existing instances defined by the role through Ansible inventory.
Each variable is defined as a list of YAML dictionaries with specific parameters:
nameRequired. Name of a given saslauthd instance. Used as a suffix of the
/etc/default/saslauthd-*configuration files.config_pathRequired. Absolute path where SASL configuration file will be created.
socket_pathRequired. Absolute path to a directory where saslauthd UNIX domain socket will be placed.
stateOptional. If not specified or
present, a given instance will be configured. Ifabsent, a given instance will be removed. Ifignore, a given instance will not be managed by the role.groupOptional. Ensure that the specified UNIX group is present on the host. This might be needed if directories or files should use non-default UNIX groups. Only one group can be specified at once.
systemOptional, boolean. If not specified or
True, the created UNIX group will be a system group with GID < 1000. IfFalse, it will be a normal group with GID >= 1000.notifyOptional. String or a list which contains names of the Ansible handlers to notify when a configuration changes. This parameter makes sense only in dependent configuration, because the handlers need to be present in a given Ansible playbook.
The parameters specified next are used and related to the saslauthd
daemon configuration files located in /etc/default/saslauthd-*:
startOptional, boolean. If not specified or
True, a given instance will be automatically started at system boot. ifFalse, it won't be started automatically.desc,descriptionOptional. A string that describes a given saslauthd daemon instance in the configuration file.
mech,mechanism,mechanismsOptional. Specify the authentication mechanism to use by a given saslauthd instance. If not specified,
pamis used by default.mech_optionsOptional. Custom options defined for a given authorization mechanism.
threadsOptional. Number of process threads to start for a given saslauthd instance. If not specified, the number of threads will be equal to the number of VCPU cores of a given host.
daemon_optionsOptional. Additional saslauthd daemon options for a given instance. If not specified,
-cis added by default.ldap_profileOptional. Name of the LDAP profile to use for a given saslauthd instance. If not specified, the
globalprofile located in the/etc/saslauthd.confconfiguration file will be used by default. This parameter is only valid with theldapauthentication mechanism enabled.
The following parameters are related to the SASL configuration file generated for a given instance:
config_dir_ownerOptional. The owner of the directory with the configuration file. If not specified,
rootis used by default.config_dir_groupOptional. The primary group of the directory with the configuration file. If not specified,
rootis used by default.config_dir_modeOptional. The permissions of the directory with the configuration file. If not specified,
0755is set by default.config_ownerOptional. The UNIX account which will be the owner of the configuration file. If not specified,
rootwill be the owner.config_groupOptional. The UNIX group which will be the primary group of the configuration file. If not specified,
saslwill be used by default.config_modeOptional. The permissions set for the configuration file. If not specified,
0640permissions will be set by default.config_rawOptional. a string or YAML text block with the SASL configuration which will be placed in the configuration file as-is.
These parameters are related to the UNIX socket of a given saslauthd instance:
socket_ownerOptional. The UNIX account which will be set as the owner of the directory where the saslauthd UNIX socket is located. If not specified,
rootwill be used by default.socket_groupOptional. The UNIX group which will be set as the primary group of the directory with the saslauthd UNIX socket. If not specified,
saslwill be used by default.socket_modeOptional. The permissions of the directory with the saslauthd UNIX socket. If not specified,
0710will be used by default.
Examples
Modify existing Postfix configuration to connect to a PostgreSQL database:
saslauthd__instances:
- name: 'smtpd'
config_raw: |
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login cram-md5 digest-md5
sql_engine: pgsql
sql_hostnames: 127.0.0.1
sql_user: postfix
sql_passwd: password
sql_database: mail
sql_select: select password from mailboxes where name='%u' and domain='%r' and smtp_enabled=1
saslauthd__ldap_profiles
The saslauthd__ldap_*_profiles variables define a list of "LDAP profiles",
/etc/saslauthd-*.conf configuration files which configure the ldap
SASL authentication mechanism. The saslauthd service instances can
select a LDAP profile to use, or if not defined, will fall back to the
/etc/saslauthd.conf configuration file which is defined in the
global LDAP profile.
Examples
Check the saslauthd__ldap_default_profiles variable for a set of
default LDAP profiles defined in the role.
The manual for the /etc/saslauthd.conf configuration file is not
available in Debian directly. You can find it in the cyrus-sasl2-doc APT
package, in the /usr/share/doc/cyrus-sasl2-doc/LDAP_SASLAUTHD.gz file.
Syntax
Each LDAP profile definition is a YAML dictionary with specific parameters:
nameRequired. The name of the LDAP profile, used in the filename. You can select a given LDAP profile in the SASL instance configuration by specifying this name in the
ldap_profileparameter.Multiple configuration entries with the same
nameparameter are merged together and can affect each other.stateOptional. If not specified or
present, a given LDAP profile configuration file is created on the host. Ifabsent, a given LDAP profile will be removed from the host. Ifignore, this configuration entry will not be evaluated by the role during execution.ownerOptional. The UNIX account which will be the owner of the generated configuration file. If not specified,
rootis used by default.groupOptional. The UNIX group of the generated configuration file. If not specified,
saslis used by default.modeOptional. The mode of the generated configuration file. If not specified,
0640is used by default.rawOptional. String or YAML text block with contents of the
/etc/saslauthd.confconfiguration, inserted in the configuration file as-is.optionsOptional. If the
rawconfiguration parameter is not specified, this parameter can be used to define the contents of the configuration file. Theoptionsparameters from multiple configuration entries with the samenameparameter are merged together, and can affect each other.The configuration is defined as a list of YAML dictionaries with specific parameters:
nameThe name of the configuration option.
valueThe value of the configuration option, defined as a string or a YAML list which list elements joined by spaces.
stateIf not specified or
present, a given configuration option will be present in the generated file. Ifabsent, a given configuration option will be removed from the generated file.