From 95b73daa36b23565a8566f71f9b202d3459b685f Mon Sep 17 00:00:00 2001 From: Sam Chudnick Date: Sun, 25 Jun 2023 09:52:36 -0400 Subject: Initial Commit --- roles/services/chronyd/tasks/main.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 roles/services/chronyd/tasks/main.yml (limited to 'roles/services/chronyd/tasks') 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 @@ +- name: install packages + package: + name: chrony + state: latest + +- name: deploy chrony configuration + when: ansible_facts['distribution'] == 'Debian' + notify: restart chronyd + copy: + src: "{{ chrony_config }}" + dest: /etc/chrony/chrony.conf + owner: root + group: root + mode: '0644' + +- name: deploy chrony configuration + when: ansible_facts['distribution'] == 'Fedora' + notify: restart chronyd + copy: + src: "{{ chrony_config }}" + dest: /etc/chrony.conf + owner: root + group: root + mode: '0644' + +- name: make sure chronyd is enabled + systemd: + name: chronyd + enabled: yes + masked: no -- cgit v1.2.3