Skip to content
This repository has been archived by the owner on Oct 10, 2021. It is now read-only.

Commit

Permalink
Merge pull request #2 from Islandora-Devops/issue-777
Browse files Browse the repository at this point in the history
Install the Syn jar
  • Loading branch information
Natkeeran authored Mar 27, 2018
2 parents 17ce536 + a00e880 commit 7d24fb8
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 3 deletions.
38 changes: 35 additions & 3 deletions tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,38 @@
- name: Copy templated syn-settings.xml
template:
src: syn-settings.xml
dest: "{{fcrepo_syn_tomcat_home}}/conf/syn-settings.xml"
owner: "{{fcrepo_syn_user}}"
group: "{{fcrepo_syn_user}}"
dest: "{{ fcrepo_syn_tomcat_home }}/conf/syn-settings.xml"
owner: "{{ fcrepo_syn_user }}"
group: "{{ fcrepo_syn_user }}"

- name: Add valve
lineinfile:
path: "{{ fcrepo_syn_tomcat_home }}/conf/context.xml"
line: "<Valve className=\"ca.islandora.syn.valve.SynValve\" pathname=\"{{ fcrepo_syn_tomcat_home }}/conf/syn-settings.xml\" />"
insertbefore: "</Context>"

- name: Modify web.xml
blockinfile:
path: "{{ fcrepo_syn_tomcat_home }}/webapps/fcrepo/WEB-INF/web.xml"
insertbefore: "^</web-app>$"
marker: "<!-- {mark} ANSIBLE MANAGED BLOCK -->"
block: |
<security-constraint>
<web-resource-collection>
<web-resource-name>Fedora4</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-role>
<role-name>islandora</role-name>
</security-role>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>fcrepo</realm-name>
</login-config>
8 changes: 8 additions & 0 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,11 @@
dest: "{{ fcrepo_syn_folder }}"
owner: "{{ fcrepo_syn_user }}"
group: "{{ fcrepo_syn_user }}"

- name: Move syn jar to webapp
copy:
src: "{{ fcrepo_syn_folder }}/islandora-syn-{{ fcrepo_syn_version }}-all.jar"
dest: "{{ fcrepo_syn_tomcat_home }}/lib/"
remote_src: yes
owner: "{{ fcrepo_syn_user }}"
group: "{{ fcrepo_syn_user }}"

0 comments on commit 7d24fb8

Please sign in to comment.