-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathtests_ntp_provider4.yml
47 lines (41 loc) · 1.12 KB
/
tests_ntp_provider4.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
- name: Configure NTP with chrony as specified provider
hosts: all
vars:
timesync_ntp_servers:
- hostname: 172.16.123.1
timesync_ntp_provider: chrony
roles:
- linux-system-roles.timesync
pre_tasks:
- name: Common test setup tasks
include_tasks: tasks/setup.yml
vars:
__timesync_ostree_unsupported: true
- name: Install then remove chrony
check_mode: false
tags: tests::setup
block:
- name: Install chrony
package:
name: chrony
state: present
register: package_install
ignore_errors: true # noqa ignore-errors
- name: Skip test if no package
meta: end_play
when: package_install.failed
- name: Remove chrony
package:
name: chrony
state: absent
post_tasks:
- name: Verify chronyd is running
tags: tests::verify
block:
- name: Wait for services to start
wait_for:
timeout: 2
- name: Check chronyd service
command: chronyc -n tracking
changed_when: false