]> git.phdru.name Git - ansible.git/blobdiff - playbooks/roles/adjtimex/tasks/main.yml
Feat(logcheck): Update `local-dhcp`
[ansible.git] / playbooks / roles / adjtimex / tasks / main.yml
index fb720c71c7cbc3010b6cc719d3ce3d15c7b35def..876bc8f6d6c1f3d95d500fa4dc64e283df6c63b2 100644 (file)
@@ -1,3 +1,33 @@
+- name: Install adjtimex, ntpdate-debian and hwclock
+  become: true
+  apt:
+    autoclean: yes
+    autoremove: yes
+    cache_valid_time: 3600
+    install_recommends: no
+    # Install adjtimex, ntpdate-debian and hwclock
+    name: ['adjtimex', 'ntpdate', 'util-linux']
+    state: latest
+    update_cache: yes
+  when: ansible_facts.os_family == 'Debian'
+
+- name: Remove ntpd
+  become: true
+  apt:
+    name: ntp
+    state: absent
+    update_cache: no
+  when: ansible_facts.os_family == 'Debian'
+
+- name: Install adjtimex, ntpdate and hwclock
+  become: true
+  dnf:
+    # Install adjtimex, ntpdate-debian and hwclock
+    name: ['adjtimex', 'ntpdate', 'util-linux']
+    state: latest
+    update_cache: yes
+  when: ansible_facts.os_family == 'RedHat'
+
 - name: Copy the script adjtimex.sh
   become: true
   template: