Default variable details

Some of the debops.timesyncd default variables have more extensive configuration than simple strings or lists, here you can find documentation and examples for them.

timesyncd__configuration

The timesyncd__*_configuration default variables define the configuration of the systemd-timesyncd service. You can find more details about systemd-timesyncd configuration in the timesyncd.conf(5) manual page.

The generated configuration will be located in the /etc/systemd/timesyncd.conf.d/ansible.conf config file. This file is not generated by default to fall back on the default configuration provided in the OS packages; to generate it the timesyncd__deploy_state variable needs to be set to present.

Examples

You can check the timesyncd__default_configuration variable for the default contents of the configuration file.

Syntax

The role uses the Universal Configuration system to configure systemd-timesyncd daemon. Each configuration entry in the list is a YAML dictionary. The simple form of the configuration uses the dictionary keys as the parameter names, and dictionary values as the parameter values. Remember that the parameter names need to be specified in the exact case they are used in the documentation (e.g. FallbackNTP, PollIntervalMinSec), otherwise they will be duplicated in the generated configuration file. It's best to use a single YAML dictionary per configuration option.

If the YAML dictionary contains the name key, the configuration switches to the complex definition mode, with configuration options defined by specific parameters:

name

Required. Specify the name of the systemd-timesyncd configuration file parameter. The case is important and should be the same as specified in the configuration file or the timesyncd.conf(5) manual page, otherwise the configuration entries will be duplicated.

Multiple configuration entries with the same name parameter are merged together in order of appearance. This can be used to modify parameters conditionally.

value

Required. The value of a given configuration option. It can be a string, number, True/False boolean, an empty string or a YAML list which will be joined together using the space character.

state

Optional. If not specified or present, a given configuration parameter will be present in the generated configuration file. If absent, a given parameter will be removed from the configuration file. If comment, the parameter will be present but commented out.

If the state is init, the parameter will be "primed" in the configuration pipeline, but it will be commented out in the generated configuration file. Any subsequent configuration entry with the same name will switch the state to present - this is used to define the default parameters in the role which can be changed via the Ansible inventory.

If the state is ignore, a given configuration entry will not be evaluated during role execution. This can be used to activate configuration entries conditionally.