forked from ISTI-ansible-roles/ansible-roles
library/roles/orientdb: Provide a way to install hooks jars.
This commit is contained in:
parent
5cd00da5ec
commit
f1f556f744
|
@ -9,6 +9,8 @@ orientdb_user: orientdb
|
|||
orientdb_log_dir: /var/log/orientdb
|
||||
orientdb_log_level: INFO
|
||||
orientdb_home_prefix: /home
|
||||
orientdb_base_dir: '{{ orientdb_home_prefix }}/{{ orientdb_user }}'
|
||||
orientdb_install_dir: '{{ orientdb_base_dir }}/{{ orientdb_dir }}'
|
||||
orientdb_data_dir: '{{ orientdb_home_prefix }}/{{ orientdb_user }}/databases'
|
||||
orientdb_configuration_files:
|
||||
- orientdb-server-log.properties
|
||||
|
@ -19,8 +21,12 @@ orientdb_configuration_files:
|
|||
orientdb_letsencrypt_ssl_enabled: False
|
||||
|
||||
orientdb_hooks_classes:
|
||||
- { name: 'org.gcube.informationsystem.hooks.DocumentHook', position: 'REGULAR' }
|
||||
- { name: 'org.gcube.informationsystem.hooks.RecordHook', position: 'REGULAR' }
|
||||
- { name: 'org.gcube.informationsystem.orientdb.hooks.HeaderHook', position: 'REGULAR' }
|
||||
# - { name: 'org.gcube.informationsystem.hooks.DocumentHook', position: 'REGULAR' }
|
||||
# - { name: 'org.gcube.informationsystem.hooks.RecordHook', position: 'REGULAR' }
|
||||
|
||||
orientdb_hooks_jars:
|
||||
# - 'http://maven.research-infrastructures.eu/nexus/service/local/artifact/maven/redirect?r=gcube-snapshots&g=org.gcube.information-system&a=resource-registry-orientdb-hooks&v=1.0.0-SNAPSHOT&e=jar&c=jar-with-dependencies'
|
||||
|
||||
orientdb_binary_protocol_lower_port: 2424
|
||||
orientdb_binary_protocol_higher_port: 2430
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
---
|
||||
- name: Restart orientdb
|
||||
service: name=orientdb state=restarted
|
||||
service: name=orientdb state=restarted sleep=20
|
||||
when: orientdb_enabled
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
---
|
||||
- block:
|
||||
- name: Create the orientdb user
|
||||
user: name={{ orientdb_user }} home={{ orientdb_home_prefix }}/{{ orientdb_user }} createhome=yes shell=/bin/bash
|
||||
user: name={{ orientdb_user }} home={{ orientdb_base_dir }} createhome=yes shell=/bin/bash
|
||||
|
||||
- name: Unpack the orientdb distribution
|
||||
become: True
|
||||
become_user: '{{ orientdb_user }}'
|
||||
unarchive: src={{ orientdb_binary_distribution_url }} dest={{ orientdb_home_prefix }}/{{ orientdb_user }} copy=no
|
||||
unarchive: src={{ orientdb_binary_distribution_url }} dest={{ orientdb_base_dir }} copy=no
|
||||
args:
|
||||
creates: '{{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}-{{ orientdb_version }}'
|
||||
|
||||
- name: Link to the latest version
|
||||
become: True
|
||||
become_user: '{{ orientdb_user }}'
|
||||
file: src={{ orientdb_dir }}-{{ orientdb_version }} dest={{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }} state=link
|
||||
file: src={{ orientdb_dir }}-{{ orientdb_version }} dest={{ orientdb_install_dir }} state=link
|
||||
|
||||
- name: Install the orientdb startup script
|
||||
template: src=orientdb.init.j2 dest=/etc/init.d/orientdb owner=root group=root mode=0755
|
||||
|
@ -31,8 +29,13 @@
|
|||
become_user: '{{ orientdb_user }}'
|
||||
file: dest={{ orientdb_data_dir }} state=directory mode=0750
|
||||
|
||||
- name: Fetch and install the hook jars
|
||||
get_url: url='{{ item }}' dest={{ orientdb_install_dir }}/lib
|
||||
with_items: '{{ orientdb_hooks_jars | default ([]) }}'
|
||||
notify: Restart orientdb
|
||||
|
||||
- name: Install the orientdb configuration files
|
||||
template: src={{ item }}.j2 dest={{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}/config/{{ item }} owner={{ orientdb_user }} group={{ orientdb_user }} mode=0440
|
||||
template: src={{ item }}.j2 dest={{ orientdb_install_dir }}/config/{{ item }} owner={{ orientdb_user }} group={{ orientdb_user }} mode=0440
|
||||
with_items: '{{ orientdb_configuration_files }}'
|
||||
notify: Restart orientdb
|
||||
|
||||
|
|
Loading…
Reference in New Issue