diff --git a/smartgears/accounting_dashboard_harvester_se_plugin/defaults/main.yml b/smartgears/accounting_dashboard_harvester_se_plugin/defaults/main.yml index 85d8e497..3a308acc 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 84698a42..b64aa2a3 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 00000000..27283ccd --- /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 }}