-
Notifications
You must be signed in to change notification settings - Fork 53
/
post-install.yml
101 lines (80 loc) · 3.72 KB
/
post-install.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
---
- hosts: webserver
become: yes
# add some vars here so we can run with --start-at-task if desired
vars:
webserver_app_user: "{% if ansible_os_family == 'RedHat' %}apache{% else %}www-data{% endif %}"
vagrant_user: "vagrant"
tasks:
- name: Create a directory if it does not exist
ansible.builtin.file:
path: /etc/systemd/system/tomcat9.service.d
state: directory
mode: '0755'
- name: Add Cantaloupe cache to Tomcat writable paths
lineinfile:
path: "/etc/systemd/system/tomcat9.service.d/override.conf"
regexp: 'var/cache/cantaloupe/$'
line: 'ReadWritePaths=/var/cache/cantaloupe/'
insertafter: EOF
- name: Add Cantaloupe log to Tomcat writable paths
lineinfile:
path: "/etc/systemd/system/tomcat9.service.d/override.conf"
regexp: 'var/log/cantaloupe/$'
line: 'ReadWritePaths=/var/log/cantaloupe'
insertafter: EOF
- name: restart daemon service
ansible.builtin.systemd:
daemon_reload: yes
- name: start tomcat9
service:
name: tomcat9
state: restarted
- name: Add admin to fedoraAdmin role
command: "{{ drush_path }} --root {{ drupal_core_path }} -y urol fedoraadmin admin"
# Set jsonld module to strip ?_format=jsonld
- name: Set JSONLD Config
command: "{{ drush_path }} --root {{ drupal_core_path }} -y cset --input-format=yaml jsonld.settings remove_jsonld_format {{ drupal_jsonld_remove_format }}"
- name: Set iiif url
command: "{{ drush_path }} --root {{ drupal_core_path }} -y cset --input-format=yaml islandora_iiif.settings iiif_server {{ openseadragon_iiiv_server }}"
- name: Set iiif manifest view
command: "{{ drush_path }} --root {{ drupal_core_path }} -y cset --input-format=yaml openseadragon.settings manifest_view iiif_manifest"
- name: Force Alpaca host setting to override install profile.
command: "{{ drush_path }} --root {{ drupal_core_path }} -y -l localhost:{{ apache_listen_port }} cset islandora.settings broker_url tcp://{{ hostvars[groups['alpaca'][0]].ansible_host }}:61613"
- name: Run migrations
command: "{{ drush_path }} --root {{ drupal_core_path }} -y -l localhost:{{ apache_listen_port }} --userid=1 mim islandora_tags,islandora_defaults_tags"
- name: Run islandora_fits migration
command: "{{ drush_path }} --root {{ drupal_core_path }} -y -l localhost:{{ apache_listen_port }} --userid=1 mim islandora_fits_tags"
when: post_install_migrate_import_fits_tags
- name: Add vagrant user to webserver app user group
ansible.builtin.user:
name: "{{ vagrant_user }}"
groups: "{{ webserver_app_user }}"
append: yes
- name: Chown islandora core feature
file:
dest: "{{ drupal_core_path }}/modules/contrib/islandora/modules/islandora_core_feature"
state: directory
owner: "{{ webserver_app_user }}"
group: "{{ webserver_app_user }}"
mode: 0775
recurse: yes
- name: Chown islandora_defaults feature
file:
dest: "{{ drupal_core_path }}/modules/contrib/islandora_defaults"
state: directory
owner: "{{ webserver_app_user }}"
group: "{{ webserver_app_user }}"
mode: 0775
recurse: yes
when: post_install_chown_defaults
- name: Chown controlled access terms default configuration
file:
dest: "{{ drupal_core_path }}/modules/contrib/controlled_access_terms/modules/controlled_access_terms_defaults"
state: directory
owner: "{{ webserver_app_user }}"
group: "{{ webserver_app_user }}"
mode: 0775
recurse: yes
- name: Clear cache
command: "{{ drush_path }} --root {{ drupal_core_path }} -y cr"