2017-05-25 03:49:21 +08:00
|
|
|
---
|
2017-11-06 21:51:36 +08:00
|
|
|
- hosts: localhost
|
|
|
|
gather_facts: False
|
|
|
|
roles:
|
|
|
|
- { role: kubespray-defaults}
|
|
|
|
- { role: bastion-ssh-config, tags: ["localhost", "bastion"]}
|
2017-05-25 03:49:21 +08:00
|
|
|
|
|
|
|
##Bootstrap any new workers
|
|
|
|
- hosts: kube-node
|
|
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
|
|
|
gather_facts: false
|
|
|
|
vars:
|
|
|
|
ansible_ssh_pipelining: false
|
|
|
|
roles:
|
2017-06-17 00:18:35 +08:00
|
|
|
- { role: kubespray-defaults}
|
2017-05-25 03:49:21 +08:00
|
|
|
- { role: bootstrap-os, tags: bootstrap-os}
|
|
|
|
|
|
|
|
##We still have to gather facts about our masters and etcd nodes
|
|
|
|
- hosts: k8s-cluster:etcd:calico-rr
|
|
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
|
|
|
vars:
|
|
|
|
ansible_ssh_pipelining: true
|
|
|
|
gather_facts: true
|
|
|
|
|
2018-08-20 19:40:44 +08:00
|
|
|
##We need to genereate the etcd certificates beforhand
|
|
|
|
- hosts: etcd
|
|
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
|
|
|
roles:
|
|
|
|
- { role: kubespray-defaults}
|
|
|
|
- { role: etcd, tags: etcd, etcd_cluster_setup: false }
|
|
|
|
|
2017-05-25 03:49:21 +08:00
|
|
|
##Target only workers to get kubelet installed and checking in on any new nodes
|
|
|
|
- hosts: kube-node
|
|
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
|
|
|
roles:
|
2017-06-17 00:18:35 +08:00
|
|
|
- { role: kubespray-defaults}
|
2017-05-25 03:49:21 +08:00
|
|
|
- { role: kubernetes/preinstall, tags: preinstall }
|
2018-04-19 21:47:20 +08:00
|
|
|
- { role: docker, tags: docker, when: manage_docker|default(true) }
|
2018-08-10 01:53:11 +08:00
|
|
|
- { role: cri-o, tags: crio, when: manage_crio }
|
2017-05-25 03:49:21 +08:00
|
|
|
- role: rkt
|
|
|
|
tags: rkt
|
|
|
|
when: "'rkt' in [etcd_deployment_type, kubelet_deployment_type, vault_deployment_type]"
|
2018-08-08 18:49:49 +08:00
|
|
|
- { role: download, tags: download, when: "not skip_downloads" }
|
2017-05-25 03:49:21 +08:00
|
|
|
- { role: etcd, tags: etcd, etcd_cluster_setup: false }
|
|
|
|
- { role: vault, tags: vault, when: "cert_management == 'vault'"}
|
|
|
|
- { role: kubernetes/node, tags: node }
|
2017-10-24 23:08:48 +08:00
|
|
|
- { role: kubernetes/kubeadm, tags: kubeadm, when: "kubeadm_enabled" }
|
2017-05-25 03:49:21 +08:00
|
|
|
- { role: network_plugin, tags: network }
|
2017-12-06 23:06:34 +08:00
|
|
|
environment: "{{proxy_env}}"
|