-
Notifications
You must be signed in to change notification settings - Fork 29
/
site.yml
executable file
·100 lines (85 loc) · 4.01 KB
/
site.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
---
- name: include global default variables
import_playbook: include_defaults.yml
- name: check if the same cluster already exists
hosts: admin-node
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
roles:
- { role: kubespray/roles/kubespray-defaults, tags: setup-os }
- { role: validate-cluster, tags: setup-os }
- name: setup host operating systems in taco host group
hosts: taco
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
roles:
- { role: setup-os/conf-repos, tags: setup-os }
- { role: setup-os, tags: setup-os }
- { role: container-registry/client, tags: setup-os }
- name: setup docker on admin-node
hosts: admin-node
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
roles:
- { role: kubespray/roles/kubespray-defaults, tags: setup-os }
- { role: kubespray/roles/container-engine, tags: setup-os }
- name: setup a local container registry for the offline environment
hosts: container-registry
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
roles:
- { role: kubespray/roles/kubespray-defaults, tags: container-registry, when: container_registry_enabled }
- { role: kubespray/roles/container-engine, tags: container-registry, when: container_registry_enabled }
- { role: container-registry/server, tags: container-registry, when: container_registry_enabled }
- name: install kubernetes
include: kubespray/cluster.yml
tags: k8s
- name: post install for kubernetes
hosts: admin-node
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
roles:
- { role: kubespray/roles/kubespray-defaults, tags: k8s-post-install }
- { role: k8s/post-install, tags: k8s-post-install }
- { role: k8s/clients, tags: k8s-post-install }
- { role: ceph/rook, tags: rook, when: taco_storage_backend == 'rook-ceph' }
- { role: decapod, tags: decapod, when: decapod_enabled }
- name: setup helm repository
hosts: helm-repository
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
roles:
- { role: helm-repository, tags: helm-repo, when: helm_repo_enabled }
# TODO: add tests for checking status of the new k8s cluster
- name: setup openstack-related config on operating system
hosts: controller-node:compute-node
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
roles:
- { role: taco-apps/openstack/setup-os, tags: openstack, when: '"openstack" in taco_apps' }
- { role: openvswitch, tags: openvswitch, when: ovs_package_installed }
- name: prepare lma installation
hosts: admin-node
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
roles:
- { role: taco-apps/lma/pre-install, tags: lma, when: '"lma" in taco_apps' }
# Keycloak/install task will be integrated to taco-apps/deploy role
# once we migrate to decapod from armada.
- name: install istio and keycloack
hosts: admin-node
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
roles:
- { role: kubespray/roles/kubespray-defaults, tags: always, when: ('"istio" in taco_apps') or ('"keycloak" in taco_apps') }
- { role: taco-apps/istio/deploy, tags: deploy-istio, when: '"istio" in taco_apps' }
- { role: taco-apps/keycloak/prepare, tags: prepare-keycloak, when: '"admin-tools" in taco_apps' }
- name: add a self-signed cert to ca-trust for keycloak
hosts: taco
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
roles:
- { role: taco-apps/keycloak/post-install, when: kube_oidc_auth }
- name: deploy taco apps
hosts: admin-node
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
roles:
- { role: kubespray/roles/kubespray-defaults, tags: deploy }
- { role: taco-apps/openstack/pre-install, tags: openstack, when: '"openstack" in taco_apps' }
- name: run opentackclient container and make os_clients.sh file for user
hosts: admin-node
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
roles:
- { role: taco-apps/openstack/client, tags: openstack-client, when: '"openstack" in taco_apps' }
- name: store versions to configmap
import_playbook: store_version.yml