Add support for the chrony implementation
Chronyd is installed and configured by default since the Stein
Cycle. This patch adds the support of the latter.
This patch also renames the 'ntpstat' playbook and role by 'ntp' which
is more generic.
Change-Id: Ica0d4af5faa1693baa8f336db71143e0457401f0
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
(cherry picked from commit d4db54cbfd
)
This commit is contained in:
parent
69bd19607b
commit
367fbf3ab6
|
@ -6,9 +6,9 @@
|
|||
description: >
|
||||
Each overcloud node should have their clocks synchronised.
|
||||
|
||||
The deployment should configure and run ntpd. This validation verifies
|
||||
that it is indeed running and connected to an NPT server on all nodes.
|
||||
The deployment should configure and run chronyd. This validation verifies
|
||||
that it is indeed running and connected to an NTP server on all nodes.
|
||||
groups:
|
||||
- post-deployment
|
||||
roles:
|
||||
- ntpstat
|
||||
- ntp
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
- name: Get if chrony is enabled
|
||||
become: True
|
||||
hiera:
|
||||
name: "chrony_enabled"
|
||||
|
||||
- when: chrony_enabled|bool
|
||||
block:
|
||||
- name: Populate service facts
|
||||
service_facts: # needed to make yaml happy
|
||||
|
||||
- name: Fail if chronyd service is not running
|
||||
fail:
|
||||
msg: "Chronyd service is not running"
|
||||
when: "ansible_facts.services['chronyd.service'].state != 'running'"
|
||||
|
||||
- name: Run chronyc
|
||||
become: True
|
||||
command: chronyc -a 'burst 4/4'
|
||||
changed_when: False
|
||||
|
||||
- name: Run ntpstat
|
||||
# ntpstat returns 0 if synchronised and non-zero otherwise:
|
||||
command: ntpstat
|
||||
changed_when: False
|
||||
when: not chrony_enabled|bool
|
|
@ -4,7 +4,7 @@ metadata:
|
|||
description: >
|
||||
Each overcloud node should have their clocks synchronised.
|
||||
|
||||
The deployment should configure and run ntpd. This validation verifies
|
||||
that it is indeed running and connected to an NPT server on all nodes.
|
||||
The deployment should configure and run chronyd. This validation verifies
|
||||
that it is indeed running and connected to an NTP server on all nodes.
|
||||
groups:
|
||||
- post-deployment
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
- name: Run ntpstat
|
||||
# ntpstat returns 0 if synchronised and non-zero otherwise:
|
||||
command: ntpstat
|
||||
changed_when: False
|
Loading…
Reference in New Issue