From 098fb97660e7064363c70d3dcaa5229d88d4145f Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 29 Sep 2017 18:17:03 +0200 Subject: [PATCH] home library: create a symbolic link to the jackrabbit repository if it is not in the correct place already. --- smartgears/home_library/tasks/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/smartgears/home_library/tasks/main.yml b/smartgears/home_library/tasks/main.yml index f4b99489..b15d84c7 100644 --- a/smartgears/home_library/tasks/main.yml +++ b/smartgears/home_library/tasks/main.yml @@ -29,6 +29,14 @@ become_user: root file: dest={{ jackrabbit_data_dir }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }} + - name: Verify if the JackRabbit persistence directory is in the place where the service expects it + stat: path={{ smartgears_instance_path }}/jackrabbit + register: jackrabbit_data_path + + - name: Link the data dir to the place where jackrabbit expects it + file: src={{ jackrabbit_data_dir }} dest={{ smartgears_instance_path }}/jackrabbit state=link + when: not jackrabbit_data_path.exists + - name: Install the repository configuration files template: src={{ item }}.j2 dest={{ jackrabbit_data_dir }}/{{ item }} with_items: '{{ jackrabbit_config_files }}'