1 Star 0 Fork 0

Shach/k8s-ansible

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
site.yml 1.53 KB
一键复制 编辑 原始数据 按行查看 历史
dolphintwo 提交于 2017-12-28 15:03 . first commit
---
- hosts: all
remote_user: root
become: yes
become_method: sudo
environment:
PATH: "{{ ansible_env.PATH }}:{{root_bin}}"
roles:
- cfssl
- ca_grant
## 安装etcd服务
- hosts: etcdservers
remote_user: root
become: yes
become_method: sudo
environment:
PATH: "{{ ansible_env.PATH }}:{{root_bin}}"
roles:
- etcd
## 安装kubernetes
- hosts: kuber_and_etcd
remote_user: root
become: yes
become_method: sudo
environment:
PATH: "{{ ansible_env.PATH }}:{{root_bin}}"
roles:
- {
role: kubectl,
when: inventory_hostname in groups.kubernetes
}
- {
role: flannel,
when: inventory_hostname in groups.kubernetes
}
- {
role: k8s_master ,
when: inventory_hostname in groups.kuber_master
}
- {
role: docker,
when: inventory_hostname in groups.kuber_node
}
- {
role: k8s_node,
when: inventory_hostname in groups.kuber_node
}
## registry 私服安装
- hosts: registry
remote_user: root
become: yes
become_method: sudo
environment:
PATH: "{{ ansible_env.PATH }}:{{root_bin}}"
roles:
- registry
# 分发registry 证书
- hosts: kuber_node_and_registry
remote_user: root
become: yes
become_method: sudo
roles:
- registry_config
# kubernetes 插件安装
- hosts: kubernetes
remote_user: root
become: yes
become_method: sudo
environment:
PATH: "{{ ansible_env.PATH }}:{{root_bin}}"
roles:
- k8s_dns
- k8s_dashboard
- k8s_heapster
#- k8s_efk
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shach1990/k8s-ansible.git
[email protected]:shach1990/k8s-ansible.git
shach1990
k8s-ansible
k8s-ansible
master

搜索帮助