aboutsummaryrefslogtreecommitdiff
path: root/roles/services/chronyd/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/services/chronyd/tasks')
-rw-r--r--roles/services/chronyd/tasks/main.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/roles/services/chronyd/tasks/main.yml b/roles/services/chronyd/tasks/main.yml
new file mode 100644
index 0000000..73fdc28
--- /dev/null
+++ b/roles/services/chronyd/tasks/main.yml
@@ -0,0 +1,30 @@
1- name: install packages
2 package:
3 name: chrony
4 state: latest
5
6- name: deploy chrony configuration
7 when: ansible_facts['distribution'] == 'Debian'
8 notify: restart chronyd
9 copy:
10 src: "{{ chrony_config }}"
11 dest: /etc/chrony/chrony.conf
12 owner: root
13 group: root
14 mode: '0644'
15
16- name: deploy chrony configuration
17 when: ansible_facts['distribution'] == 'Fedora'
18 notify: restart chronyd
19 copy:
20 src: "{{ chrony_config }}"
21 dest: /etc/chrony.conf
22 owner: root
23 group: root
24 mode: '0644'
25
26- name: make sure chronyd is enabled
27 systemd:
28 name: chronyd
29 enabled: yes
30 masked: no