]> 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 16209b722ddb4c28a62f6e417dacc27ee40bd8d9..876bc8f6d6c1f3d95d500fa4dc64e283df6c63b2 100644 (file)
@@ -1,22 +1,32 @@
-- name: Install adjtimex and ntpdate-debian
+- name: Install adjtimex, ntpdate-debian and hwclock
   become: true
   apt:
     autoclean: yes
     autoremove: yes
     cache_valid_time: 3600
     install_recommends: no
-    name: ['adjtimex', 'ntpdate-debian']
+    # Install adjtimex, ntpdate-debian and hwclock
+    name: ['adjtimex', 'ntpdate', 'util-linux']
     state: latest
     update_cache: yes
-  when: ansible_facts.distribution == "Debian"
+  when: ansible_facts.os_family == 'Debian'
 
-- name: Install adjtimex and ntpdate
+- 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:
-    name: ['adjtimex', 'ntpdate']
+    # Install adjtimex, ntpdate-debian and hwclock
+    name: ['adjtimex', 'ntpdate', 'util-linux']
     state: latest
     update_cache: yes
-  when: ansible_facts.distribution != "Debian"
+  when: ansible_facts.os_family == 'RedHat'
 
 - name: Copy the script adjtimex.sh
   become: true