From cb3004120a5778d5d8733b12d5a87c1603d4bf03 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 27 Oct 2016 16:10:31 +0200 Subject: [PATCH] library/roles/orientdb: Use wildcards to remove the old hooks. Remove the old hook files before installing the new ones. --- orientdb/defaults/main.yml | 2 +- orientdb/tasks/main.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/orientdb/defaults/main.yml b/orientdb/defaults/main.yml index dc5c825..577ac1e 100644 --- a/orientdb/defaults/main.yml +++ b/orientdb/defaults/main.yml @@ -29,7 +29,7 @@ orientdb_hooks_classes: #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.1-SNAPSHOT&e=jar&c=jar-with-dependencies' #orientdb_hooks_to_be_removed: -# - hook.jar +# - hook*.jar orientdb_binary_protocol_lower_port: 2424 orientdb_binary_protocol_higher_port: 2430 diff --git a/orientdb/tasks/main.yml b/orientdb/tasks/main.yml index 283750e..9bf01cc 100644 --- a/orientdb/tasks/main.yml +++ b/orientdb/tasks/main.yml @@ -32,15 +32,15 @@ - '{{ orientdb_data_dir }}' - '{{ orientdb_pid_dir }}' + - name: Remove the old hook jars + shell: rm {{ orientdb_install_dir }}/lib/{{ item }} + with_items: '{{ orientdb_hooks_to_be_removed | default([]) }}' + - 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: Remove the old hook jars - file: dest={{ orientdb_install_dir }}/lib/{{ item }} state=absent - with_items: '{{ orientdb_hooks_to_be_removed | default([]) }}' - - name: Install the orientdb default settings template: src=orientdb.default.j2 dest=/etc/default/orientdb owner=root group=root mode=0444 notify: Restart orientdb