kubeasz/tools/init_vars.yml

41 lines
944 B
YAML
Raw Normal View History

2018-07-26 10:59:06 +08:00
# [可选]初始化集群设置脚本使用请参考docs/op/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
2018-08-17 09:18:55 +08:00
- chrony
2018-08-05 16:12:32 +08:00
- cilium
2018-07-26 10:59:06 +08:00
- cluster-addon
- cluster-restore
2018-07-28 10:21:34 +08:00
- cluster-storage
2018-08-12 16:47:39 +08:00
- docker
2018-07-26 10:59:06 +08:00
- flannel
- helm
- kube-node
- kube-router
- lb
- name: 复制默认配置以备修改
copy:
src: "{{ base_dir }}/roles/{{ item }}/defaults/main.yml"
dest: "{{ base_dir }}/roles/{{ item }}/vars/main.yml"
2018-07-28 11:50:39 +08:00
force: "yes"
2018-07-26 10:59:06 +08:00
with_items:
- calico
2018-08-17 09:18:55 +08:00
- chrony
2018-08-05 16:12:32 +08:00
- cilium
2018-07-26 10:59:06 +08:00
- cluster-addon
- cluster-restore
2018-07-28 10:21:34 +08:00
- cluster-storage
2018-08-12 16:47:39 +08:00
- docker
2018-07-26 10:59:06 +08:00
- flannel
- helm
- kube-node
- kube-router
- lb