|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
- block:
|
|
|
|
|
- name: Create the orientdb user
|
|
|
|
|
user: name={{ orientdb_user }} home={{ orientdb_base_dir }} createhome=yes shell=/bin/bash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Get the orientdb distribution
|
|
|
|
|
get_url: url={{ orientdb_binary_distribution_url }} dest={{ orientdb_base_dir }}/{{ orientdb_tar_file }} validate_certs=no
|
|
|
|
|
|
|
|
|
@ -17,7 +17,12 @@
|
|
|
|
|
file: src={{ orientdb_tar_filename }} dest={{ orientdb_install_dir }} state=link
|
|
|
|
|
|
|
|
|
|
- name: Create a orientdb log directory out of the distribution directory
|
|
|
|
|
file: dest={{ orientdb_log_dir }} state=directory owner={{ orientdb_user }} group={{ orientdb_user }} mode=0755
|
|
|
|
|
file:
|
|
|
|
|
dest: '{{ orientdb_log_dir }}'
|
|
|
|
|
state: directory
|
|
|
|
|
owner: '{{ orientdb_user }}'
|
|
|
|
|
group: '{{ orientdb_user }}'
|
|
|
|
|
mode: '0755'
|
|
|
|
|
|
|
|
|
|
- name: Link the log directory inside the orientdb user home
|
|
|
|
|
become: True
|
|
|
|
@ -28,7 +33,7 @@
|
|
|
|
|
become: True
|
|
|
|
|
become_user: '{{ orientdb_user }}'
|
|
|
|
|
file: dest={{ item }} state=directory mode=0750
|
|
|
|
|
with_items:
|
|
|
|
|
loop:
|
|
|
|
|
- '{{ orientdb_data_dir }}'
|
|
|
|
|
- '{{ orientdb_pid_dir }}'
|
|
|
|
|
- '{{ orientdb_automatic_backup_directory }}'
|
|
|
|
@ -49,15 +54,25 @@
|
|
|
|
|
notify: Restart orientdb
|
|
|
|
|
|
|
|
|
|
- name: Fix the pid file path inside the start and shutdown scripts
|
|
|
|
|
lineinfile: dest={{ orientdb_install_dir }}/bin/{{ item }} regexp="^ORIENTDB_PID=.*$" line="ORIENTDB_PID={{ orientdb_pid_dir }}/orientdb.pid" insertafter="^PRG=.*$" firstmatch=yes
|
|
|
|
|
with_items:
|
|
|
|
|
lineinfile:
|
|
|
|
|
dest: '{{ orientdb_install_dir }}/bin/{{ item }}'
|
|
|
|
|
regexp: "^ORIENTDB_PID=.*$"
|
|
|
|
|
line: "ORIENTDB_PID={{ orientdb_pid_dir }}/orientdb.pid"
|
|
|
|
|
insertafter: "^PRG=.*$"
|
|
|
|
|
firstmatch: yes
|
|
|
|
|
loop:
|
|
|
|
|
- server.sh
|
|
|
|
|
- shutdown.sh
|
|
|
|
|
tags: [ 'orientdb', 'orientdb_pid' ]
|
|
|
|
|
|
|
|
|
|
- name: Install the orientdb configuration files
|
|
|
|
|
template: src={{ item }}.j2 dest={{ orientdb_install_dir }}/config/{{ item }} owner={{ orientdb_user }} group={{ orientdb_user }} mode=0640
|
|
|
|
|
with_items: '{{ orientdb_configuration_files }}'
|
|
|
|
|
template:
|
|
|
|
|
src: '{{ item }}.j2'
|
|
|
|
|
dest: '{{ orientdb_install_dir }}/config/{{ item }}'
|
|
|
|
|
owner: '{{ orientdb_user }}'
|
|
|
|
|
group: '{{ orientdb_user }}'
|
|
|
|
|
mode: '0640'
|
|
|
|
|
loop: '{{ orientdb_configuration_files }}'
|
|
|
|
|
notify: Restart orientdb
|
|
|
|
|
tags: [ 'orientdb', 'orientdb_config' ]
|
|
|
|
|
|
|
|
|
@ -93,7 +108,7 @@
|
|
|
|
|
service: name=orientdb state=stopped enabled=no
|
|
|
|
|
when: not orientdb_enabled
|
|
|
|
|
|
|
|
|
|
tags: orientdb
|
|
|
|
|
tags: [ 'orientdb' ]
|
|
|
|
|
when: orientdb_install
|
|
|
|
|
|
|
|
|
|
- block:
|
|
|
|
@ -157,6 +172,6 @@
|
|
|
|
|
name: "Remove old orientdb backups"
|
|
|
|
|
state: absent
|
|
|
|
|
|
|
|
|
|
tags: orientdb
|
|
|
|
|
tags: [ 'orientdb' ]
|
|
|
|
|
when: not orientdb_install
|
|
|
|
|
|
|
|
|
|