caseraw.ansible_role_chrony

Ansible Role Chrony

Using Ansible to manage network time with chrony.

Build Status

License

MIT / BSD

Author Info

Requirements

  • Make sure you have a package manager ready and configured correctly.
  • The user running this role needs the right permissions to:
    • Install and remove packages.
    • Edit files from the installed package.
    • Control systemd services for ntpd and chronyd.
  • Allow network traffic over UDP port 123 for NTP.
    • Outbound for any servers providing NTP.
    • Inbound for any clients using NTP.

Dependencies

None

Compatibility

Works with these operating systems:

  • CentOS 7
  • CentOS 8
  • RHEL 7.x
  • RHEL 8.x

Role Variables

Variable Name Description
role_chrony_chrony_dot_conf_parameters Holds the chrony configuration settings.
role_chrony_required_packages List of packages needed for chrony to run properly.
role_chrony_time_zone The timezone to set for the system.

Example Playbook

---
- name: Setup and configure chrony for NTP
  become: True
  gather_facts: False
  roles:
   - role: ansible_role_chrony

...

Useful Shell Commands

chronyc tracking
chronyc sources
chronyc sourcestats

Additional Documentation

For more information about chrony and how to use it, visit:

Testing with Molecule

This role is tested locally using Molecule. The configuration is found at: molecule/default.
Molecule tests are performed using the docker driver on Dockerhub images made for this purpose:

Some setups might need a full operating system instead of a lightweight container image. In those cases, you can use the molecule driver for Vagrant with the libvirt provider. Here's an example of the configuration:

driver:
  name: vagrant
  provider:
    name: libvirt
platforms:
  - name: ansible_role_chrony-ansible-molecule-centos-7
    box: centos/7
    memory: 1024
    cpus: 1

CI/CD with Travis CI

This role uses Travis CI to run automated tests using Molecule and sends notifications to add the role to Ansible Galaxy once tests pass. The Travis CI config file is located at the root of this role .travis.yml.

Informazioni sul progetto

Manage the installation and configuration of chrony for NTP

Installa
ansible-galaxy install caseraw.ansible_role_chrony
Licenza
Unknown
Download
613
Proprietario
DevOps | RHCA | Red Hat Accelerator