From 844ba6d4ba4f66629e621344d5b9d2fc03618bd7 Mon Sep 17 00:00:00 2001 From: James Benson Date: Mon, 26 Jun 2017 10:16:43 -0500 Subject: [PATCH] Adds NTP sync process to account for ceph time sync requirements. Removes precheck portion of NTP. Corrects for redhat Fixes typo Change-Id: Ic8d2cd3c2ba02f9f672db862a74950dc73753f2d Closes-Bug: #1700121 --- .../roles/baremetal/tasks/post-install.yml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/ansible/roles/baremetal/tasks/post-install.yml b/ansible/roles/baremetal/tasks/post-install.yml index d85f583445..63d4739a00 100644 --- a/ansible/roles/baremetal/tasks/post-install.yml +++ b/ansible/roles/baremetal/tasks/post-install.yml @@ -79,6 +79,40 @@ enabled: yes become: True +- name: Stop time service + service: + name: ntp + state: stopped + become: True + when: ansible_os_family == "Debian" + +- name: Stop time service + service: + name: ntpd + state: stopped + become: True + when: ansible_os_family == "RedHat" + +- name: Synchronizing time one-time + command: ntpd -gq + become: True + +- name: Start time sync service + service: + name: ntp + state: started + enabled: yes + become: True + when: ansible_os_family == "Debian" + +- name: Start time sync service + service: + name: ntpd + state: started + enabled: yes + become: True + when: ansible_os_family == "RedHat" + - name: Reboot command: reboot -f become: True