This repository has been archived by the owner on Aug 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
collectionspace.yml
75 lines (71 loc) · 1.93 KB
/
collectionspace.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
---
- name: Install CollectionSpace
hosts: all
gather_facts: true
become: true
pre_tasks:
- import_tasks: version_check.yml
- import_tasks: includes/version.yml
- name: Install packages
apt:
pkg:
- acl
- htop
- gpg
- python3-psycopg2
- "{{ java_package }}"
update_cache: true
tags:
- apt
- name: Create .pgpass
template:
src: templates/pgpass.j2
dest: /root/.pgpass
mode: '0600'
tags:
- db
- postgres
- name: Patch ElasticSearch role
delegate_to: localhost
ansible.builtin.lineinfile:
path: roles/elasticsearch/templates/jvm.options.j2
regexp: '^-Djava\.io\.tmpdir='
line: '-Djava.io.tmpdir=/tmp'
roles:
- role: swap
tags: ['swap']
when: not collectionspace_vagrant | default(false)
- role: postgresql
tags: ['db', 'postgres']
- role: elasticsearch
tags: ['es', 'search']
- role: collectionspace
tags: ['collectionspace', 'cspace']
- role: nginx
tags: ['nginx', 'web']
- role: certbot
tags: ['certbot', 'certs']
when: certbot_certs is defined and certbot_certs | length > 0
tasks:
- name: Create CollectionSpace vhost config
template:
src: templates/cspace.conf.j2
dest: "/etc/nginx/sites-enabled/cspace.conf"
mode: '0644'
notify: reload nginx
tags:
- nginx
- vhost
- web
# do this last to minimize wait on startup initialization
- name: Check that CollectionSpace is up before exiting
uri:
# bypass proxy, go straight to tomcat
url: "http://127.0.0.1:8180/cspace/{{ collectionspace_tenant }}/login"
method: GET
status_code: 200
register: result
until: result.status == 200
retries: 15
delay: 60
when: not collectionspace_vagrant | default(false)