代码拉取完成,页面将自动刷新
---
- 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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。