Default variable details¶
debops.avahi default variables have more extensive configuration
than simple strings or lists, here you can find documentation and examples for
avahi__daemon_conf_* variables are used to specify what parameters
should be present in the
file. Each pair of variables manages one section of the INI file. The "default"
variable is combined with the custom variable therefore it's possible to change
the value of a parameter without the need to copy the entire variable over to
the Ansible inventory.
Each variable is a YAML dictionary with keys representing the available
parameters and values representing the parameter values. You can use boolean
YAML values (
False) to specify
no values, as well
as strings and numbers. if a value is an empty string, the corresponding
parameter will be commented out in the finished configuration file.
See the avahi-daemon.conf(5) manual page for information about recognized parameters and their meaning.
avahi__*_services variables define the services published by Avahi on
.local domain. The variables are either YAML dictionaries or YAML lists
of dictionaries that are combined together in the
avahi__combined_services in the order they appear in the
Each entry in the
avahi__*_services variables is a YAML dictionary with
Name of the configuration file that holds the service details. The name will be used in the file path in the format:
If the filename is not specified and the main variable uses the YAML dictionary format, the dictionary key will be used as the filename. The examples below are equivalent:
avahi__services: 'example-service': name: 'Example service on %h' type: '_example._tcp' port: '1234' avahi__host_services: - filename: 'example-service' name: 'Example service on %h' type: '_example._tcp' port: '1234'
- Optional. A YAML list of services defined by this entry and encloses in
a service group. Each list item is a YAML dictionary that specifies given
service parameters. If the
servicesparameter is not specified, role will automatically generate one based on parameters defined in the main entry. This parameter is only useful in applications that define multiple services, which can be defined together in a service group, otherwise you can use the simpler syntax.
A string similar to a SRV record that defines the service type and protocol (it's similar in a way that only the service name and protocol are relevant, other parts of the SRV record shouldn't be used). Example service types are
_http._tcp. The list of possible service names can be found in the Service Name and Transport Protocol Port Number Registry maintained by IANA.
If the type is not specified and a given entry has no separate
serviceslist defined, the service will not be published. This can be used to define host CNAME entries without associated service (see below).
- Optional. Either a string, or a YAML list of additional subtypes to publish
for this service. Example subtype definition:
- Optional. Specify the port number on which a given service listens for new
connections. If it's not specified, the port number for this service will be
- Optional. Custom description of a service, displayed in compatible Avahi clients. If not specified, the host's hostname will be used instead.
- Optional, boolean. If not defined or
True, Avahi will replace the
%hwildcard in the service description with the host's hostname. Setting this parameter to
Falsewill turn off the replacement.
- Optional. Specify which network to publish the service on, either IPv4, IPv6
or both (default). Possible values:
- Optional. Publish the service on a different domain than the default
.localdomain used by Avahi.
- Optional. Specify a different FQDN for a given service. This can be used to
publish services on behalf of other hosts on the network that do not support
Avahi themselves. You also need to register the host A/AAAA record separately
for the Avahi to correctly publish the service record.
avahi__hostsfor more details.
- Optional. String or YAML list of custom TXT records which should be published for this service. These records are used to provide additional information about the service, configuration options, etc.
The parameters below are additional and related to the role itself, rather than to the Avahi services:
- Optional. String or YAML text block with additional comments included in the service configuration file.
- Optional. If not specified or
present, the Avahi service will be configured. If
absent, the configuration of a given Avahi service will be removed.
Optional. Specify a custom CNAME record which will be used to register a host alias using the avahi-alias script. The CNAME record will point to the originating host. See Avahi CNAME (alias) support for more details. You can define
avahi__*_servicesentries that only publish CNAME records by not specifying a type, for example:
avahi__services: - filename: 'custom-cname-of-host' cname: 'custom' avahi__host_services: 'other-example': cname: 'other.local'
- Optional. If the
cnameparameter is specified, you can use this parameter to control the state of the CNAME record separately from the main
stateparameter. If not specified or
present, the CNAME record will be published. If
absent, the CNAME record will be removed.