kayobe/ansible/inventory/group_vars/all/time
Mark Goddard af3b719b73 Move group_vars to an inventory directory
The group variables originally in ansible/group_vars/ were playbook
group variables, due to being adjacent to the playbooks. Typically they
provided default values for global variables in the all group, as well
as some more specific groups. This has worked fairly well, but results
in (at least) a couple of problems.

1. The default variable precedence rules mean that these playbook group
   variables have a higher precedence than inventory group variables
   (for a given group). This can make it challenging to override
   playbook group variables in the inventory in Kayobe configuration.

2. Any playbook run by Kayobe must be in the same directory as the
   playbook group variables in order to use them. Given that they
   include variables required for connectivity such as ansible_host and
   ansible_user, this is quite critical. For Kayobe custom playbooks, we
   work around this by symlinking to the group_vars directory from the
   directory containing the custom playbook. This is not an elegant
   workaround, and has assumptions about the relative paths of the
   Kayobe configuration and virtual environment in which Kayobe is
   installed.

Story: 2010280
Task: 46233

Change-Id: Ifea5c7e73f6f410f96a7398bfd349d1f631d9fc0
2022-09-08 10:11:23 +01:00

41 lines
1.2 KiB
Plaintext

---
# Kayobe time configuration.
###############################################################################
# Timezone.
# Name of the local timezone.
timezone: "{{ ansible_facts.date_time.tz }}"
###############################################################################
# Network Time Protocol (NTP).
# List of NTP time sources to configure. Format is a list of dictionaries with
# the following keys:
# server: host or pool
# type: (Optional) Defaults to server. Maps to a time source in the
# configuration file. Can be one of server, peer, pool.
# options: (Optional) List of options that depends on type, see Chrony
# documentation for details.
# See: https://chrony.tuxfamily.org/doc/4.0/chrony.conf.html
#
# Example of configuring a pool and customising the pool specific maxsources
# option:
# chrony_ntp_servers:
# - server: pool.ntp.org
# type: pool
# options:
# - option: maxsources
# val: 3
#
chrony_ntp_servers:
- server: pool.ntp.org
type: pool
options:
- option: iburst
- option: minpoll
val: 8
# Synchronise hardware clock with system time. Default is true.
chrony_rtcsync_enabled: true