-
Notifications
You must be signed in to change notification settings - Fork 0
/
site.yml
55 lines (52 loc) · 1.36 KB
/
site.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
---
- hosts: 127.0.0.1
remote_user: root
gather_facts: no
connection: local
vars:
master01_ip: "{{ groups['master01'][0] }}"
master02_ip: "{{ groups['master02'][0] }}"
master03_ip: "{{ groups['master03'][0] }}"
etcd01_ip: "{{ groups['etcds'][0] }}"
etcd02_ip: "{{ groups['etcds'][1] }}"
etcd03_ip: "{{ groups['etcds'][2] }}"
pre_tasks:
- name: Copy kubernetes yum.repo for contral panle
copy: src=./roles/common/files/kubernetes.repo dest=/etc/yum.repos.d/kubernetes.repo
- name: Install kubectl for contral panle
yum: name="kubectl-{{ kube_version }}" state=present
roles:
- certs
- hosts: all
remote_user: root
roles:
- common
- hosts: etcds
remote_user: root
vars:
etcd01_ip: "{{ groups['etcds'][0] }}"
etcd02_ip: "{{ groups['etcds'][1] }}"
etcd03_ip: "{{ groups['etcds'][2] }}"
roles:
- etcd
- hosts: masters
remote_user: root
vars:
master01_ip: "{{ groups['master01'][0] }}"
master02_ip: "{{ groups['master02'][0] }}"
master03_ip: "{{ groups['master03'][0] }}"
etcd01_ip: "{{ groups['etcds'][0] }}"
etcd02_ip: "{{ groups['etcds'][1] }}"
etcd03_ip: "{{ groups['etcds'][2] }}"
roles:
- masters
- hosts: nodes
remote_user: root
roles:
- nodes
# - hosts: 127.0.0.1
# remote_user: root
# gather_facts: no
# connection: local
# roles:
# - extensions