-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap.yml
58 lines (52 loc) · 1.08 KB
/
bootstrap.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
48
49
50
51
52
53
54
55
56
57
58
---
- hosts: all
gather_facts: False
roles:
- common
- hosts: monitoring
vars:
docker_users: ["{{ ansible_user }}"]
roles:
- role: docker
tags: docker
become: true
tags: monitoring
#
# ntp. controller is the ntp server.
#
- hosts: controller
vars:
ntp_timezone: "{{ TIME_ZONE | default('Asia/Seoul') }}"
ntp_manage_config: true
ntp_area: asia
ntp_restrict:
- "127.0.0.1"
# why need ::1: https://serverfault.com/questions/558596/ntp-local-query-always-times-out
- "::1"
- "{{ NTP_LOCAL_NET }} nomodify notrap"
roles:
- ntp
tags: ntp
become: true
- hosts: computes, monitoring
vars:
ntp_timezone: "{{ TIME_ZONE | default('Asia/Seoul') }}"
ntp_manage_config: true
ntp_servers:
- "{{ groups['controller'][0] }} iburst"
roles:
- ntp
tags: ntp
become: true
- hosts: all
tasks:
- name: "disable timesyncd so we use NTP only"
raw: timedatectl set-ntp off
- name: "restart ntp service"
systemd:
name: ntp
state: restarted
enabled: true
daemon_reload: yes
become: true
tags: ntp