Add role to deploy GKS IIIF manifests
This commit is contained in:
1
roles/iiif-manif/defaults/main.yml
Normal file
1
roles/iiif-manif/defaults/main.yml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
iiif_repo_url: "https://git.electricmandarine.cloud/nicolo/greek-manifests"
|
||||||
5
roles/iiif-manif/handlers/main.yml
Normal file
5
roles/iiif-manif/handlers/main.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- name: Restart PM2
|
||||||
|
ansible.builtin.command: '/home/nicolo/node_modules/bin/pm2 restart all --update-env'
|
||||||
|
become: true
|
||||||
|
become_user: nicolo
|
||||||
38
roles/iiif-manif/tasks/main.yml
Normal file
38
roles/iiif-manif/tasks/main.yml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
- name: Ensure ACL is installed
|
||||||
|
ansible.builtin.package:
|
||||||
|
name:
|
||||||
|
- acl
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
|
- name: Ensure git is installed
|
||||||
|
ansible.builtin.package:
|
||||||
|
name:
|
||||||
|
- git
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
|
||||||
|
- name: Pull from manifest repo
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: "{{ iiif_repo_url }}"
|
||||||
|
# To be changed!!
|
||||||
|
dest: /home/nicolo/greek-manifests
|
||||||
|
update: true
|
||||||
|
clone: false
|
||||||
|
version: master
|
||||||
|
become: true
|
||||||
|
become_user: nicolo
|
||||||
|
|
||||||
|
- name: Install Yarn dependencies based on package.json
|
||||||
|
community.general.yarn:
|
||||||
|
# To be changed!!
|
||||||
|
path: /home/nicolo/greek-manifests
|
||||||
|
executable: /home/nicolo/node_modules/bin/yarn
|
||||||
|
production: true
|
||||||
|
become: true
|
||||||
|
become_user: nicolo
|
||||||
|
# this should alwasy notify 'Restart PM2'
|
||||||
|
changed_when: true
|
||||||
|
notify: Restart PM2
|
||||||
Reference in New Issue
Block a user