-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yml
96 lines (84 loc) · 1.89 KB
/
playbook.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
- hosts: tag_Type_etcd
remote_user: centos
tasks:
- name: Install vim
yum:
name: vim
state: latest
become: true
- name: Install ntp
yum:
name: ntp
state: latest
become: true
- name: Make sure NTP is started up
service:
name: ntpd
state: started
enabled: yes
tags: ntpd
become: true
- name: Install etcd
yum:
name: etcd
state: latest
become: true
- name: Make sure etcd is started up
service:
name: etcd
state: started
enabled: yes
tags: etcd
become: true
- hosts: tag_Name_victorf_leap_forward_etcd_0
remote_user: centos
tasks:
- name: "Add vars cointaining static ip addresses"
include_vars: vars.yml
- name: Replace etcd conf
template:
src: templates/etcd0.j2
dest: /etc/etcd/etcd.conf
notify:
- restart etcd
become: true
handlers:
- name: restart etcd
service:
name: etcd
state: restarted
- hosts: tag_Name_victorf_leap_forward_etcd_1
remote_user: centos
tasks:
- name: "Add vars cointaining static ip addresses"
include_vars: vars.yml
- name: Replace etcd conf
template:
src: templates/etcd1.j2
dest: /etc/etcd/etcd.conf
notify:
- restart etcd
become: true
handlers:
- name: restart etcd
service:
name: etcd
state: restarted
- hosts: tag_Name_victorf_leap_forward_etcd_2
remote_user: centos
tasks:
- name: "Add vars cointaining static ip addresses"
include_vars: vars.yml
- name: Replace etcd conf
template:
src: templates/etcd2.j2
dest: /etc/etcd/etcd.conf
notify:
- restart etcd
become: true
handlers:
- name: restart etcd
service:
name: etcd
state: restarted