shhirose.chrony
shhirose.chrony
This is an Ansible role for installing and configuring Chrony on RedHat Enterprise Linux.
Requirements
None
Role Variables
shhirose_chrony_servers:
- type: server
name: time1.google.com
options: iburst
- type: server
name: time2.google.com
options: iburst
- type: server
name: time3.google.com
options: iburst
shhirose_chrony_refclock: []
shhirose_chrony_manual: no
shhirose_chrony_stratumweight: 0
shhirose_chrony_driftfile: /var/lib/chrony/drift
shhirose_chrony_RTC: rtcsync
shhirose_chrony_makestep_threshold: 1.0
shhirose_chrony_makestep_limit: 3
shhirose_chrony_port: 123
shhirose_chrony_client_access: []
shhirose_chrony_cmdport: 323
shhirose_chrony_cmdallow: []
shhirose_chrony_cmddeny: []
shhirose_chrony_bindcmdaddress: []
shhirose_chrony_noclientlog: yes
shhirose_chrony_logchange: 0.5
shhirose_chrony_logdir: /var/log/chrony
shhirose_chrony_extra_params: []
shhirose_chrony_logrotate_missingok: yes
shhirose_chrony_logrotate_nocreate: yes
shhirose_chrony_logrotate_sharedscripts: |
postrotate
/usr/libexec/chrony-helper command cyclelogs > /dev/null 2>&1 || true
shhirose_chrony_logrotate_extra_params: []
shhirose_chrony_similar_services:
- ntpd
Variable Parameters
shhirose_chrony
Key | Required | Default | Type | Values | Notes |
---|---|---|---|---|---|
servers | No | Array | List of time servers to use. | ||
servers[].type | No | String | server, pool or peer | Specifies the type of time service. | |
servers[].name | No | String | The hostname of the time server. | ||
servers[].options | No | String | Options for the time server. | ||
initstepslew_threshold | No | 30 | Int | Threshold for initial steps. | |
refclock | No | Array | Reference clock configuration. | ||
driftfile | No | /var/lib/chrony/drift | String | File where drift information is stored. | |
RTC | No | rtcsync | String | Various RTC options | Real-Time Clock settings. |
makestep_threshold | No | 1.0 | Double | Defines step size for adjusting the clock. | |
logdir | No | /var/log/chrony | String | Directory for logs. | |
logrotate_sharedscripts | No | String | Script that runs after log rotation. | ||
similar_services | No | Array | Services similar to Chrony that should be stopped. |
Dependencies
None
Example Playbook
- hosts: servers
become: yes
roles:
- shhirose.chrony
vars:
shhirose_chrony_servers:
- type: server
name: time1.google.com
options: iburst
- type: server
name: time2.google.com
options: iburst
shhirose_chrony_logrotate_extra_params:
- rotate 7
License
MIT