Skip to content

Commit

Permalink
added chrony role
Browse files Browse the repository at this point in the history
  • Loading branch information
acjohnson committed Sep 19, 2022
1 parent ef1bf94 commit 0498329
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
4 changes: 4 additions & 0 deletions playbook_chrony.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
- hosts: all
roles:
- chrony
2 changes: 1 addition & 1 deletion playbook_denyhosts.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
- hosts: all
roles:
- denyhosts
- denyhosts
21 changes: 21 additions & 0 deletions roles/chrony/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
- name: Install chrony
package:
name: chrony
state: latest

- name: Ensure chrony service is enabled and running
service:
name: chrony
enabled: yes
state: started

- name: Ensure network time synchronization is active and enabled
shell: |
timedatectl set-ntp true
- name: Restart chrony service
service:
name: chrony
enabled: yes
state: restarted

0 comments on commit 0498329

Please sign in to comment.