From 9ce6c9bfdb3f1667a7fb2c3abc839956ba44d4c1 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Wed, 5 Dec 2018 12:45:43 +0100 Subject: [PATCH] Added template to produce config.properties for accounting_dashboard_harvester_se_plugin --- .../defaults/main.yml | 4 ++++ .../accounting_dashboard_harvester_se_plugin/tasks/main.yml | 6 +++++- .../templates/config.properties.j2 | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 smartgears/accounting_dashboard_harvester_se_plugin/templates/config.properties.j2 diff --git a/smartgears/accounting_dashboard_harvester_se_plugin/defaults/main.yml b/smartgears/accounting_dashboard_harvester_se_plugin/defaults/main.yml index 85d8e49..3a308ac 100644 --- a/smartgears/accounting_dashboard_harvester_se_plugin/defaults/main.yml +++ b/smartgears/accounting_dashboard_harvester_se_plugin/defaults/main.yml @@ -10,6 +10,10 @@ accounting_dashboard_harvester_se_plugin_classifier: 'uberjar' accounting_dashboard_harvester_se_plugin_uber_file: '{{ accounting_dashboard_harvester_se_plugin_name }}-{{ accounting_dashboard_harvester_se_plugin_version }}-{{ accounting_dashboard_harvester_se_plugin_classifier }}.{{ accounting_dashboard_harvester_se_plugin_extension }}' accounting_dashboard_harvester_se_plugin_file: '{{ accounting_dashboard_harvester_se_plugin_name }}-{{ accounting_dashboard_harvester_se_plugin_version }}.{{ accounting_dashboard_harvester_se_plugin_extension }}' +accounting_dashboard_harvester_se_plugin_requester_username: 'luca.frosini' +accounting_dashboard_harvester_se_plugin_application_token_name: 'accounting-harvester' + + catalina_apps_conf: - { app_name: '{{ smart_executor_name }}', plugin_name: '{{ accounting_dashboard_harvester_se_plugin_name }}' } diff --git a/smartgears/accounting_dashboard_harvester_se_plugin/tasks/main.yml b/smartgears/accounting_dashboard_harvester_se_plugin/tasks/main.yml index 84698a4..b64aa2a 100644 --- a/smartgears/accounting_dashboard_harvester_se_plugin/tasks/main.yml +++ b/smartgears/accounting_dashboard_harvester_se_plugin/tasks/main.yml @@ -32,7 +32,11 @@ - name: Download the accounting_dashboard_harvester plugin jar file maven_artifact: artifact_id={{ accounting_dashboard_harvester_se_plugin_name }} version={{ accounting_dashboard_harvester_se_plugin_version }} group_id={{ accounting_dashboard_harvester_se_plugin_group_id }} extension={{ accounting_dashboard_harvester_se_plugin_extension }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/plugins/{{ accounting_dashboard_harvester_se_plugin_name }} keep_name=yes notify: Restart smartgears - + + - name: Install the accounting_dashboard_harvester plugin configuration + template: src=config.properties.j2 dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/classes/config.properties mode=0440 + notify: Restart smartgears + - name: Remove the accounting_dashboard_harvester uber jar org and META-INF directories file: dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/plugins/{{ accounting_dashboard_harvester_se_plugin_name }}/{{ item }} state=absent with_items: diff --git a/smartgears/accounting_dashboard_harvester_se_plugin/templates/config.properties.j2 b/smartgears/accounting_dashboard_harvester_se_plugin/templates/config.properties.j2 new file mode 100644 index 0000000..27283cc --- /dev/null +++ b/smartgears/accounting_dashboard_harvester_se_plugin/templates/config.properties.j2 @@ -0,0 +1,2 @@ +USERNAME={{ accounting_dashboard_harvester_se_plugin_requester_username }} +SERVICE_NAME={{ accounting_dashboard_harvester_se_plugin_application_token_name }}