This is a simple ansible playbook to install chronyd and copy a conf file in RedHat1
ansible-chronyd-redhat.yaml Link to heading
---
- hosts: all
tasks:
- name: make sure chronyd is installed
yum:
name: chrony
state: latest
update_cache: yes
- name: deploy chrony.conf template
template:
src: /ansible/files/chrony.conf.orig
dest: /etc/chrony.conf
owner: root
group: root
mode: 0644
backup: yes
- name: Restart chronyd
service:
name: chronyd
state: restarted
-name: Enable service chronyd
service:
name: chronyd.service
enabled: true
-
This is obviously not a blog post. Just some notes, because i keep forgeting the little things as i get older ↩︎