You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.2 KiB

9 years ago
9 years ago
9 years ago
  1. ---
  2. - hosts: localhost
  3. gather_facts: False
  4. roles:
  5. - bastion-ssh-config
  6. tags: [localhost, bastion]
  7. - hosts: k8s-cluster:etcd:calico-rr
  8. any_errors_fatal: true
  9. gather_facts: false
  10. vars:
  11. # Need to disable pipelining for bootstrap-os as some systems have requiretty in sudoers set, which makes pipelining
  12. # fail. bootstrap-os fixes this on these systems, so in later plays it can be enabled.
  13. ansible_ssh_pipelining: false
  14. roles:
  15. - bootstrap-os
  16. tags:
  17. - bootstrap-os
  18. - hosts: k8s-cluster:etcd:calico-rr
  19. any_errors_fatal: true
  20. vars:
  21. ansible_ssh_pipelining: true
  22. gather_facts: true
  23. - hosts: k8s-cluster:etcd:calico-rr
  24. any_errors_fatal: true
  25. roles:
  26. - { role: kernel-upgrade, tags: kernel-upgrade, when: kernel_upgrade is defined and kernel_upgrade }
  27. - { role: kubernetes/preinstall, tags: preinstall }
  28. - { role: docker, tags: docker }
  29. - role: rkt
  30. tags: rkt
  31. when: "'rkt' in [etcd_deployment_type, kubelet_deployment_type, vault_deployment_type]"
  32. - hosts: etcd:k8s-cluster:vault
  33. any_errors_fatal: true
  34. roles:
  35. - { role: vault, tags: vault, vault_bootstrap: true, when: "cert_management == 'vault'" }
  36. - hosts: etcd:!k8s-cluster
  37. any_errors_fatal: true
  38. roles:
  39. - { role: etcd, tags: etcd }
  40. - hosts: k8s-cluster
  41. any_errors_fatal: true
  42. roles:
  43. - { role: etcd, tags: etcd }
  44. - hosts: etcd:k8s-cluster:vault
  45. any_errors_fatal: true
  46. roles:
  47. - { role: vault, tags: vault, when: "cert_management == 'vault'"}
  48. - hosts: k8s-cluster
  49. any_errors_fatal: true
  50. roles:
  51. - { role: kubernetes/node, tags: node }
  52. - { role: network_plugin, tags: network }
  53. - hosts: kube-master
  54. any_errors_fatal: true
  55. roles:
  56. - { role: kubernetes/master, tags: master }
  57. - { role: kubernetes-apps/network_plugin, tags: network }
  58. - hosts: calico-rr
  59. any_errors_fatal: true
  60. roles:
  61. - { role: network_plugin/calico/rr, tags: network }
  62. - hosts: k8s-cluster
  63. any_errors_fatal: true
  64. roles:
  65. - { role: dnsmasq, when: "dns_mode == 'dnsmasq_kubedns'", tags: dnsmasq }
  66. - { role: kubernetes/preinstall, when: "dns_mode != 'none' and resolvconf_mode == 'host_resolvconf'", tags: resolvconf }
  67. - hosts: kube-master[0]
  68. any_errors_fatal: true
  69. roles:
  70. - { role: kubernetes-apps, tags: apps }