The edu-sharing-notification
role is used activate/deactivate notification system for edu-sharing
The edu-sharing-notification
role is included in the playbook system.yml.
- hosts: edusharing
roles:
- role: edu-sharing-notification
when: edu_version is defined and (edu_version | regex_replace('-RC[0-9]+', '') ) is version_compare('9.0.0', '<')
tags:
- edu-sharing-notification
Since
notification-service
run only in edu-sharing version 9.0.0 and above, we add condition to ignore if edu-sharing is less
or we just want to run only the edu-sharing-notification
then we run:
ansible-playbook -v -i <host> ansible/system.yml --tags "edu-sharing-notification"
This will skip other roles and run only the edu-sharing-notification role
The edu-sharing-notification
role allows you to customize certain variables according to your requirements.
Here are the default variables:
enable_notification_service: false
notification_service_version: 9.0.15
# installation directory
notification_service_install_dir: "{{base_dir}}/notification-service_{{notification_service_version|replace('.','_')}}"
notification_service_environment_variable:
- key: NOTIFICATION_SERVICE_DATABASE_NAME
value: '{{notification_service_database_name | default("notification",true)}}'
- key: NOTIFICATION_SERVICE_DATABASE_USER
value: '{{notification_service_database_user | default("notification",true)}}'
- key: NOTIFICATION_SERVICE_DATABASES_PASS
value: '{{notification_service_database_pass | default("notification",true)}}'
- key: NOTIFICATION_SERVICE_DATABASES_ROOT_USER
value: '{{notification_service_database_root_user | default("root",true)}}'
- key: NOTIFICATION_SERVICE_DATABASES_ROOT_PASS
value: '{{notification_service_database_root_pass | default("root",true)}}'
- key: NOTIFICATION_SERVICE_DATABASES_REPLICATION_SET_KEY
value: '{{notification_service_database_replication_set_key | default("notification",true)}}'
- key: NOTIFICATION_SERVICES_MAIL_SEND_ADDRESS
value: "{{ notification_service_mail_sent_address | default(edu_mail_smtp_from | default('[email protected]',true),true) }}"
- key: REPOSITORY_SERVICE_MAIL_REPORT_RECEIVER
value: "{{ notification_service_mail_sent_address | default(edu_mail_smtp_from | default('[email protected]',true),true) }}"
notification_service_docker_project_name: "notification_service_docker_version"
notification_service_docker_project_name: "notification_service_docker_version"
notification_mail_templates_base_path: "{{notification_service_install_dir}}/templates/mail"
# a list of custom mail templates that should be copied into notification-service;
# format of each entry:
# [<source-file-path>, <destination>]
# example:
# - ['baseLayout.html', '/mail/html/baseLayout.html']
notification_mail_templates:
The tasks/
directory contains all the ansible tasks.
main
: The main task or entry task for ansible.cleanup.yml
: use to cleanup all the*.amp|*.jar
files.download-and-install-docker-compose.yml
: use to download and install docker compose files for notification-service.download-config-plugin.yml
: use to download and install the config plugin files, required for notification-service.download-docker-plugin.yml
: use to download and install the docker plugin files, required for notification-service.download-plugin-kafka-alfresco-amp.yml
: use to download and install the alfrescoamps
files.download-plugin-kafka-service-amp.yml
: use to download and install the edu-sharingamps
files.wait_for_paths.yml
: use to check if the paths in docker volumes are generated by docker, and wait until they are generated.
The template/
directory contains template files.
.env.j2
: a.env
template file, which ansible will replace it with correct variables3_plugin-kafka-override-common.yml.j2
: Use to override some docker services.deploy.sh.j2
: uShell script, used to start,restart,stop notification service
The vars/
directory contains all the variables, for each version of notification-service, for each version we need some variables, and URL that ansible needs to