forked from easzlab/kubeasz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init_vars.yml
46 lines (43 loc) · 1.01 KB
/
init_vars.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
# [可选]初始化集群设置脚本,使用请参考docs/setup/config_guide.md
# 如果创建集群时需要修改项目roles中默认配置,请执行本脚本后,编辑roles/xxx/vars/main.yml修改
- hosts: deploy
tasks:
- name: 创建变量配置目录 roles/xxx/vars
file: name={{ base_dir }}/roles/{{ item }}/vars state=directory
with_items:
- calico
- chrony
- cilium
- cluster-addon
- cluster-restore
- cluster-storage
- docker
- etcd
- flannel
- harbor
- helm
- kube-master
- kube-node
- kube-router
- lb
- name: 复制默认配置以备修改
copy:
src: "{{ base_dir }}/roles/{{ item }}/defaults/main.yml"
dest: "{{ base_dir }}/roles/{{ item }}/vars/main.yml"
force: "yes"
with_items:
- calico
- chrony
- cilium
- cluster-addon
- cluster-restore
- cluster-storage
- docker
- etcd
- flannel
- harbor
- helm
- kube-master
- kube-node
- kube-router
- lb