forked from UtrechtUniversity/yoda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yml
142 lines (117 loc) · 2.62 KB
/
playbook.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
---
# copyright Utrecht University
# This playbook deploys a complete Yoda instance.
- hosts: localhost
gather_facts: False
pre_tasks:
- name: Verify Ansible version meets requirements
assert:
that: "ansible_version.full is version('2.9', '>=')"
msg: >
"You must update Ansible to at least 2.9 to deploy Yoda."
- hosts: all
gather_facts: False
pre_tasks:
- name: Retrieve Yoda repository branch
shell: |
set -o pipefail
git branch | grep \* | cut -d ' ' -f2
register: git_branch
changed_when: False
delegate_to: localhost
args:
executable: /bin/bash
- name: Verify Yoda repository is on correct branch
fail:
msg: "Make sure your Yoda repository is on branch {{ yoda_version }}. (git checkout {{ yoda_version }})"
when: not ansible_check_mode and yoda_version not in git_branch.stdout and yoda_environment != "development"
- name: Add hosts entries to development instances
hosts: development
become: yes
roles:
- hostentries
- name: Provision common software and certificates
hosts: all
become: yes
roles:
- common
- certificates
- name: Provision portal server
hosts: portals
become: yes
roles:
- apache
- { role: acme_certificates, when: yoda_environment == "testing" }
- python3
- yoda_portal
- irods_icommands
- irods_runtime
- yoda_davrods
tags:
- portal
- name: Provision database server
hosts: databases
become: yes
roles:
- postgresql
- irods_database
tags:
- database
- name: Provision iCAT server
hosts: icats
become: yes
roles:
- pam_python
- irods_icat
- irods_runtime
- irods_microservices
- composable_resources
- irods_completion
- irods_rodsadmin
tags:
- icat
- name: Provision resource server
hosts: resources
become: yes
roles:
- irods_resource
- irods_runtime
- irods_microservices
- irods_completion
tags:
- resource
- name: Provision rulesets on iCAT server
hosts: icats
become: yes
roles:
- role: yoda_rulesets
install_rulesets: yes
tags:
- icat
- name: Provision rulesets on resource server
hosts: resources
become: yes
roles:
- role: yoda_rulesets
install_rulesets: no
tags:
- resource
- name: Provision public server
hosts: publics
become: yes
roles:
- apache
- yoda_moai
- yoda_landingpages
- yoda_public
tags:
- public
- name: Provision external user service server
hosts: eus
become: yes
roles:
- apache
- php
- yoda_external_user_service
tags:
- eus