]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
common: Always set the hwclock on all systems wip-hwclock 394/head
authorDavid Galloway <dgallowa@redhat.com>
Mon, 9 Apr 2018 20:36:07 +0000 (16:36 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Mon, 9 Apr 2018 20:36:07 +0000 (16:36 -0400)
Even if the OS time is correct, the hardware clock could be off.
There's no harm in making sure it is accurate with every job.

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/sect-Configuring_the_Date_and_Time-hwclock

Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/common/tasks/main.yml
roles/common/tasks/yum_systems.yml

index f6899ed3b5cba65b658ee3bbe70b97b1e526f6ff..0425daf2865e930a525057a960de35ea91396453 100644 (file)
 - import_tasks: zypper_systems.yml
   when: ansible_pkg_mgr == "zypper"
 
+- name: Set the hardware clock
+  command: hwclock --systohc
+  tags:
+    - timezone
+
 # configure Kerberos
 - import_tasks: kerberos.yml
   tags:
index 562142b1b60882a9d7a9af88f7449ea2ca4c3ada..3ef2b3b3a8bd4670d8c6d14c0c60825e34813c29 100644 (file)
   tags:
     - timezone
 
-- name: Set the hardware clock (RHEL/CentOS 6)
-  command: hwclock --systohc
-  when: ansible_distribution_major_version == "6" and current_tz.stdout|default("") != timezone
-  tags:
-    - timezone
-
 - name: Set the timezone (RHEL/CentOS 7)
   command: timedatectl set-timezone {{ timezone }}
   # Default is used below to avoid breaking check mode