diff --git a/.gitignore b/.gitignore index 751553b..bb363d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ *.bak +./inventories/dev/* +./inventories/prod/* +repl.lisp-repl diff --git a/README.md b/README.md index b1b69bb..ef27b21 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,37 @@ Phoenix CTMS ===== -This repository is a supplemental part of the Phoenix CTMS platform, see [https://github.com/phoenixctms/ctsms](https://github.com/phoenixctms/ctsms). \ No newline at end of file +This repository is a supplemental part of the Phoenix CTMS platform, see [https://github.com/phoenixctms/ctsms](https://github.com/phoenixctms/ctsms). + +The following variables can be set. Variables correspond to Phoenix application parameters. + +Global Variables: + +| Variable Name | Description | Default Value | +|----------------------------|---------------------------------------------|---------------| +| `enable_inventory_module` | Enables the inventory module | `"true"` | +| `enable_staff_module` | Enables the staff/employee module | `"true"` | +| `enable_course_module` | Enables the course management module | `"true"` | +| `enable_trial_module` | Enables the clinical trial module | `"true"` | +| `enable_proband_module` | Enables the proband/patient module | `"true"` | +| `enable_input_field_module`| Enables custom input fields | `"true"` | +| `enable_user_module` | Enables user account management | `"true"` | +| `enable_mass_mail_module` | Enables bulk email/mass mail functionality | `"true"` | + +Application Context Variables (Default Language): +| Variable Name | Description | Default Value | +|---------------------------------------------------|-----------------------------------------------------------------------------|---------------| +| `default_locale` | Default system language for the application | `"en"` | +| `time_zone` | Default system time zone | `"UTC"` | +| `journal_database_write_locale` | Language used when writing journal entries | `"en"` | +| `audit_trail_database_write_locale` | Language used when writing audit trail logs | `"en"` | +| `notifications_database_write_locale` | Language used when saving notification records | `"en"` | +| `proband_list_status_reasons_database_write_locale` | Language used for status reasons in the proband list module | `"en"` | +| `cv_pdf_locale` | Language used for generating CV PDFs | `"en"` | +| `reimbursements_pdf_locale` | Language used for generating reimbursement PDFs | `"en"` | +| `course_participant_list_pdf_locale` | Language used for course participant list PDFs | `"en"` | +| `proband_letter_pdf_locale` | Language used for generating letters to probands | `"en"` | +| `course_certificate_pdf_locale` | Language used for generating course completion certificates | `"en"` | +| `ecrf_pdf_locale` | Language used for generating eCRF (electronic case report form) PDFs | `"en"` | +| `inquiries_pdf_locale` | Language used for generating inquiry/export documents | `"en"` | +| `proband_list_entry_tags_pdf_locale` | Language used for entry tags in proband list PDFs | `"en"` | diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..a5fa946 --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,3 @@ +[defaults] +inventory = ./hosts +host_key_checking = False diff --git a/dbtool.sh b/dbtool.sh deleted file mode 100644 index 0ff9ed8..0000000 --- a/dbtool.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -CTSMS_PROPERTIES=${CTSMS_PROPERTIES:-/ctsms/properties} -CTSMS_JAVA=${CTSMS_JAVA:-/ctsms/java} -CATALINA_BASE=${CATALINA_BASE:-/var/lib/tomcat9} -java -DCTSMS_PROPERTIES="$CTSMS_PROPERTIES" -DCTSMS_JAVA="$CTSMS_JAVA" -Dfile.encoding=Cp1252 -Djava.awt.headless=true --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED -Xms2048m -Xmx4096m -Xss256k -XX:+UseParallelGC -XX:MaxGCPauseMillis=1500 -XX:GCTimeRatio=9 -XX:+CMSClassUnloadingEnabled -XX:ReservedCodeCacheSize=256m -classpath $CATALINA_BASE/webapps/ROOT/WEB-INF/lib/ctsms-core-1.8.1.jar:$CATALINA_BASE/webapps/ROOT/WEB-INF/lib/* org.phoenixctms.ctsms.executable.DBTool $* \ No newline at end of file diff --git a/debian_bootstrap.txt b/debian_bootstrap.txt index 4e2fe1e..4b54781 100644 --- a/debian_bootstrap.txt +++ b/debian_bootstrap.txt @@ -1,4 +1,4 @@ -sudo apt-get -y install wget ca-certificates -sudo wget https://raw.githubusercontent.com/phoenixctms/install-debian/master/phoenix_install -O ~/phoenix_install -sudo chmod 755 ~/phoenix_install -echo '[ -f ~/phoenix_install ] && ~/phoenix_install' >>~/.bashrc \ No newline at end of file +sudo apt-get -y install ansible git +git clone https://github.com/phoenixctms/install-debian.git +cd ~/install-debian +ansible-playbook install.yml -K diff --git a/ecrfdataexport.sh b/ecrfdataexport.sh deleted file mode 100644 index d136101..0000000 --- a/ecrfdataexport.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/process.pl $* \ No newline at end of file diff --git a/ecrfdataimport.sh b/ecrfdataimport.sh deleted file mode 100644 index 554261a..0000000 --- a/ecrfdataimport.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/process.pl $* \ No newline at end of file diff --git a/hosts b/hosts new file mode 100644 index 0000000..df8b5f6 --- /dev/null +++ b/hosts @@ -0,0 +1,2 @@ +[all] +localhost ansible_connection=local diff --git a/inquirydataexport.sh b/inquirydataexport.sh deleted file mode 100644 index 9014f30..0000000 --- a/inquirydataexport.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/process.pl $* \ No newline at end of file diff --git a/install.sh b/install.sh deleted file mode 100644 index a65b3a5..0000000 --- a/install.sh +++ /dev/null @@ -1,287 +0,0 @@ -#!/bin/bash - -if [ "$EUID" -ne 0 ] - then echo "Please run as root" - exit -fi - -TAG=master -CONFIG_REPO= -TOKEN= - -###read args -if [[ "$1" != "" ]]; then - TAG="$1" -fi -if [[ "$2" != "" ]]; then - CONFIG_REPO="$2" -fi -if [[ "$3" != "" ]]; then - TOKEN="$3" -fi - -XMS=2048m -XMX=4096m -XSS=512k -PERM=256m - -###install some general packages -apt-get -q -o=Dpkg::Use-Pty=0 update -#apt-get -q -y -o=Dpkg::Use-Pty=0 install open-vm-tools -#apt-get -q -y -o=Dpkg::Use-Pty=0 install net-tools -#apt-get -q -y -o=Dpkg::Use-Pty=0 install mc htop pg_activity -apt-get -q -y -o=Dpkg::Use-Pty=0 install sudo wget curl lsb-release gnupg - -###sync time -apt-get -q -y -o=Dpkg::Use-Pty=0 install ntp -ntpd -q -g - -###create 'ctsms' user -useradd ctsms -# -p '*' --groups sudo - -###prepare /ctsms directory with default-config and master-data -mkdir /ctsms -rm /ctsms/bulk_processor/ -rf -wget --no-verbose https://raw.githubusercontent.com/phoenixctms/install-debian/$TAG/dbtool.sh -O /ctsms/dbtool.sh -chown ctsms:ctsms /ctsms/dbtool.sh -chmod 755 /ctsms/dbtool.sh -wget --no-verbose https://raw.githubusercontent.com/phoenixctms/install-debian/$TAG/clearcache.sh -O /ctsms/clearcache.sh -chown ctsms:ctsms /ctsms/clearcache.sh -chmod 755 /ctsms/clearcache.sh -if [ -z "$CONFIG_REPO" ] || [ -z "$TOKEN" ]; then - wget --no-verbose --no-check-certificate --content-disposition https://github.com/phoenixctms/config-default/archive/$TAG.tar.gz -O /ctsms/config.tar.gz -else - wget --no-verbose --no-check-certificate --header "Authorization: token $TOKEN" --content-disposition https://github.com/$CONFIG_REPO/archive/$TAG.tar.gz -O /ctsms/config.tar.gz -fi -tar -zxvf /ctsms/config.tar.gz -C /ctsms --strip-components 1 -rm /ctsms/config.tar.gz -f -if [ -f /ctsms/install/environment ]; then - source /ctsms/install/environment -fi -sed -r -i "s/-Xms[^ ]+/-Xms$XMS/" /ctsms/dbtool.sh -sed -r -i "s/-Xmx[^ ]+/-Xmx$XMX/" /ctsms/dbtool.sh -sed -r -i "s/-Xss[^ ]+/-Xss$XSS/" /ctsms/dbtool.sh -sed -r -i "s/-XX:ReservedCodeCacheSize=[^ ]+/-XX:ReservedCodeCacheSize=$PERM/" /ctsms/dbtool.sh -wget --no-verbose https://api.github.com/repos/phoenixctms/master-data/tarball/$TAG -O /ctsms/master-data.tar.gz -rm /ctsms/master_data -rf -mkdir /ctsms/master_data -tar -zxvf /ctsms/master-data.tar.gz -C /ctsms/master_data --strip-components 1 -rm /ctsms/master-data.tar.gz -f -chown ctsms:ctsms /ctsms -R -chmod 775 /ctsms -chmod 775 /ctsms/external_files -R -wget --no-verbose https://raw.githubusercontent.com/phoenixctms/install-debian/$TAG/update -O /ctsms/update -chmod 755 /ctsms/update - -###install OpenJDK 11 -apt-get -q -y -o=Dpkg::Use-Pty=0 install default-jdk - -###install tomcat9 -apt-get -q -y -o=Dpkg::Use-Pty=0 install libservlet3.1-java tomcat9 -systemctl stop tomcat9 -#allow tomcat writing to /ctsms/external_files: -usermod --append --groups ctsms tomcat -#allow ctsms user to load jars from exploded .war: -usermod --append --groups tomcat,adm ctsms -wget --no-verbose https://raw.githubusercontent.com/phoenixctms/install-debian/$TAG/tomcat/workers.properties -O /etc/tomcat9/workers.properties -chown root:tomcat /etc/tomcat9/workers.properties -wget --no-verbose https://raw.githubusercontent.com/phoenixctms/install-debian/$TAG/tomcat/server.xml -O /etc/tomcat9/server.xml -chown root:tomcat /etc/tomcat9/server.xml -chmod 640 /etc/tomcat9/workers.properties -chmod 770 /var/log/tomcat9 -chmod g+w /var/log/tomcat9/* -chmod 775 /var/lib/tomcat9/webapps -sed -r -i "s/^JAVA_OPTS.+/JAVA_OPTS=\"-server -Djava.awt.headless=true -Xms$XMS -Xmx$XMX -Xss$XSS -XX:+UseParallelGC -XX:MaxGCPauseMillis=1500 -XX:GCTimeRatio=9 -XX:+CMSClassUnloadingEnabled -XX:ReservedCodeCacheSize=$PERM\"/" /etc/default/tomcat9 -echo 'CTSMS_PROPERTIES=/ctsms/properties' >>/etc/default/tomcat9 -echo 'CTSMS_JAVA=/ctsms/java' >>/etc/default/tomcat9 -mkdir /etc/systemd/system/tomcat9.service.d -chmod 755 /etc/systemd/system/tomcat9.service.d -wget --no-verbose https://raw.githubusercontent.com/phoenixctms/install-debian/$TAG/tomcat/ctsms.conf -O /etc/systemd/system/tomcat9.service.d/ctsms.conf -chmod 644 /etc/systemd/system/tomcat9.service.d/ctsms.conf -systemctl daemon-reload -systemctl start tomcat9 - -###build phoenix -apt-get -q -y -o=Dpkg::Use-Pty=0 install git maven -rm /ctsms/build/ -rf -mkdir /ctsms/build -cd /ctsms/build -git clone https://github.com/phoenixctms/ctsms -cd /ctsms/build/ctsms -if [ "$TAG" != "master" ]; then - git checkout tags/$TAG -b $TAG -fi -VERSION=$(grep -oP '\K[^<]+' /ctsms/build/ctsms/pom.xml) -COMMIT=$(git rev-parse --short HEAD) -sed -r -i "s/([^<]+)<\/application.version>/\1 [$COMMIT]<\/application.version>/" /ctsms/build/ctsms/pom.xml -UUID=$(cat /proc/sys/kernel/random/uuid) -sed -r -i "s/<\/application\.uuid>/$UUID<\/application.uuid>/" /ctsms/build/ctsms/pom.xml -mvn install -DskipTests -if [ ! -f /ctsms/build/ctsms/web/target/ctsms-$VERSION.war ]; then - # maybe we have more luck with dependency download on a 2nd try: - mvn install -DskipTests -fi -mvn -f core/pom.xml org.andromda.maven.plugins:andromdapp-maven-plugin:schema -Dtasks=create -mvn -f core/pom.xml org.andromda.maven.plugins:andromdapp-maven-plugin:schema -Dtasks=drop - -###install postgres 13 -apt-get -q -y -o=Dpkg::Use-Pty=0 install postgresql postgresql-plperl -sudo -u postgres psql postgres -c "CREATE USER ctsms WITH PASSWORD 'ctsms';" -sudo -u postgres psql postgres -c "CREATE DATABASE ctsms;" -sudo -u postgres psql postgres -c "GRANT ALL PRIVILEGES ON DATABASE ctsms to ctsms;" -sudo -u postgres psql postgres -c "ALTER DATABASE ctsms OWNER TO ctsms;" -sudo -u postgres psql ctsms < /ctsms/build/ctsms/core/db/dbtool.sql -sudo -u ctsms psql -U ctsms ctsms < /ctsms/build/ctsms/core/db/schema-create.sql -sudo -u ctsms psql -U ctsms ctsms < /ctsms/build/ctsms/core/db/index-create.sql -sudo -u ctsms psql -U ctsms ctsms < /ctsms/build/ctsms/core/db/schema-set-version.sql -sed -r -i "s|#*join_collapse_limit.*|join_collapse_limit = 1|" /etc/postgresql/13/main/postgresql.conf -systemctl restart postgresql - -###enable ssh and database remote access -#apt-get -q -y -o=Dpkg::Use-Pty=0 install ssh -#sed -r -i "s|#*listen_addresses.*|listen_addresses = '*'|" /etc/postgresql/13/main/postgresql.conf -#echo -e "host\tall\tall\t0.0.0.0/0\tmd5\nhost\tall\tall\t::/0\tmd5" >> /etc/postgresql/13/main/pg_hba.conf -#systemctl restart postgresql - -###deploy .war -chmod 755 /ctsms/build/ctsms/web/target/ctsms-$VERSION.war -rm /var/lib/tomcat9/webapps/ROOT/ -rf -cp /ctsms/build/ctsms/web/target/ctsms-$VERSION.war /var/lib/tomcat9/webapps/ROOT.war - -###install memcached -apt-get -q -y -o=Dpkg::Use-Pty=0 install memcached -chmod 777 /var/run/memcached -sed -r -i 's/-p 11211/#-p 11211/' /etc/memcached.conf -sed -r -i 's/-l 127\.0\.0\.1/-s \/var\/run\/memcached\/memcached.sock -a 0666/' /etc/memcached.conf -systemctl restart memcached - -###install bulk-processor -apt-get -q -y -o=Dpkg::Use-Pty=0 install \ -libarchive-zip-perl \ -libconfig-any-perl \ -libdata-dump-perl \ -libdata-dumper-concise-perl \ -libdata-uuid-perl \ -libdata-validate-ip-perl \ -libdate-calc-perl \ -libdate-manip-perl \ -libdatetime-format-iso8601-perl \ -libdatetime-format-strptime-perl \ -libdatetime-perl \ -libdatetime-timezone-perl \ -libdbd-csv-perl \ -libdbd-mysql-perl \ -libdbd-sqlite3-perl \ -tdsodbc \ -libdbd-odbc-perl \ -libdigest-md5-perl \ -libemail-mime-attachment-stripper-perl \ -libemail-mime-perl \ -libgearman-client-perl \ -libhtml-parser-perl \ -libintl-perl \ -libio-compress-perl \ -libio-socket-ssl-perl \ -libjson-xs-perl \ -liblog-log4perl-perl \ -libmail-imapclient-perl \ -libmarpa-r2-perl \ -libmime-base64-perl \ -libmime-lite-perl \ -libmime-tools-perl \ -libnet-address-ip-local-perl \ -libnet-smtp-ssl-perl \ -libole-storage-lite-perl \ -libphp-serialization-perl \ -libexcel-writer-xlsx-perl \ -libspreadsheet-parseexcel-perl \ -libstring-mkpasswd-perl \ -libtext-csv-xs-perl \ -libtie-ixhash-perl \ -libtime-warp-perl \ -liburi-find-perl \ -libuuid-perl \ -libwww-perl \ -libxml-dumper-perl \ -libxml-libxml-perl \ -libyaml-libyaml-perl \ -libyaml-tiny-perl \ -libtemplate-perl \ -libdancer-perl \ -libdbd-pg-perl \ -libredis-perl \ -libjson-perl \ -libplack-perl \ -libcache-memcached-perl \ -libdancer-session-memcached-perl \ -libgraphviz-perl \ -gnuplot \ -imagemagick \ -ghostscript \ -build-essential \ -libtest-utf8-perl \ -libmoosex-hasdefaults-perl \ -cpanminus -sed -r -i 's/^\s*()\s*$//' /etc/ImageMagick-6/policy.xml -if [ "$(lsb_release -d | grep -Ei 'debian')" ]; then - apt-get -q -y -o=Dpkg::Use-Pty=0 install libsys-cpuaffinity-perl -else - cpanm Sys::CpuAffinity - cpanm threads::shared -fi -cpanm --notest Dancer::Plugin::I18N -cpanm --notest DateTime::Format::Excel -cpanm --notest Spreadsheet::Reader::Format -cpanm --notest Spreadsheet::Reader::ExcelXML -wget --no-verbose --no-check-certificate --content-disposition https://github.com/phoenixctms/bulk-processor/archive/$TAG.tar.gz -O /ctsms/bulk-processor.tar.gz -tar -zxvf /ctsms/bulk-processor.tar.gz -C /ctsms/bulk_processor --strip-components 1 -perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup -mkdir /ctsms/bulk_processor/output -chown ctsms:ctsms /ctsms/bulk_processor -R -chmod 755 /ctsms/bulk_processor -R -chmod 777 /ctsms/bulk_processor/output -R -rm /ctsms/bulk-processor.tar.gz -f -wget --no-verbose https://raw.githubusercontent.com/phoenixctms/install-debian/$TAG/ecrfdataexport.sh -O /ctsms/ecrfdataexport.sh -chown ctsms:ctsms /ctsms/ecrfdataexport.sh -chmod 755 /ctsms/ecrfdataexport.sh -wget --no-verbose https://raw.githubusercontent.com/phoenixctms/install-debian/$TAG/ecrfdataimport.sh -O /ctsms/ecrfdataimport.sh -chown ctsms:ctsms /ctsms/ecrfdataimport.sh -chmod 755 /ctsms/ecrfdataimport.sh -wget --no-verbose https://raw.githubusercontent.com/phoenixctms/install-debian/$TAG/inquirydataexport.sh -O /ctsms/inquirydataexport.sh -chown ctsms:ctsms /ctsms/inquirydataexport.sh -chmod 755 /ctsms/inquirydataexport.sh - -###setup apache2 -chmod +rwx /ctsms/install/install_apache.sh -export TAG -/ctsms/install/install_apache.sh - -###initialize database -chmod +rwx /ctsms/install/init_database.sh -/ctsms/install/init_database.sh -/ctsms/clearcache.sh - -###setup cron -chmod +rwx /ctsms/install/install_cron.sh -/ctsms/install/install_cron.sh - -###setup logrotate -wget --no-verbose https://raw.githubusercontent.com/phoenixctms/install-debian/$TAG/logrotate/ctsms -O /etc/logrotate.d/ctsms -chown root:root /etc/logrotate.d/ctsms -chmod 644 /etc/logrotate.d/ctsms - -###render workflow state diagram images from db and include them for tooltips -cd /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render -./render.sh -cd /ctsms/build/ctsms -mvn -f web/pom.xml -Dmaven.test.skip=true -chmod 755 /ctsms/build/ctsms/web/target/ctsms-$VERSION.war -systemctl stop tomcat9 -rm /var/lib/tomcat9/webapps/ROOT/ -rf -cp /ctsms/build/ctsms/web/target/ctsms-$VERSION.war /var/lib/tomcat9/webapps/ROOT.war - -###ready -systemctl start tomcat9 -echo "Phoenix CTMS $VERSION [$COMMIT] installation finished." -grep 'Log in' /home/phoenix/install.log diff --git a/install.yml b/install.yml new file mode 100644 index 0000000..674c8ba --- /dev/null +++ b/install.yml @@ -0,0 +1,14 @@ +- import_playbook: playbooks/begin-installation.yml +- import_playbook: playbooks/prepare-ctsms-directory.yml +- import_playbook: playbooks/tomcat9.yml +- import_playbook: playbooks/build-phoenix.yml +- import_playbook: playbooks/install-postgres.yml +# - import_playbook: playbooks/enable-remote-access.yml +- import_playbook: playbooks/deploy-war.yml +- import_playbook: playbooks/install-memcached.yml +- import_playbook: playbooks/install-bulk-processor.yml +- import_playbook: playbooks/setup-apache2.yml +- import_playbook: playbooks/init-database.yml +- import_playbook: playbooks/install-cron.yml +- import_playbook: playbooks/setup-logrotate.yml +- import_playbook: playbooks/render-workflow-diagrams.yml diff --git a/inventories/local b/inventories/local new file mode 100644 index 0000000..64581e3 --- /dev/null +++ b/inventories/local @@ -0,0 +1,11 @@ +[webapp] +localhost ansible_connection=local + +[db] +localhost ansible_connection=local + +[bulk-processor] +localhost ansible_connection=local + +[reverse-proxy] +localhost ansible_connection=local diff --git a/phoenix_install b/phoenix_install deleted file mode 100644 index 3707d6a..0000000 --- a/phoenix_install +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -sudo dhclient -v -sudo apt-get update -sudo apt-get -y install wget ca-certificates -wget https://raw.githubusercontent.com/phoenixctms/install-debian/master/install.sh -O ~/install.sh -chmod 744 ~/install.sh -sudo ~/install.sh 2>&1 | tee ~/install.log - -# Delete me -rm -f ~/phoenix_install \ No newline at end of file diff --git a/playbooks/begin-installation.yml b/playbooks/begin-installation.yml new file mode 100644 index 0000000..4a736c4 --- /dev/null +++ b/playbooks/begin-installation.yml @@ -0,0 +1,26 @@ +- name: Install Phoenix CTMS v1.8.2 + gather_facts: true + become: true + hosts: all + tasks: + - name: Install General Packages + apt: + pkg: + - sudo + - wget + - curl + - lsb-release + - gnupg + - ntp + state: latest + update_cache: true + + - name: Sync Time + ansible.builtin.service: + name: ntp + state: started + enabled: yes + + - name: Create 'ctsms' user + ansible.builtin.user: + name: ctsms diff --git a/playbooks/build-phoenix.yml b/playbooks/build-phoenix.yml new file mode 100644 index 0000000..a48964a --- /dev/null +++ b/playbooks/build-phoenix.yml @@ -0,0 +1,50 @@ +- name: Build Phoenix CTMS + become: true + hosts: all + tasks: + - name: install maven + ansible.builtin.apt: + name: maven + state: present + + - name: Remove /ctsms/build + ansible.builtin.file: + path: /ctsms/build + state: absent + + - name: Create /ctsms/build + ansible.builtin.file: + path: /ctsms/build + state: directory + + - name: Clone Phoenix repository + ansible.builtin.git: + repo: 'https://github.com/phoenixctms/ctsms.git' + dest: /ctsms/build/ctsms + + - name: Run mvn install with -DskipTests + command: mvn install -DskipTests + args: + chdir: /ctsms/build/ctsms + register: mvn_install + changed_when: "'BUILD SUCCESS' in mvn_install.stdout" + + # - name: Retry mvn install if .war file was not created + # command: mvn install -DskipTests + # args: + # chdir: /ctsms/build/ctsms + # when: not war_file.stat.exists + # register: mvn_retry + # changed_when: "'BUILD SUCCESS' in mvn_retry.stdout" + + - name: Run andromdapp-maven-plugin (create schema) + command: > + mvn -f core/pom.xml org.andromda.maven.plugins:andromdapp-maven-plugin:schema -Dtasks=create + args: + chdir: /ctsms/build/ctsms + + - name: Run andromdapp-maven-plugin (drop schema) + command: > + mvn -f core/pom.xml org.andromda.maven.plugins:andromdapp-maven-plugin:schema -Dtasks=drop + args: + chdir: /ctsms/build/ctsms diff --git a/playbooks/deploy-war.yml b/playbooks/deploy-war.yml new file mode 100644 index 0000000..3adfeaf --- /dev/null +++ b/playbooks/deploy-war.yml @@ -0,0 +1,25 @@ +- name: Deploy .war + become: true + hosts: all + vars: + version: 1.8.1 + tasks: + - name: Change file ownership, group and permissions + ansible.builtin.file: + path: /ctsms/build/ctsms/web/target/ctsms-{{ version }}.war + mode: '2755' + owner: ctsms + group: ctsms + + - name: Remove /opt/tomcat9/webapps/ROOT/ + ansible.builtin.file: + path: /opt/tomcat9/webapps/ROOT/ + state: absent + + - name: Copy .war to Tomcat directory + ansible.builtin.copy: + src: /ctsms/build/ctsms/web/target/ctsms-{{ version }}.war + dest: /opt/tomcat9/webapps/ROOT.war + owner: ctsms + group: ctsms + mode: '2755' diff --git a/playbooks/enable-remote-access.yml b/playbooks/enable-remote-access.yml new file mode 100644 index 0000000..980877b --- /dev/null +++ b/playbooks/enable-remote-access.yml @@ -0,0 +1,40 @@ +- name: Enable Remote Access + become: true + hosts: all + tasks: + - name: install ssh + ansible.builtin.apt: + name: ssh + state: present + + - name: Set listen_addresses in postgresql.conf + ansible.builtin.lineinfile: + path: /etc/postgresql/15/main/postgresql.conf + regexp: '^#?listen_addresses\s*=' + line: "listen_addresses = '*'" + backup: yes + notify: Restart PostgreSQL + + - name: Allow IPv4 remote connections in pg_hba.conf + ansible.builtin.lineinfile: + path: /etc/postgresql/15/main/pg_hba.conf + line: 'host all all 0.0.0.0/0 md5' + state: present + create: yes + backup: yes + notify: Restart PostgreSQL + + - name: Allow IPv6 remote connections in pg_hba.conf + ansible.builtin.lineinfile: + path: /etc/postgresql/15/main/pg_hba.conf + line: 'host all all ::/0 md5' + state: present + create: yes + backup: yes + notify: Restart PostgreSQL + + handlers: + - name: Restart PostgreSQL + ansible.builtin.service: + name: postgresql + state: restarted diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml new file mode 100644 index 0000000..35ae9f5 --- /dev/null +++ b/playbooks/init-database.yml @@ -0,0 +1,190 @@ +- name: Initialize Database + become: true + hosts: all + gather_facts: yes + vars: + titles_file: "/ctsms/master_data/titles.csv" + bank_identification_file: "/ctsms/master_data/kiverzeichnis_gesamt_de_1347893202433.csv" + countries_file: "/ctsms/master_data/countries.txt" + street_names_file: "/ctsms/master_data/streetnames.csv" + icd_systematics_file: "/ctsms/master_data/icd10gm2012syst_claml_20110923.xml" + icd_systematics_lang: "de" + alpha_id_file: "/ctsms/master_data/icd10gm2012_alphaid_edv_ascii_20110930.txt" + alpha_id_file_encoding: "ISO-8859-1" + alpha_id_file_revision: "icd10gm2012syst_claml_20110923" + ops_systematics_file: "/ctsms/master_data/ops2012syst_claml_20111103.xml" + ops_systematics_file_lang: "de" + ops_codes_file: "/ctsms/master_data/ops2011alpha_edv_ascii_20111031.txt" + ops_codes_file_revisions: "ops2012syst_claml_20111103" + asp_substances_file: "/ctsms/master_data/asp_register_20240316.xls" + asp_substances_file_encoding: "Cp1252" + IP: "{{ ansible_default_ipv4.address }}" + + tasks: + - name: Generate environment passwords + ansible.builtin.set_fact: + department_password: "{{ lookup('password', '/dev/null length=32 chars=ascii_letters,digits') }}" + user_password: "{{ lookup('password', '/dev/null length=3 chars=ascii_letters') }}" + cron_password: "{{ lookup('password', '/dev/null length=3 chars=ascii_letters') }}" + + - name: initialize db by inserting required setup records + shell: sudo -u ctsms /ctsms/dbtool.sh -i -f + + - name: import criterion properties tables + shell: sudo -u ctsms /ctsms/dbtool.sh -icp /ctsms/master_data/criterion_property_definitions.csv + + - name: import permission definitions from csv/text file + shell: sudo -u ctsms /ctsms/dbtool.sh -ipd /ctsms/master_data/permission_definitions.csv + + - name: import inventory file mime types from csv/text file + shell: sudo -u ctsms /ctsms/dbtool.sh -imi /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import staff file mime types from csv/text file + shell: sudo -u ctsms /ctsms/dbtool.sh -ims /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import course file mime types from csv/text file + shell: sudo -u ctsms /ctsms/dbtool.sh -imc /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import trial file mime types from csv/text file + shell: sudo -u ctsms /ctsms/dbtool.sh -imt /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import proband file mime types from csv/text file + shell: sudo -u ctsms /ctsms/dbtool.sh -imp /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import mass mail file mime types from csv/text file + shell: sudo -u ctsms /ctsms/dbtool.sh -immm /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import input field image file mime types from csv/text file + shell: sudo -u ctsms /ctsms/dbtool.sh -imifi /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import input staff image file mime types from csv/text file + shell: sudo -u ctsms /ctsms/dbtool.sh -imsi /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import proband image file mime types from csv/text file + shell: sudo -u ctsms /ctsms/dbtool.sh -impi /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import job data file mime types from csv/text file + shell: sudo -u ctsms /ctsms/dbtool.sh -imjf /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import course certificate file mime types from csv/text file + shell: sudo -u ctsms /ctsms/dbtool.sh -imcc /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import titles from csv/text file + shell: sudo -u ctsms /ctsms/dbtool.sh -it "{{ titles_file }}" -e ISO-8859-1 + + - name: import bank identifications from csv/text file + shell: sudo -u ctsms /ctsms/dbtool.sh -ib "{{ bank_identification_file }}" -e ISO-8859-1 + + - name: import country names from csv/text file + shell: sudo -u ctsms /ctsms/dbtool.sh -ic "{{ countries_file }}" -e ISO-8859-1 + + - name: import zip codes from csv/text file + shell: sudo -u ctsms /ctsms/dbtool.sh -iz "{{ street_names_file }}" -e utf-8 + + - name: import street names from csv/text file + shell: sudo -u ctsms /ctsms/dbtool.sh -is "{{ street_names_file }}" -e utf-8 + + - name: import icd systematics with language encoding + shell: sudo -u ctsms /ctsms/dbtool.sh -iis "{{ icd_systematics_file }}" -sl "{{ icd_systematics_lang }}" + + - name: import alpha ids + shell: sudo -u ctsms /ctsms/dbtool.sh -iai "{{ alpha_id_file }}" -e "{{ alpha_id_file_encoding }}" -isr "{{ alpha_id_file_revision }}" + + - name: import ops systematics + shell: sudo -u ctsms /ctsms/dbtool.sh -ios "{{ ops_systematics_file }}" -sl "{{ ops_systematics_file_lang }}" + + - name: import ops codes + shell: sudo -u ctsms /ctsms/dbtool.sh -ioc "{{ ops_codes_file }}" -osr "{{ ops_codes_file_revisions }}" + + - name: import asp and substances + shell: sudo -u ctsms /ctsms/dbtool.sh -ia "{{ asp_substances_file }}" -e "{{ asp_substances_file_encoding }}" + + - name: create department 'my_department' + shell: sudo -u ctsms /ctsms/dbtool.sh -cd -dlk my_department -dp "{{ department_password }}" + + - name: create user 'phoenix' + shell: sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "phoenix" -p "{{ user_password }}" -pp "INVENTORY_MASTER_ALL_DEPARTMENTS,STAFF_MASTER_ALL_DEPARTMENTS,COURSE_MASTER_ALL_DEPARTMENTS,TRIAL_MASTER_ALL_DEPARTMENTS,PROBAND_MASTER_ALL_DEPARTMENTS,USER_ALL_DEPARTMENTS,INPUT_FIELD_MASTER,MASS_MAIL_MASTER_ALL_DEPARTMENTS,INVENTORY_MASTER_SEARCH,STAFF_MASTER_SEARCH,COURSE_MASTER_SEARCH,TRIAL_MASTER_SEARCH,PROBAND_MASTER_SEARCH,USER_MASTER_SEARCH,INPUT_FIELD_MASTER_SEARCH,MASS_MAIL_MASTER_SEARCH" + + - name: Create language-based users + shell: sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_{{ item }}" -p "my_department_signup_{{ item }}" -ul {{ item }} -pp "INVENTORY_VIEW_USER_DEPARTMENT,STAFF_DETAIL_IDENTITY,COURSE_VIEW_USER_DEPARTMENT,TRIAL_SIGNUP,PROBAND_SIGNUP,USER_ACTIVE_USER,INPUT_FIELD_VIEW,MASS_MAIL_SIGNUP,INVENTORY_NO_SEARCH,STAFF_NO_SEARCH,COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" + loop: + - de + - en + - da + - es + - fi + - fr + - hu + - it + - ja + - ko + - nl + - pt + - ro + - sk + + - name: create user 'cron' + shell: sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_cron" -p "{{ cron_password }}" -pp "INVENTORY_MASTER_ALL_DEPARTMENTS,STAFF_MASTER_ALL_DEPARTMENTS,COURSE_MASTER_ALL_DEPARTMENTS,TRIAL_MASTER_ALL_DEPARTMENTS,PROBAND_MASTER_ALL_DEPARTMENTS,USER_ALL_DEPARTMENTS,INPUT_FIELD_MASTER,MASS_MAIL_MASTER_ALL_DEPARTMENTS,INVENTORY_MASTER_SEARCH,STAFF_MASTER_SEARCH,COURSE_MASTER_SEARCH,TRIAL_MASTER_SEARCH,PROBAND_MASTER_SEARCH,USER_MASTER_SEARCH,INPUT_FIELD_MASTER_SEARCH,MASS_MAIL_MASTER_SEARCH" + + - name: Write config.cfg to each ETL file path + copy: + dest: "{{ item }}" + content: | + ##general settings: + #working_path = /var/xy + cpucount = 1 + enablemultithreading = 1 + + ##gearman/service listener config: + jobservers = 127.0.0.1:4730 + + ##Phoenix PostgreSQL connectivity - "ctsms" db: + ctsms_host = 127.0.0.1 + ctsms_port = 5432 + ctsms_databasename = ctsms + ctsms_username = postgres + ctsms_password = postgres + + ##ctsms REST-API connectivity: + ctsmsrestapi_uri = http://{{ ansible_default_ipv4.address }}:8080/rest + ctsmsrestapi_username = cron + ctsmsrestapi_password = {{ cron_password }} + ctsmsrestapi_realm = api + + ##sending email: + emailenable = 0 + erroremailrecipient = + warnemailrecipient = + completionemailrecipient = rkrenn@phoenixctms.org + doneemailrecipient = + + ##logging: + fileloglevel = OFF + screenloglevel = INFO + screenlogstderr = 0 + emailloglevel = OFF + mode: '0644' + loop: + - /ctsms/bulk_processor/CTSMS/BulkProcessor/config.cfg + - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render/config.cfg + - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/Criteria/config.cfg + - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/Duplicates/config.cfg + - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/config.cfg + - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/config.job.cfg + - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/config.cfg + - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/config.job.cfg + - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/config.cfg + - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/config.job.cfg + + - name: Run default criteria creation + ansible.builtin.command: + cmd: perl process.pl --task=create_criteria --force --skip-errors + chdir: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/Criteria + + - name: Print department passphrase + ansible.builtin.debug: + msg: "The department passphrase for 'my_department' when adding users with sudo -u ctsms /ctsms/dbtool.sh is {{ department_password }}." + + - name: Print login info + ansible.builtin.debug: + msg: "Log in at https://'{{ ansible_default_ipv4.address }}' with username 'phoenix' password {{ user_password }}." diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml new file mode 100644 index 0000000..6063f0f --- /dev/null +++ b/playbooks/install-bulk-processor.yml @@ -0,0 +1,1031 @@ +- name: Install bulk-processor + become: true + hosts: all + vars: + tag: "master" + base_url: "https://github.com/phoenixctms" + bulk_processor_url: "{{ base_url }}/bulk-processor/archive/{{ tag }}.tar.gz" + scripts_base_url: "{{ base_url }}/install-debian/{{ tag }}" + dest_dir: "/ctsms/bulk_processor" + output_dir: "{{ dest_dir }}/output" + user_group: "ctsms" + render_i18n_configs: + - path: config.cfg + username: my_department_signup_en + password: my_department_signup_en + - path: config_ar.cfg + username: my_department_signup_ar + password: my_department_signup_ar + - path: config_bt.cfg + username: my_department_signup_bt + password: my_department_signup_bt + - path: config_da.cfg + username: my_department_signup_da + password: my_department_signup_da + - path: config_de.cfg + username: my_department_signup_de + password: my_department_signup_de + - path: config_es.cfg + username: my_department_signup_es + password: my_department_signup_es + - path: config_ff.cfg + username: my_department_signup_ff + password: my_department_signup_ff + - path: config_fi.cfg + username: my_department_signup_fi + password: my_department_signup_fi + - path: config_fr.cfg + username: my_department_signup_fr + password: my_department_signup_fr + - path: config_hi.cfg + username: my_department_signup_hi + password: my_department_signup_hi + - path: config_hr.cfg + username: my_department_signup_hr + password: my_department_signup_hr + - path: config_hu.cfg + username: my_department_signup_hu + password: my_department_signup_hu + - path: config_ig.cfg + username: my_department_signup_ig + password: my_department_signup_ig + - path: config_it.cfg + username: my_department_signup_it + password: my_department_signup_it + - path: config_ja.cfg + username: my_department_signup_ja + password: my_department_signup_ja + - path: config_kg.cfg + username: my_department_signup_kg + password: my_department_signup_kg + - path: config_ko.cfg + username: my_department_signup_ko + password: my_department_signup_ko + - path: config_ln.cfg + username: my_department_signup_ln + password: my_department_signup_ln + - path: config_ro.cfg + username: my_department_signup_ro + password: my_department_signup_ro + - path: config_ru.cfg + username: my_department_signup_ru + password: my_department_signup_ru + - path: config_sk.cfg + username: my_department_signup_sk + password: my_department_signup_sk + - path: config_sl.cfg + username: my_department_signup_sl + password: my_department_signup_sl + - path: config_sv.cfg + username: my_department_signup_sv + password: my_department_signup_sv + - path: config_sw.cfg + username: my_department_signup_sw + password: my_department_signup_sw + - path: config_tr.cfg + username: my_department_signup_tr + password: my_department_signup_tr + - path: config_uk.cfg + username: my_department_signup_uk + password: my_department_signup_uk + - path: config_yo.cfg + username: my_department_signup_yo + password: my_department_signup_yo + - path: config_zh.cfg + username: my_department_signup_zh + password: my_department_signup_zh + render_i18n_settings: + - path: settings_ar + i18n_code: ar + - path: settings_bt + i18n_code: bt + - path: settings_da + i18n_code: da + - path: settings_de + i18n_code: de + - path: settings_es + i18n_code: es + - path: settings_ff + i18n_code: ff + - path: settings_fi + i18n_code: fi + - path: settings_fr + i18n_code: fr + - path: settings_hi + i18n_code: hi + - path: settings_hr + i18n_code: hr + - path: settings_hu + i18n_code: hu + - path: settings_ig + i18n_code: ig + - path: settings_it + i18n_code: it + - path: settings_ja + i18n_code: ja + - path: settings_kg + i18n_code: kg + - path: settings_ko + i18n_code: ko + - path: settings_ln + i18n_code: ln + - path: settings_ro + i18n_code: ro + - path: settings_ru + i18n_code: ru + - path: settings_sk + i18n_code: sk + - path: settings_sl + i18n_code: sl + - path: settings_sv + i18n_code: sv + - path: settings_sw + i18n_code: sw + - path: settings_tr + i18n_code: tr + - path: settings_uk + i18n_code: uk + - path: settings_yo + i18n_code: yo + - path: settings_zh + i18n_code: zh + + tasks: + - name: Install Perl libraries and utilities + ansible.builtin.apt: + name: + - libarchive-zip-perl + - libconfig-any-perl + - libdata-dump-perl + - libdata-dumper-concise-perl + - libdata-uuid-perl + - libdata-validate-ip-perl + - libdate-calc-perl + - libdate-manip-perl + - libdatetime-format-iso8601-perl + - libdatetime-format-strptime-perl + - libdatetime-perl + - libdatetime-timezone-perl + - libdbd-csv-perl + - libdbd-mysql-perl + - libdbd-sqlite3-perl + - tdsodbc + - libdbd-odbc-perl + - libdigest-md5-perl + - libemail-mime-attachment-stripper-perl + - libemail-mime-perl + - libgearman-client-perl + - libhtml-parser-perl + - libintl-perl + - libio-compress-perl + - libio-socket-ssl-perl + - libjson-xs-perl + - liblog-log4perl-perl + - libmail-imapclient-perl + - libmarpa-r2-perl + - libmime-base64-perl + - libmime-lite-perl + - libmime-tools-perl + - libnet-address-ip-local-perl + - libnet-smtp-ssl-perl + - libole-storage-lite-perl + - libphp-serialization-perl + - libexcel-writer-xlsx-perl + - libspreadsheet-parseexcel-perl + - libstring-mkpasswd-perl + - libtext-csv-xs-perl + - libtie-ixhash-perl + - libtime-warp-perl + - liburi-find-perl + - libuuid-perl + - libwww-perl + - libxml-dumper-perl + - libxml-libxml-perl + - libyaml-libyaml-perl + - libyaml-tiny-perl + - libtemplate-perl + - libdancer-perl + - libdbd-pg-perl + - libredis-perl + - libjson-perl + - libplack-perl + - libcache-memcached-perl + - libdancer-session-memcached-perl + - libgraphviz-perl + - gnuplot + - imagemagick + - ghostscript + - build-essential + - libtest-utf8-perl + - libmoosex-hasdefaults-perl + - cpanminus + state: present + update_cache: yes + force: yes + + - name: Comment out PS policy line in ImageMagick policy.xml + replace: + path: /etc/ImageMagick-6/policy.xml + regexp: '^\s*()(\s*)$' + replace: '' + backup: yes + + - name: Install libsys-cpuaffinity-perl (Debian) + ansible.builtin.apt: + name: + - libsys-cpuaffinity-perl + state: present + update_cache: yes + force: yes + when: ansible_os_family == "Debian" + + - name: Install sys from CPANM + community.general.cpanm: + name: Sys + mode: compatibility + when: ansible_os_family != "Debian" + + - name: Install threads from cpanm + community.general.cpanm: + name: threads + mode: compatibility + when: ansible_os_family != "Debian" + + - name: Install Dancer module from CPANM + community.general.cpanm: + name: Dancer + mode: compatibility + + - name: Install DateTime module from CPANM + community.general.cpanm: + name: DateTime::Format::Excel + mode: compatibility + + - name: Install Spreadsheet::Reader::Format module from CPANM + community.general.cpanm: + name: Spreadsheet::Reader::Format + mode: compatibility + + - name: Install Spreadsheet::Reader::ExcelXML module from CPANM + community.general.cpanm: + name: Spreadsheet::Reader::ExcelXML + mode: compatibility + + - name: Download bulk-processor archive + ansible.builtin.get_url: + url: "https://github.com/phoenixctms/bulk-processor/archive/{{ tag }}.tar.gz" + dest: /ctsms/bulk-processor.tar.gz + mode: '0644' + force: true + validate_certs: false + headers: + Content-Disposition: "attachment" + + - name: Create /ctsms/bulk_processor + ansible.builtin.file: + path: /ctsms/bulk_processor + state: directory + + - name: Extract bulk-processor archive + ansible.builtin.unarchive: + src: /ctsms/bulk-processor.tar.gz + dest: /ctsms/bulk_processor + remote_src: true + extra_opts: + - --strip-components=1 + + - name: Create /ctsms/bulk_processor/output directory + ansible.builtin.file: + path: /ctsms/bulk_processor/output + state: directory + mode: '0777' + recurse: true + owner: ctsms + group: ctsms + + - name: Ensure ownership of /ctsms/bulk_processor + ansible.builtin.shell: chown ctsms:ctsms /ctsms/bulk_processor -R + + - name: Set permissions 0755 on /ctsms/bulk_processor + ansible.builtin.shell: chmod 755 /ctsms/bulk_processor -R + + - name: Set permissions 0777 on /ctsms/bulk_processor/output + ansible.builtin.shell: chmod 777 /ctsms/bulk_processor/output -R + + - name: Remove archive file /ctsms/bulk-processor.tar.gz + ansible.builtin.file: + path: /ctsms/bulk-processor.tar.gz + state: absent + + - name: Template ecrfdataexport.sh to /ctsms/ + ansible.builtin.template: + src: ../templates/shell/ecrfdataexport.j2 + dest: /ctsms/ecrfdataexport.sh + owner: ctsms + group: ctsms + mode: '0755' + + - name: Template ecrfdataeimport.sh to /ctsms/ + ansible.builtin.template: + src: ../templates/shell/ecrfdataimport.j2 + dest: /ctsms/ecrfdataimport.sh + owner: ctsms + group: ctsms + mode: '0755' + + - name: Template inquirydataexport.sh to /ctsms/ + ansible.builtin.template: + src: ../templates/shell/inquirydataexport.j2 + dest: /ctsms/inquirydataexport.sh + owner: ctsms + group: ctsms + mode: '0755' + + - name: Write /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/Criteria/settings.yml + copy: + dest: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/Criteria/settings.yml + content: | + export_criteria_page_size: 10 + criteria_export_xlsx_filename: 'criteria_%s%s' + criteria_import_xlsx_filename: '/ctsms/master_data/criteria.xlsx' + + - name: Write /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/Duplicates/settings.yml + copy: + dest: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/Duplicates/settings.yml + content: | + sqlite_db_file: 'duplicates' + + proband_plain_text_ignore_duplicates: 0 + proband_plain_text_truncate_table: 1 + #proband_plain_text_row_block: 100 + import_proband_page_size: 10 + import_proband_multithreading: 1 + import_proband_numofthreads: 2 + + proband_duplicate_truncate_table: 1 + create_duplicate_multithreading: 1 + create_duplicate_numofthreads: 2 + + update_proband_multithreading: 1 + update_proband_numofthreads: 2 + duplicate_proband_category: 'duplicate' + duplicate_comment_prefix: 'identified duplicates of this subject: ' + + proband_categories_not_to_update: + - locked + # - migrated + # - test + - participant_to_be_deleted + # - unable_to_reach + # - new_animal + # - duplicate + - to_be_deleted + # - signup + # - new_person + + + - name: Write /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/settings.yml + copy: + dest: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/settings.yml + content: | + ctsms_base_uri: 'https://127.0.0.1' + + sqlite_db_file: 'ecrf_exporter' + csv_dir: 'ecrf_exporter' + + ecrf_data_truncate_table: 1 + ecrf_data_ignore_duplicates: 0 + #ecrf_data_trial_id: + #ecrf_data_api_listentries_page_size: 10 + #ecrf_data_api_ecrfs_page_size: 10 + #ecrf_data_api_values_page_size: 10 + ecrf_data_row_block: 50 + #ecrf_data_api_probandlistentrytagvalues_page_size: 10 + #ecrf_data_api_probandlistentrytags_page_size: 10 + #ecrf_data_api_ecrffields_page_size: 10 + + #ecrf_proband_alias_column_name + #ecrf_proband_category_column_name + ecrf_proband_department_column_name: department + #ecrf_proband_gender_column_name + ecrf_probandlistentry_group_column_name: subject_group + ecrf_probandlistentry_status_column_name: enrollment_status + + ecrf_data_export_upload_folder: '/4. CRF/eCRF Exports/' + ecrf_data_export_sqlite_filename: 'ecrf_%s%s' + ecrf_data_export_horizontal_csv_filename: 'ecrf_horizontal_%s%s' + ecrf_data_export_xls_filename: 'ecrf_%s%s' + ecrf_data_export_xlsx: 1 + #dbtool: 'D:\workspaces\ctsms\core\db\dbtool.bat' + dbtool: '/ctsms/dbtool.sh' + lockfile: '/ctsms/process.trial%s.ecrfexport.lock' + ecrf_data_export_pdf_filename: 'ecrf_ecrfs_%s%s' + ecrf_data_export_pdfs_filename: 'ecrf_ecrf_%s_%s%s' + + audit_trail_export_xls_filename: 'ecrf_issues_%s%s' + ecrf_journal_export_xls_filename: 'ecrf_changelog_%s%s' + ecrfs_export_xls_filename: 'ecrf_setup_%s%s' + + proband_list_filename: '%s_%s%s' + + ignore_external_ids: 0 + col_per_selection_set_value: 1 + selection_set_value_separator: ', ' + + #timezone: Europe/Vienna + + ecrfrevision_abbreviate_opts: + word_count_limit: 0 + + ecrfname_abbreviate_opts: + word_count_limit: 0 + + visit_abbreviate_opts: + word_count_limit: 0 + + section_abbreviate_opts: + word_count_limit: 0 + + inputfieldname_abbreviate_opts: + word_count_limit: 1 + word_blacklist: + demo: 1 + + selectionvalue_abbreviate_opts: + word_count_limit: 1 + # word_abbreviation_length: 5 + # word_limit: 7 + + - name: Write /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/settings.yml + copy: + dest: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/settings.yml + content: | + ctsms_base_uri: 'https://127.0.0.1' + + sqlite_db_file: 'ecrf_exporter' + csv_dir: 'ecrf_exporter' + + ecrf_data_truncate_table: 1 + ecrf_data_ignore_duplicates: 0 + #ecrf_data_trial_id: + #ecrf_data_api_listentries_page_size: 10 + #ecrf_data_api_ecrfs_page_size: 10 + #ecrf_data_api_values_page_size: 10 + ecrf_data_row_block: 50 + #ecrf_data_api_probandlistentrytagvalues_page_size: 10 + #ecrf_data_api_probandlistentrytags_page_size: 10 + #ecrf_data_api_ecrffields_page_size: 10 + + #ecrf_proband_alias_column_name + #ecrf_proband_category_column_name + ecrf_proband_department_column_name: department + #ecrf_proband_gender_column_name + ecrf_probandlistentry_group_column_name: subject_group + ecrf_probandlistentry_status_column_name: enrollment_status + + ecrf_data_export_upload_folder: '/4. CRF/eCRF Exports/' + ecrf_data_export_sqlite_filename: 'ecrf_%s%s' + ecrf_data_export_horizontal_csv_filename: 'ecrf_horizontal_%s%s' + ecrf_data_export_xls_filename: 'ecrf_%s%s' + ecrf_data_export_xlsx: 1 + #dbtool: 'D:\workspaces\ctsms\core\db\dbtool.bat' + dbtool: '/ctsms/dbtool.sh' + lockfile: '/ctsms/process.trial%s.ecrfexport.lock' + ecrf_data_export_pdf_filename: 'ecrf_ecrfs_%s%s' + ecrf_data_export_pdfs_filename: 'ecrf_ecrf_%s_%s%s' + + audit_trail_export_xls_filename: 'ecrf_issues_%s%s' + ecrf_journal_export_xls_filename: 'ecrf_changelog_%s%s' + ecrfs_export_xls_filename: 'ecrf_setup_%s%s' + + proband_list_filename: '%s_%s%s' + + ignore_external_ids: 0 + col_per_selection_set_value: 1 + selection_set_value_separator: ', ' + + #timezone: Europe/Vienna + + ecrfrevision_abbreviate_opts: + word_count_limit: 0 + + ecrfname_abbreviate_opts: + word_count_limit: 0 + + visit_abbreviate_opts: + word_count_limit: 0 + + section_abbreviate_opts: + word_count_limit: 0 + + inputfieldname_abbreviate_opts: + word_count_limit: 1 + word_blacklist: + demo: 1 + + selectionvalue_abbreviate_opts: + word_count_limit: 1 + # word_abbreviation_length: 5 + # word_limit: 7 + + - name: Write /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/settings.yml + copy: + dest: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/settings.yml + content: | + ctsms_base_uri: 'https://127.0.0.1' + + sqlite_db_file: 'ecrf_importer' + csv_dir: 'ecrf_importer' + + #clear_sections: 0 + #clear_all_sections: 0 + #append_selection_set_values: 0 + #update_listentrytag_values: 0 + + #ecrf_import_filename + #import_ecrf_data_horizontal_multithreading + #import_ecrf_data_horizontal_numofthreads + #import_ecrf_data_horizontal_blocksize + + #ecrf_data_trial_id: + #ecrf_data_api_listentries_page_size: 10 + #ecrf_data_api_ecrfs_page_size: 10 + #ecrf_data_api_values_page_size: 10 + #ecrf_values_col_block: 1 + #listentrytag_values_col_block: 0 + #ecrf_data_api_probandlistentrytagvalues_page_size: 10 + #ecrf_data_api_probandlistentrytags_page_size: 10 + #ecrf_data_api_ecrffields_page_size: 10 + + #ecrf_proband_alias_column_name + #ecrf_proband_category_column_name + ecrf_proband_department_column_name: department + #ecrf_proband_gender_column_name + ecrf_probandlistentry_group_column_name: subject_group + ecrf_probandlistentry_status_column_name: enrollment_status + + #dbtool: 'D:\workspaces\ctsms\core\db\dbtool.bat' + dbtool: '/ctsms/dbtool.sh' + lockfile: '/ctsms/process.trial%s.ecrfimport.lock' + + ignore_external_ids: 0 + col_per_selection_set_value: 1 + selection_set_value_separator: ', ' + + #timezone: Europe/Vienna + + ecrfrevision_abbreviate_opts: + word_count_limit: 0 + + ecrfname_abbreviate_opts: + word_count_limit: 0 + + visit_abbreviate_opts: + word_count_limit: 0 + + section_abbreviate_opts: + word_count_limit: 0 + + inputfieldname_abbreviate_opts: + word_count_limit: 1 + word_blacklist: + demo: 1 + + selectionvalue_abbreviate_opts: + word_count_limit: 1 + # word_abbreviation_length: 5 + # word_limit: 7 + + + - name: Write /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/settings.yml + copy: + dest: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/settings.yml + content: | + ctsms_base_uri: 'https://127.0.0.1' + + sqlite_db_file: 'inquiry_exporter' + csv_dir: 'inquiry_exporter' + + inquiry_data_truncate_table: 1 + inquiry_data_ignore_duplicates: 0 + #ecrf_data_trial_id: + #ecrf_data_api_listentries_page_size: 10 + #ecrf_data_api_ecrfs_page_size: 10 + #ecrf_data_api_values_page_size: 10 + inquiry_data_row_block: 50 + #ecrf_data_api_probandlistentrytagvalues_page_size: 10 + #ecrf_data_api_ecrffields_page_size: 10 + + #inquiry_proband_alias_column_name + + inquiry_data_export_upload_folder: '/11. ProbandenInnen/11.6. Rekrutierung/' + inquiry_data_export_sqlite_filename: 'inquiry_%s%s' + inquiry_data_export_horizontal_csv_filename: 'inquiry_horizontal_%s%s' + inquiry_data_export_xls_filename: 'inquiry_%s%s' + inquiry_data_export_xlsx: 1 + #dbtool: 'D:\workspaces\ctsms\core\db\dbtool.bat' + #dbtool: '/ctsms/dbtool.sh' + lockfile: '/ctsms/process.trial%s.inquiryexport.lock' + #ecrf_data_export_pdf_filename: 'ecrfs_%s%s' + inquiry_data_export_pdfs_filename: 'inquiry_%s_%s%s' + + ignore_external_ids: 0 + col_per_selection_set_value: 1 + selection_set_value_separator: ', ' + + #timezone: Europe/Vienna + + category_abbreviate_opts: + word_count_limit: 0 + + inputfieldname_abbreviate_opts: + word_count_limit: 1 + word_blacklist: + demo: 1 + + selectionvalue_abbreviate_opts: + word_count_limit: 1 + # word_abbreviation_length: 5 + # word_limit: 7 + + - name: Write /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/settings.yml + copy: + dest: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/settings.yml + content: | + # configuration file for production environment + + # cache route resolution for maximum performance + route_cache: 1 + + logger: "file" + + # the log level for this environment + # core is the lowest, it shows Dancer's core log messages as well as yours + # (debug, info, warning and error) + log: "warning" + + # Should Dancer consider warnings as critical errors? + warnings: 1 + + # Should Dancer show a stacktrace when an error is caught? + show_errors: 0 + error_template: runtime_error + + session: "memcached" + memcached_servers: "/var/run/memcached/memcached.sock" + + #session: YAML + session_secure: 0 + session_is_http_only: 0 + #session_domain: .medunigraz.at + session_expires: 600 + + - name: Write /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/settings.yml + copy: + dest: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/settings.yml + content: | + dancer_environment: 'production' + #production + dancer_confdir: + + ctsms_base_uri: 'https://127.0.0.1:8080' + + google_site_verification: + favicon: favicon.ico + + address_show_province: 1 + address_show_country: 1 + address_country: + address_province: + language_menu: 1 + proband_create_interval_limit: 200 + phone_number_prefix_preset: '+43' + email_notify_preset: 1 + proband_agreed_preset: 0 + default_language_code: 'en' + system_timezone: 'Europe/Vienna' + default_timezone: 'Europe/Vienna' + default_date_format: 'dd.MM.yyyy' + default_decimal_separator: '.' + + ctsms_sites: + '00_my_department': + label: 'My Department' + # uri: + default: 1 + # mass_mail: + # de: 6552634 + # en: 6552637 + trial_signup: 1 + register: 1 + default_geolocation_latitude: 47.081424 + default_geolocation_longitude: 15.468107 + show_map: 0 + description: 'My CRO
My Site
Evergreen Terrace 123, 12345 Springfield
Mo. – Fr. 08:00-16:00
Tel.: 01/123 45678
Mail: mysite@mycro.com' + department: 'my_department' + # trial_department: 'my_department' + trial_department: + # inquiry_trial: 238743 + phone_contact_detail_type: 'business_phone_number' + email_contact_detail_type: 'business_email_address' + address_type: 'business' + credentials: + de: + username: 'my_department_signup_de' + password: 'my_department_signup_de' + en: + username: 'my_department_signup_en' + password: 'my_department_signup_en' + es: + username: 'my_department_signup_es' + password: 'my_department_signup_es' + + - name: Write /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/config.cfg + copy: + dest: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/config.cfg + content: | + ##general settings: + #working_path = d:\perl\testoutput\signup + #working_path = /opt/perl/output/signup + working_path = /ctsms/bulk_processor/output/signup + cpucount = 4 + enablemultithreading = 1 + + ##gearman/service listener config: + jobservers = 127.0.0.1:4730 + + + ##Phoenix PostgreSQL connectivity - "ctsms" db: + ctsms_host = 127.0.0.1 + ctsms_port = 5432 + ctsms_databasename = ctsms + ctsms_username = ctsms + ctsms_password = ctsms + + ##ctsms REST-API connectivity: + ctsmsrestapi_uri = http://127.0.0.1:8080/rest + ctsmsrestapi_username = some_api_user + ctsmsrestapi_password = some_api_user_password + ctsmsrestapi_realm = api + + ##sending email: + emailenable = 0 + erroremailrecipient = + warnemailrecipient = + completionemailrecipient = rkrenn@phoenixctms.org + doneemailrecipient = + + ##logging: + fileloglevel = OFF + #DEBUG + screenloglevel = OFF + #DEBUG + screenlogstderr = 1 + emailloglevel = OFF + #OFF + + - name: Write Render config.cfg + copy: + dest: "/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render/{{ item.path }}" + content: | + ##general settings: + #working_path = d:\perl\testoutput\render + working_path = /ctsms/bulk_processor/output/render + #working_path = /opt/perl/output/render + cpucount = 4 + enablemultithreading = 1 + + ##gearman/service listener config: + jobservers = 127.0.0.1:4730 + + ##Phoenix PostgreSQL connectivity - "ctsms" db: + ctsms_host = 127.0.0.1 + ctsms_port = 5432 + ctsms_databasename = ctsms + ctsms_username = ctsms + ctsms_password = ctsms + + ##ctsms REST-API connectivity: + ctsmsrestapi_uri = http://127.0.0.1:8080/rest + ctsmsrestapi_username = {{ item.username }} + ctsmsrestapi_password = {{ item.password }} + ctsmsrestapi_realm = api + + ##sending email: + emailenable = 0 + erroremailrecipient = + warnemailrecipient = + completionemailrecipient = rkrenn@phoenixctms.org + doneemailrecipient = + + ##logging: + fileloglevel = DEBUG + screenloglevel = DEBUG + screenlogstderr = 0 + emailloglevel = OFF + loop: "{{ render_i18n_configs }}" + + - name: Write i18n Render settings.cfg + copy: + dest: "/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render/{{ item.path }}.cfg" + content: | + #magick = magick + magick = convert + + ecrfstatustype_wordwrapcolumns = 12 + ecrfstatustype_fontsize = 8 + ecrfstatustype_noderadius = 0.8 + ecrfstatustype_fontname = Helvetica + ecrfstatustype_usenodecolor = 1 + ecrfstatustype_width = 8 + ecrfstatustype_height = 4 + ecrfstatustype_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/ecrf_states_{{ item.i18n_code }}.png + + ecrffieldstatustype_wordwrapcolumns = 12 + ecrffieldstatustype_fontsize = 8 + ecrffieldstatustype_noderadius = 0.8 + ecrffieldstatustype_fontname = Helvetica + ecrffieldstatustype_usenodecolor = 1 + ecrffieldstatustype_width = 5 + ecrffieldstatustype_height = 5 + ecrffieldstatustype_annotation_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/ecrffield_annotation_states_{{ item.i18n_code }}.png + ecrffieldstatustype_validation_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/ecrffield_validation_states_{{ item.i18n_code }}.png + ecrffieldstatustype_query_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/ecrffield_query_states_{{ item.i18n_code }}.png + + courseparticipationstatustype_wordwrapcolumns = 12 + courseparticipationstatustype_fontsize = 8 + courseparticipationstatustype_noderadius = 0.8 + courseparticipationstatustype_fontname = Helvetica + courseparticipationstatustype_usenodecolor = 1 + courseparticipationstatustype_width = 15 + courseparticipationstatustype_height = 5 + + courseparticipationstatustype_participant_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/course_participation_states_participant_{{ item.i18n_code }}.png + courseparticipationstatustype_admin_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/course_participation_states_admin_{{ item.i18n_code }}.png + courseparticipationstatustype_self_registration_participant_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/course_participation_states_self_registration_participant_{{ item.i18n_code }}.png + courseparticipationstatustype_self_registration_admin_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/course_participation_states_self_registration_admin_{{ item.i18n_code }}.png + + + privacyconsentstatustype_wordwrapcolumns = 10 + privacyconsentstatustype_fontsize = 8 + privacyconsentstatustype_noderadius = 0.8 + privacyconsentstatustype_fontname = Helvetica + privacyconsentstatustype_usenodecolor = 1 + privacyconsentstatustype_width = 6 + privacyconsentstatustype_height = 3 + privacyconsentstatustype_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/privacy_consent_states_{{ item.i18n_code }}.png + + + trialstatustype_wordwrapcolumns = 10 + trialstatustype_fontsize = 8 + trialstatustype_noderadius = 0.8 + trialstatustype_fontname = Helvetica + trialstatustype_usenodecolor = 1 + trialstatustype_width = 8 + trialstatustype_height = 5 + trialstatustype_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/trial_states_{{ item.i18n_code }}.png + + probandliststatustype_wordwrapcolumns = 10 + probandliststatustype_fontsize = 8 + probandliststatustype_noderadius = 0.8 + probandliststatustype_fontname = Helvetica + probandliststatustype_usenodecolor = 1 + #probandliststatustype_width = 10 + #probandliststatustype_height = 5 + probandliststatustype_width = 8 + probandliststatustype_height = 4 + #probandliststatustype_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/enrollment_states_{{ item.i18n_code }}.png + probandliststatustype_person_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/enrollment_states_person_{{ item.i18n_code }}.png + probandliststatustype_animal_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/enrollment_states_animal_{{ item.i18n_code }}.png + + massmailstatustype_wordwrapcolumns = 10 + massmailstatustype_fontsize = 8 + massmailstatustype_noderadius = 0.8 + massmailstatustype_fontname = Helvetica + massmailstatustype_usenodecolor = 1 + massmailstatustype_width = 8 + massmailstatustype_height = 5 + massmailstatustype_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/mass_mail_states_{{ item.i18n_code }}.png + + #journal_heatmap_filename = /ctsms/documents/job_output/journal_heatmap.png + journal_heatmap_span_days = 90 + journal_heatmap_start_date = + journal_heatmap_end_date = + journal_heatmap_dimension = 1024x600 + + #logon_heatmap_filename = /ctsms/documents/job_output/logon_heatmap.png + logon_heatmap_span_days = 90 + logon_heatmap_start_date = + logon_heatmap_end_date = + logon_heatmap_dimension = 1024x600 + + #journal_histogram_filename = /ctsms/documents/job_output/journal_histogram.png + journal_histogram_dimension = 1024x600 + journal_histogram_interval = week + #journal_histogram_year = + journal_histogram_month = + loop: "{{ render_i18n_settings }}" + + - name: Write default Render settings.yml + copy: + dest: "/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render/settings.cfg" + content: | + #magick = magick + magick = convert + + ecrfstatustype_wordwrapcolumns = 12 + ecrfstatustype_fontsize = 8 + ecrfstatustype_noderadius = 0.8 + ecrfstatustype_fontname = Helvetica + ecrfstatustype_usenodecolor = 1 + ecrfstatustype_width = 8 + ecrfstatustype_height = 4 + ecrfstatustype_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/ecrf_states.png + + ecrffieldstatustype_wordwrapcolumns = 12 + ecrffieldstatustype_fontsize = 8 + ecrffieldstatustype_noderadius = 0.8 + ecrffieldstatustype_fontname = Helvetica + ecrffieldstatustype_usenodecolor = 1 + ecrffieldstatustype_width = 5 + ecrffieldstatustype_height = 5 + ecrffieldstatustype_annotation_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/ecrffield_annotation_states.png + ecrffieldstatustype_validation_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/ecrffield_validation_states.png + ecrffieldstatustype_query_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/ecrffield_query_states.png + + + courseparticipationstatustype_wordwrapcolumns = 12 + courseparticipationstatustype_fontsize = 8 + courseparticipationstatustype_noderadius = 0.8 + courseparticipationstatustype_fontname = Helvetica + courseparticipationstatustype_usenodecolor = 1 + courseparticipationstatustype_width = 15 + courseparticipationstatustype_height = 5 + + courseparticipationstatustype_participant_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/course_participation_states_participant.png + courseparticipationstatustype_admin_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/course_participation_states_admin.png + courseparticipationstatustype_self_registration_participant_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/course_participation_states_self_registration_participant.png + courseparticipationstatustype_self_registration_admin_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/course_participation_states_self_registration_admin.png + + + privacyconsentstatustype_wordwrapcolumns = 10 + privacyconsentstatustype_fontsize = 8 + privacyconsentstatustype_noderadius = 0.8 + privacyconsentstatustype_fontname = Helvetica + privacyconsentstatustype_usenodecolor = 1 + privacyconsentstatustype_width = 6 + privacyconsentstatustype_height = 3 + privacyconsentstatustype_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/privacy_consent_states.png + + + trialstatustype_wordwrapcolumns = 10 + trialstatustype_fontsize = 8 + trialstatustype_noderadius = 0.8 + trialstatustype_fontname = Helvetica + trialstatustype_usenodecolor = 1 + trialstatustype_width = 8 + trialstatustype_height = 5 + trialstatustype_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/trial_states.png + + probandliststatustype_wordwrapcolumns = 10 + probandliststatustype_fontsize = 8 + probandliststatustype_noderadius = 0.8 + probandliststatustype_fontname = Helvetica + probandliststatustype_usenodecolor = 1 + #probandliststatustype_width = 10 + #probandliststatustype_height = 5 + probandliststatustype_width = 8 + probandliststatustype_height = 4 + probandliststatustype_person_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/enrollment_states_person.png + probandliststatustype_animal_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/enrollment_states_animal.png + + massmailstatustype_wordwrapcolumns = 10 + massmailstatustype_fontsize = 8 + massmailstatustype_noderadius = 0.8 + massmailstatustype_fontname = Helvetica + massmailstatustype_usenodecolor = 1 + massmailstatustype_width = 8 + massmailstatustype_height = 5 + massmailstatustype_filename = /ctsms/build/ctsms/web/src/main/webapp/resources/images/tooltips/mass_mail_states.png + + #journal_heatmap_filename = /ctsms/documents/job_output/journal_heatmap.png + journal_heatmap_span_days = 90 + journal_heatmap_start_date = + journal_heatmap_end_date = + journal_heatmap_dimension = 1024x600 + + #logon_heatmap_filename = /ctsms/documents/job_output/logon_heatmap.png + logon_heatmap_span_days = 90 + logon_heatmap_start_date = + logon_heatmap_end_date = + logon_heatmap_dimension = 1024x600 + + #journal_histogram_filename = /ctsms/documents/job_output/journal_histogram.png + journal_histogram_dimension = 1024x600 + journal_histogram_interval = week + #journal_histogram_year = + journal_histogram_month = + + # - name: Run minify.pl on Signup folder + # ansible.builtin.command: > + # --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup diff --git a/playbooks/install-cron.yml b/playbooks/install-cron.yml new file mode 100644 index 0000000..e688f2b --- /dev/null +++ b/playbooks/install-cron.yml @@ -0,0 +1,27 @@ +- name: Install cron + become: true + hosts: all + tasks: + - name: Setup /etc/cron.d/ctsms + ansible.builtin.template: + src: ../templates/crontab/ctsms.j2 + dest: /etc/cron.d/ctsms + owner: root + group: root + mode: "0644" + notify: Restart cron + + - name: Setup /etc/cron.d/my_department + ansible.builtin.template: + src: ../templates/crontab/my_department.j2 + dest: /etc/cron.d/my_department + owner: root + group: root + mode: "0644" + notify: Restart cron + + handlers: + - name: Restart cron + ansible.builtin.service: + name: cron + state: restarted diff --git a/playbooks/install-memcached.yml b/playbooks/install-memcached.yml new file mode 100644 index 0000000..1010a68 --- /dev/null +++ b/playbooks/install-memcached.yml @@ -0,0 +1,36 @@ +- name: Install memcached + become: true + hosts: all + tasks: + - name: Install memcached + ansible.builtin.apt: + name: memcached + state: present + update_cache: true + notify: Restart memcached + + - name: Ensure /var/run/memcached has correct permissions + ansible.builtin.file: + path: /var/run/memcached + mode: '0777' + notify: Restart memcached + + - name: Comment out TCP port line in memcached.conf + ansible.builtin.replace: + path: /etc/memcached.conf + regexp: '^-p 11211' + replace: '#-p 11211' + notify: Restart memcached + + - name: Replace bind IP line with Unix socket config + ansible.builtin.replace: + path: /etc/memcached.conf + regexp: '^-l 127\.0\.0\.1' + replace: '-s /var/run/memcached/memcached.sock -a 0666' + notify: Restart memcached + + handlers: + - name: Restart memcached + ansible.builtin.service: + name: memcached + state: restarted diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml new file mode 100644 index 0000000..7f27b07 --- /dev/null +++ b/playbooks/install-postgres.yml @@ -0,0 +1,71 @@ +- name: Install Postgres 13 + become: true + hosts: all + vars: + db_user: ctsms + db_password: ctsms + dbtool_sql_path: /ctsms/build/ctsms/core/db/dbtool.sql + schema_create_sql_path: /ctsms/build/ctsms/core/db/schema-create.sql + index_create_sql_path: /ctsms/build/ctsms/core/db/index-create.sql + schema_set_version_sql_path: /ctsms/build/ctsms/core/db/schema-set-version.sql + tasks: + - name: install postgresql + ansible.builtin.apt: + name: postgresql + state: present + notify: Restart PostgreSQL + + - name: install postgresql-plperl + ansible.builtin.apt: + name: postgresql-plperl + state: present + notify: Restart PostgreSQL + + - name: install python3-psycopg2 # Required for Ansible postgres operations + ansible.builtin.apt: + name: python3-psycopg2 + state: present + notify: Restart PostgreSQL + + - name: install postgresql + ansible.builtin.apt: + name: postgresql + state: present + notify: Restart PostgreSQL + + - name: Create PostgreSQL user ctsms + shell: sudo -u postgres psql postgres -c "CREATE USER ctsms WITH PASSWORD 'ctsms';" + + - name: Create database ctsms + shell: sudo -u postgres psql postgres -c "CREATE DATABASE ctsms;" + + - name: Grant privileges on ctsms database to ctsms user + shell: sudo -u postgres psql postgres -c "GRANT ALL PRIVILEGES ON DATABASE ctsms TO ctsms;" + + - name: Change owner of ctsms database to ctsms user + shell: sudo -u postgres psql postgres -c "ALTER DATABASE ctsms OWNER TO ctsms;" + + - name: Run dbtool.sql as postgres + shell: sudo -u postgres psql ctsms < /ctsms/build/ctsms/core/db/dbtool.sql + + - name: Run schema-create.sql as ctsms + shell: sudo -u ctsms psql -U ctsms ctsms < /ctsms/build/ctsms/core/db/schema-create.sql + + - name: Run index-create.sql as ctsms + shell: sudo -u ctsms psql -U ctsms ctsms < /ctsms/build/ctsms/core/db/index-create.sql + + - name: Run schema-set-version.sql as ctsms + shell: sudo -u ctsms psql -U ctsms ctsms < /ctsms/build/ctsms/core/db/schema-set-version.sql + + - name: Set join_collapse_limit to 1 in postgresql.conf + ansible.builtin.replace: + path: /etc/postgresql/15/main/postgresql.conf + regexp: '^#?join_collapse_limit\s*=.*' + replace: 'join_collapse_limit = 1' + notify: Restart PostgreSQL + + handlers: + - name: Restart PostgreSQL + ansible.builtin.service: + name: postgresql + state: restarted diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml new file mode 100644 index 0000000..cc3336f --- /dev/null +++ b/playbooks/prepare-ctsms-directory.yml @@ -0,0 +1,128 @@ +- name: Prepare CTMS directory + gather_facts: true + hosts: all + become: true + vars: + tag: "1.8.1" # Replace with your actual tag or pass in as extra var + xms: "2048m" + xmx: "4096m" + xss: "512k" + perm: "256m" + config_directory: "/ctsms/config/" + properties_directory: "/ctsms/properties" + tasks: + - name: Create /ctsms + ansible.builtin.file: + path: /ctsms/ + state: directory + mode: '0755' + + - name: Remove /ctsms/bulk_processor + ansible.builtin.file: + path: /ctsms/bulk_processor/ + state: absent + + - name: Template clearcache to /ctsms/clearcache.sh + ansible.builtin.template: + src: ../templates/shell/clearcache.sh.j2 + dest: /ctsms/clearcache.sh + owner: ctsms + group: ctsms + mode: '0755' + + - name: Clone config-default repository to "{{ config_directory }}" + ansible.builtin.git: + repo: 'https://github.com/phoenixctms/config-default.git' + dest: "{{ config_directory }}" + + - name: Ensure properties directory exists with sticky bit + ansible.builtin.file: + path: "{{ properties_directory }}" + state: directory + mode: '0755' + + - name: Template ctsms-applicationcontext.properties to "'{{ properties_directory }}'/ctsms-applicationcontext.properties + ansible.builtin.template: + src: ../templates/properties/ctsms-applicationcontext.properties.j2 + dest: "{{ properties_directory }}/ctsms-applicationcontext.properties" + + - name: Template ctsms-cv-pdf-settings.properties to "'{{ properties_directory }}'/ctsms-cv-pdf-settings.properties + ansible.builtin.template: + src: ../templates/properties/ctsms-cv-pdf-settings.properties.j2 + dest: "{{ properties_directory }}/ctsms-cv-pdf-settings.properties" + + - name: Template ctsms-dbtool.properties to "'{{ properties_directory }}'/ctsms-dbtool.properties + ansible.builtin.template: + src: ../templates/properties/ctsms-dbtool.properties.j2 + dest: "{{ properties_directory }}/ctsms-dbtool.properties" + + - name: Template ctsms-departments.properties to "{{ config_directory }}"/ctsms-departments.properties + ansible.builtin.template: + src: ../templates/properties/ctsms-departments.properties.j2 + dest: "{{ properties_directory }}/ctsms-departments.properties" + + - name: Template ctsms-departments_de.properties to "{{ config_directory }}"/ctsms-departments_de.properties + ansible.builtin.template: + src: ../templates/properties/ctsms-departments_de.properties.j2 + dest: "{{ properties_directory }}/ctsms-departments_de.properties" + + - name: Template ctsms-visitschedule-excel-settings.properties to "{{ config_directory }}"/ctsms-visitschedule-excel-settings.properties + ansible.builtin.template: + src: ../templates/properties/ctsms-visitschedule-excel-settings.properties.j2 + dest: "{{ properties_directory }}/ctsms-visitschedule-excel-settings.properties" + + - name: Wrote /ctsms/crowdin.yml + ansible.builtin.template: + src: ../templates/ctsms/crowdin.yml.j2 + dest: /ctsms/crowdin.yml + mode: '0755' + + - name: Write dbtool.sh + ansible.builtin.copy: + dest: /ctsms/dbtool.sh + owner: ctsms + group: ctsms + mode: '0755' + content: | + #!/bin/bash + CTSMS_PROPERTIES=${CTSMS_PROPERTIES:-/ctsms/properties} + CTSMS_JAVA=${CTSMS_JAVA:-/ctsms/java} + CATALINA_BASE=${CATALINA_BASE:-/opt/tomcat9} + java -DCTSMS_PROPERTIES="$CTSMS_PROPERTIES" -DCTSMS_JAVA="$CTSMS_JAVA" -Dfile.encoding=Cp1252 -Djava.awt.headless=true --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED -Xms{{ xms }} -Xmx{{ xmx }} -Xss{{ xss }} -XX:+UseParallelGC -XX:MaxGCPauseMillis=1500 -XX:GCTimeRatio=9 -XX:ReservedCodeCacheSize={{ perm }} -classpath $CATALINA_BASE/webapps/ROOT/WEB-INF/lib/ctsms-core-1.8.1.jar:$CATALINA_BASE/webapps/ROOT/WEB-INF/lib/* org.phoenixctms.ctsms.executable.DBTool $* + + - name: Clone master-data repository to /ctsms/master_data + ansible.builtin.git: + repo: 'https://github.com/phoenixctms/master-data.git' + dest: /ctsms/master_data + + - name: Move /ctsms/config/java to /ctsms/java + ansible.builtin.shell: mv /ctsms/config/java /ctsms/java + + - name: Move /ctsms/config/pdf_templates to /ctsms/pdf_templates + ansible.builtin.shell: mv /ctsms/config/pdf_templates /ctsms/pdf_templates + + - name: Move /ctsms/config/excel_templates to /ctsms/excel_templates + ansible.builtin.shell: mv /ctsms/config/excel_templates /ctsms/excel_templates + + - name: Recursively change ownership of /ctsms/ + ansible.builtin.shell: chown ctsms:ctsms /ctsms -R + + - name: Recursively change ownership of /ctsms/ + ansible.builtin.shell: chmod 775 /ctsms + + - name: Recursively change ownership of /ctsms/external_files + ansible.builtin.file: + path: /ctsms/external_files + state: directory + recurse: yes + owner: ctsms + group: ctsms + mode: '0755' + + - name: Template update to /ctsms/update + ansible.builtin.template: + src: ../templates/update.j2 + dest: /ctsms/update.sh + owner: ctsms + group: ctsms + mode: '0755' diff --git a/playbooks/render-workflow-diagrams.yml b/playbooks/render-workflow-diagrams.yml new file mode 100644 index 0000000..6145e52 --- /dev/null +++ b/playbooks/render-workflow-diagrams.yml @@ -0,0 +1,49 @@ +- name: Final configuration + gather_facts: true + hosts: all + become: true + vars: + version: 1.8.1 + tasks: + - name: Run render.sh + ansible.builtin.shell: ./render.sh + args: + chdir: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render + + - name: Rebuild .war + ansible.builtin.command: + cmd: mvn -f web/pom.xml -Dmaven.test.skip=true + chdir: /ctsms/build/ctsms + + - name: Set permissions on WAR file + ansible.builtin.file: + path: "/ctsms/build/ctsms/web/target/ctsms-{{ version }}.war" + mode: '0755' + + - name: Stop Tomcat service + ansible.builtin.service: + name: tomcat + state: stopped + + - name: Remove exploded ROOT webapp + ansible.builtin.file: + path: /opt/tomcat9/webapps/ROOT + state: absent + + - name: Copy WAR file to Tomcat ROOT.war + ansible.builtin.copy: + src: "/ctsms/build/ctsms/web/target/ctsms-{{ version }}.war" + dest: /opt/tomcat9/webapps/ROOT.war + mode: '2755' + owner: ctsms + group: ctsms + remote_src: true + + - name: Start Tomcat service + ansible.builtin.service: + name: tomcat + state: started + + - name: Print 'Installation complete.' + ansible.builtin.debug: + msg: "Installation complete." diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml new file mode 100644 index 0000000..e844577 --- /dev/null +++ b/playbooks/setup-apache2.yml @@ -0,0 +1,105 @@ +- name: Install Apache2 + become: true + hosts: all + tasks: + - name: Install Apache and required modules + ansible.builtin.apt: + name: + - apache2 + - libapache2-mod-jk + - libapache2-mod-fcgid + state: present + update_cache: true + notify: Reload Apache + + - name: Run usermod + ansible.builtin.command: usermod --append --groups tomcat,ctsms www-data + + - name: Template 00_ctsms_http.conf to /etc/apache2/sites-available/ + ansible.builtin.template: + src: ../templates/apache/00_ctsms_http.conf.j2 + dest: /etc/apache2/sites-available/00_ctsms_http.conf + notify: Reload Apache + + - name: Template 00_ctsms_https.conf to /etc/apache2/sites-available/ + ansible.builtin.template: + src: ../templates/apache/00_ctsms_https.conf.j2 + dest: /etc/apache2/sites-available/00_ctsms_https.conf + notify: Reload Apache + + - name: Template blocklist.conf to /etc/apache2/ + ansible.builtin.template: + src: ../templates/apache/blocklist.conf.j2 + dest: /etc/apache2/blocklist.conf + notify: Reload Apache + + - name: Template jk.conf to /etc/apache2/mods-available/ + ansible.builtin.template: + src: ../templates/apache/jk.conf.j2 + dest: /etc/apache2/mods-available/ + notify: Reload Apache + + - name: Disable default Apache site + ansible.builtin.command: a2dissite 000-default.conf + notify: Reload Apache + + - name: Enable 00_ctsms_http.conf site + ansible.builtin.command: a2ensite 00_ctsms_http.conf + notify: Reload Apache + + - name: Enable Apache SSL module + ansible.builtin.command: a2enmod ssl + notify: Reload Apache + + - name: Enable Apache rewrite module + ansible.builtin.command: a2enmod rewrite + notify: Reload Apache + + - name: Create SSL directory + ansible.builtin.file: + path: /etc/apache2/ssl + state: directory + owner: root + group: root + + - name: Generate private key + community.crypto.openssl_privatekey: + path: /etc/apache2/ssl/apache.key + + - name: Get FQDN of the system + ansible.builtin.command: hostname -f + register: fqdn_result + changed_when: false + + - name: Set fact for FQDN + ansible.builtin.set_fact: + system_fqdn: "{{ fqdn_result.stdout }}" + + + + - name: Generate CSR with proper hostname + community.crypto.openssl_csr: + path: /etc/apache2/ssl/apache.csr + privatekey_path: /etc/apache2/ssl/apache.key + country_name: US + organization_name: Organization Name + email_address: email@example.org + common_name: '{{ system_fqdn }}' + subject_alt_name: 'DNS:{{ system_fqdn }}' + + - name: Create self-signed certificate with SAN + community.crypto.x509_certificate: + path: /etc/apache2/ssl/apache.crt + csr_path: /etc/apache2/ssl/apache.csr + privatekey_path: /etc/apache2/ssl/apache.key + provider: selfsigned + + - name: Enable 00_ctsms_https.conf site + ansible.builtin.command: a2ensite 00_ctsms_https.conf + notify: Reload Apache + + handlers: + - name: Reload Apache + ansible.builtin.service: + name: apache2 + state: restarted diff --git a/playbooks/setup-logrotate.yml b/playbooks/setup-logrotate.yml new file mode 100644 index 0000000..eb2f0df --- /dev/null +++ b/playbooks/setup-logrotate.yml @@ -0,0 +1,11 @@ +- name: Setup logrotate + become: true + hosts: all + tasks: + - name: Setup logrotate + ansible.builtin.template: + src: ../templates/logrotate/ctsms.j2 + dest: /etc/logrotate.d/ctsms + owner: root + group: root + mode: "0644" diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml new file mode 100644 index 0000000..4699c8e --- /dev/null +++ b/playbooks/tomcat9.yml @@ -0,0 +1,253 @@ +- name: Install Tomcat 9 + gather_facts: true + become: true + hosts: all + vars: + XMS: "2048m" + XMX: "4096m" + XSS: "512k" + PERM: "256m" + tomcat_version: 9.0.105 + tasks: + ## Note: Debian Bookworm no longer includes tomcat9 and the backup repos are a + ## PITA to get working, so I used this article as a basis for the following code: + ## https://kifarunix.com/how-to-install-tomcat-9-on-debian-12/ + ## If you get a 404 error, update the tomcat_version variable + - name: install default OpenJDK + ansible.builtin.apt: + name: default-jdk + state: present + notify: Start tomcat9 + + - name: install libservlet3.1-java + ansible.builtin.apt: + name: libservlet3.1-java + state: present + notify: Start tomcat9 + + - name: Create tomcat group + group: + name: tomcat + state: present + notify: Start tomcat9 + + - name: Create tomcat user + user: + name: tomcat + group: tomcat + home: /opt/tomcat9 + shell: /bin/false + system: yes + create_home: no + notify: Start tomcat9 + + - name: Run usermod + command: usermod --append --groups ctsms tomcat + notify: Start tomcat9 + + - name: Run usermod + command: usermod --append --groups tomcat,adm ctsms + notify: Start tomcat9 + + - name: Create Tomcat installation directory + file: + path: /opt/tomcat9 + state: directory + owner: tomcat + group: tomcat + mode: '0755' + notify: Start tomcat9 + + - name: Download Tomcat 9 archive + get_url: + url: "https://dlcdn.apache.org/tomcat/tomcat-9/v{{ tomcat_version }}/bin/apache-tomcat-{{ tomcat_version }}.tar.gz" + dest: "/tmp/apache-tomcat-{{ tomcat_version }}.tar.gz" + mode: '0644' + notify: Start tomcat9 + + - name: Extract Tomcat archive + unarchive: + src: "/tmp/apache-tomcat-{{ tomcat_version }}.tar.gz" + dest: /opt/tomcat9 + remote_src: yes + extra_opts: [--strip-components=1] + notify: Start tomcat9 + + - name: Change ownership of Tomcat directories + file: + path: "/opt/tomcat9/{{ item }}" + owner: tomcat + group: tomcat + recurse: yes + loop: + - logs + - temp + - webapps + - work + notify: Start tomcat9 + + - name: Set group ownership for the rest of Tomcat files + file: + path: /opt/tomcat9 + group: tomcat + recurse: yes + notify: Start tomcat9 + + - name: Assign read permissions to conf directory + file: + path: /opt/tomcat9/conf + mode: '0750' + recurse: yes + notify: Start tomcat9 + + - name: Set CATALINA_HOME environment variable + copy: + dest: /etc/profile.d/tomcat.sh + content: | + export CATALINA_HOME="/opt/tomcat9" + export JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64" + mode: '0755' + notify: Start tomcat9 + + - name: Create systemd service file for Tomcat + copy: + dest: /etc/systemd/system/tomcat.service + content: | + [Unit] + Description=Apache Tomcat Web Application Container + After=network.target + + [Service] + Type=forking + + Environment=JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 + Environment=CATALINA_PID=/opt/tomcat9/temp/tomcat.pid + Environment=CATALINA_HOME=/opt/tomcat9 + Environment=CATALINA_BASE=/opt/tomcat9 + Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC' + Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom' + + ExecStart=/opt/tomcat9/bin/startup.sh + ExecStop=/opt/tomcat9/bin/shutdown.sh + + User=tomcat + Group=tomcat + UMask=0007 + RestartSec=10 + Restart=always + + [Install] + WantedBy=multi-user.target + mode: '0644' + notify: Start tomcat9 + + - name: Reload systemd daemon + systemd: + daemon_reload: yes + notify: Start tomcat9 + + - name: Enable and start Tomcat service + systemd: + name: tomcat + enabled: yes + state: started + notify: Start tomcat9 + + - name: Stop service tomcat9, if started + ansible.builtin.service: + name: tomcat + state: stopped + notify: Start tomcat9 + + - name: allow tomcat writing to /ctsms/external_files + user: + name: tomcat + groups: ctsms + append: yes + notify: Start tomcat9 + + - name: allow ctsms user to load jars from exploded .war + user: + name: ctsms + groups: tomcat,adm + append: yes + notify: Start tomcat9 + + - name: Template workers.properties to /opt/tomcat9/workers.properties + ansible.builtin.template: + src: ../templates/tomcat/workers.properties.j2 + dest: /opt/tomcat9/workers.properties + owner: root + group: tomcat + mode: '0640' + notify: Start tomcat9 + + - name: Template server.xml to /opt/tomcat9/server.xml + ansible.builtin.template: + src: ../templates/tomcat/server.xml.j2 + dest: /opt/tomcat9/server.xml + owner: root + group: tomcat + mode: '0640' + notify: Start tomcat9 + + - name: Ensure /var/log/tomcat9/ directory exists + file: + path: /var/log/tomcat9/ + state: directory + mode: '0770' + notify: Start tomcat9 + + - name: Add group write permission to files in /var/log/tomcat9 + ansible.builtin.shell: chmod g+w /var/log/tomcat9/ + + - name: Set permissions on webapps directory + ansible.builtin.file: + path: /opt/tomcat9/webapps + mode: '0775' + notify: Start tomcat9 + + - name: Set JAVA_OPTS in /etc/default/tomcat9 + lineinfile: + path: /etc/default/tomcat9 + regexp: '^JAVA_OPTS=' + line: 'JAVA_OPTS="-server -Djava.awt.headless=true -Xms{{ XMS }} -Xmx{{ XMX }} -Xss{{ XSS }} -XX:+UseParallelGC -XX:MaxGCPauseMillis=1500 -XX:GCTimeRatio=9 -XX:+CMSClassUnloadingEnabled -XX:ReservedCodeCacheSize={{ PERM }}"' + create: yes + backup: yes + notify: Start tomcat9 + + - name: Add CTSMS_PROPERTIES to /etc/default/tomcat9 + lineinfile: + path: /etc/default/tomcat9 + line: 'CTSMS_PROPERTIES=/ctsms/properties' + insertafter: EOF + notify: Start tomcat9 + + - name: Add CTSMS_JAVA to /etc/default/tomcat9 + lineinfile: + path: /etc/default/tomcat9 + line: 'CTSMS_JAVA=/ctsms/java' + insertafter: EOF + notify: Start tomcat9 + + - name: Ensure tomcat9.service.d directory exists + file: + path: /etc/systemd/system/tomcat9.service.d + state: directory + mode: '0755' + notify: Start tomcat9 + + - name: Template ctsms.conf to /etc/tomcat9/server.xml + ansible.builtin.template: + src: ../templates/tomcat/ctsms.conf.j2 + dest: /etc/systemd/system/tomcat9.service.d/ctsms.conf + owner: root + group: tomcat + mode: '0644' + notify: Start tomcat9 + + handlers: + - name: Start tomcat9 + ansible.builtin.service: + name: tomcat + state: started diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 0000000..6ba1afd --- /dev/null +++ b/requirements.yml @@ -0,0 +1,3 @@ +- src: idealista.java_role + version: 7.0.0 + name: java diff --git a/templates/apache/00_ctsms_http.conf.j2 b/templates/apache/00_ctsms_http.conf.j2 new file mode 100644 index 0000000..0bb9241 --- /dev/null +++ b/templates/apache/00_ctsms_http.conf.j2 @@ -0,0 +1,14 @@ +{% raw -%} + + + #ServerName {%- endraw %}{{ ansible_hostname }}{% raw -%}:80 + + RewriteEngine On + RewriteCond %{HTTPS} off + RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} + + HostnameLookups Off + UseCanonicalName Off + ServerSignature On + +{%- endraw %} diff --git a/templates/apache/00_ctsms_https.conf.j2 b/templates/apache/00_ctsms_https.conf.j2 new file mode 100644 index 0000000..1e71d81 --- /dev/null +++ b/templates/apache/00_ctsms_https.conf.j2 @@ -0,0 +1,83 @@ +{% raw -%} + +# +# + + #ServerName {%- endraw %}{{ ansible_hostname }}{% raw -%}:443 + + # date proto ipaddr status time req referer user-agent + LogFormat "%{%F %T}t %p %a %>s %D %r %{Referer}i %{User-agent}i" + + #LogLevel debug + TransferLog /var/log/apache2/access.log + ErrorLog /var/log/apache2/error.log + + Include /etc/apache2/blocklist.conf + + #Alias /documents /ctsms/documents/ + # + #Options Indexes Multiviews + #AllowOverride None + #Require all granted + # + + Alias /signup/css /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/public/css + Alias /signup/fonts /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/public/fonts + Alias /signup/images /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/public/images + Alias /signup/js /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/public/js + Alias /signup/themes /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/public/themes + ScriptAliasMatch ^/signup(.*) /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/public/dispatch.fcgi$1 + + #DocumentRoot /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/public + + AllowOverride None + Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch + #Order allow,deny + #Allow from all + Require all granted + AddHandler fcgid-script .fcgi + + + SetEnvIf Request_URI "/static/*" no-jk + SetEnvIf Request_URI "/signup/*" no-jk + Alias /resources /opt/tomcat9/webapps/ROOT/resources + + #Options FollowSymLinks + #allow from all + AllowOverride None + Require all granted + + Alias / /opt/tomcat9/webapps/ROOT/ + + #Options FollowSymLinks + #allow from all + AllowOverride None + Require all granted + + + + #AllowOverride None + deny from all + + + DocumentRoot /opt/tomcat9/webapps/ROOT + JkMount /*.jsf ajp13 + JkMount /rest/* ajp13 + JkMount /inputfieldimage ajp13 + JkMount /file ajp13 + JkMount /beacon/* ajp13 + JkMount /chart ajp13 + JkMount /unsubscribe/* ajp13 + + SSLEngine on + + #SSLProtocol -ALL +SSLv3 +TLSv1 + #SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:!LOW:!SSLv2:!EXPORT + + SSLCertificateFile /etc/apache2/ssl/apache.crt + SSLCertificateKeyFile /etc/apache2/ssl/apache.key + + +# +# +{%- endraw %} diff --git a/apache/blocklist.conf b/templates/apache/blocklist.conf.j2 similarity index 99% rename from apache/blocklist.conf rename to templates/apache/blocklist.conf.j2 index e1bffa7..a3774c9 100644 --- a/apache/blocklist.conf +++ b/templates/apache/blocklist.conf.j2 @@ -1,3 +1,5 @@ +{% raw -%} + order deny,allow @@ -6,7 +8,7 @@ order deny,allow deny from 114.134.184.0/21 # Chinese (CN) IP addresses follow (split into 3 lines on 8/16/17 to avoid possible Server 500 due to excess line length): -deny from 1.24.0.0/13 1.48.0.0/15 1.50.0.0/16 1.56.0.0/13 1.68.0.0/14 1.80.0.0/13 1.92.0.0/14 1.180.0.0/14 1.188.0.0/14 1.192.0.0/13 1.202.0.0/15 1.204.0.0/14 14.16.0.0/12 14.104.0.0/13 14.112.0.0/12 14.134.0.0/15 14.144.0.0/12 14.204.0.0/15 14.208.0.0/12 23.80.54.0/24 23.104.141.0/24 23.105.14.0/24 23.226.208.0/24 27.8.0.0/13 27.16.0.0/12 27.36.0.0/14 27.40.0.0/13 27.50.128.0/17 27.54.192.0/18 27.106.128.0/18 27.115.0.0/17 27.148.0.0/14 27.152.0.0/13 27.184.0.0/13 27.192.0.0/11 27.224.0.0/14 36.1.0.0/16 36.4.0.0/14 36.26.0.0/16 36.32.0.0/14 36.36.0.0/16 36.40.0.0/13 36.48.0.0/15 36.56.0.0/13 36.96.0.0/11 36.128.0.0/11 36.248.0.0/14 39.64.0.0/11 39.128.0.0/10 42.4.0.0/14 42.48.0.0/15 42.52.0.0/14 42.56.0.0/14 42.84.0.0/14 42.88.0.0/13 42.96.128.0/17 42.100.0.0/14 42.120.0.0/14 42.156.0.0/16 42.176.0.0/13 42.185.0.0/16 42.202.0.0/15 42.224.0.0/12 42.242.0.0/15 42.248.0.0/15 43.255.0.0/20 43.255.16.0/22 43.255.48.0/22 43.255.60.0/22 43.255.64.0/20 43.255.96.0/20 43.255.144.0/22 43.255.168.0/22 43.255.176.0/22 43.255.184.0/22 43.255.192.0/22 43.255.200.0/21 43.255.208.0/21 43.255.224.0/21 43.255.232.0/22 43.255.244.0/22 47.92.0.0/14 49.5.0.0/16 49.64.0.0/11 49.112.0.0/13 54.222.0.0/15 58.16.0.0/14 58.20.0.0/16 58.21.0.0/16 58.22.0.0/15 58.34.0.0/16 58.37.0.0/16 58.38.0.0/16 58.40.0.0/16 58.42.0.0/16 58.44.0.0/14 58.48.0.0/13 58.56.0.0/14 58.60.0.0/14 58.68.128.0/17 58.82.0.0/15 58.100.0.0/15 58.116.0.0/14 58.128.0.0/13 58.208.0.0/12 58.240.0.0/13 58.248.0.0/13 59.32.0.0/12 59.48.0.0/14 59.52.0.0/14 59.56.0.0/13 59.72.0.0/16 59.108.0.0/15 59.172.0.0/14 60.0.0.0/12 60.11.0.0/16 60.12.0.0/14 60.16.0.0/13 60.24.0.0/13 60.160.0.0/11 60.194.0.0/15 60.205.0.0/16 60.208.0.0/12 60.253.128.0/17 61.4.64.0/20 61.4.80.0/22 61.4.176.0/20 61.48.0.0/13 61.128.0.0/10 61.135.0.0/16 61.136.0.0/18 61.139.0.0/16 61.145.73.208/28 61.147.0.0/16 61.150.0.0/16 61.152.0.0/16 61.154.0.0/16 61.160.0.0/16 61.162.0.0/15 61.164.0.0/16 61.172.0.0/15 61.175.0.0/16 61.177.0.0/16 61.179.0.0/16 61.183.0.0/16 61.184.0.0/16 61.185.219.232/29 61.187.0.0/16 61.188.0.0/16 61.232.0.0/14 61.236.0.0/15 61.240.0.0/14 +deny from 1.24.0.0/13 1.48.0.0/15 1.50.0.0/16 1.56.0.0/13 1.68.0.0/14 1.80.0.0/13 1.92.0.0/14 1.180.0.0/14 1.188.0.0/14 1.192.0.0/13 1.202.0.0/15 1.204.0.0/14 14.16.0.0/12 14.104.0.0/13 14.112.0.0/12 14.134.0.0/15 14.144.0.0/12 14.204.0.0/15 14.208.0.0/12 23.80.54.0/24 23.104.141.0/24 23.105.14.0/24 23.226.208.0/24 27.8.0.0/13 27.16.0.0/12 27.36.0.0/14 27.40.0.0/13 27.50.128.0/17 27.54.192.0/18 27.106.128.0/18 27.115.0.0/17 27.148.0.0/14 27.152.0.0/13 27.184.0.0/13 27.192.0.0/11 27.224.0.0/14 36.1.0.0/16 36.4.0.0/14 36.26.0.0/16 36.32.0.0/14 36.36.0.0/16 36.40.0.0/13 36.48.0.0/15 36.56.0.0/13 36.96.0.0/11 36.128.0.0/11 36.248.0.0/14 39.64.0.0/11 39.128.0.0/10 42.4.0.0/14 42.48.0.0/15 42.52.0.0/14 42.56.0.0/14 42.84.0.0/14 42.88.0.0/13 42.96.128.0/17 42.100.0.0/14 42.120.0.0/14 42.156.0.0/16 42.176.0.0/13 42.185.0.0/16 42.202.0.0/15 42.224.0.0/12 42.242.0.0/15 42.248.0.0/15 43.255.0.0/20 43.255.16.0/22 43.255.48.0/22 43.255.60.0/22 43.255.64.0/20 43.255.96.0/20 43.255.144.0/22 43.255.168.0/22 43.255.176.0/22 43.255.184.0/22 43.255.192.0/22 43.255.200.0/21 43.255.208.0/21 43.255.224.0/21 43.255.232.0/22 43.255.244.0/22 47.92.0.0/14 49.5.0.0/16 49.64.0.0/11 49.112.0.0/13 54.222.0.0/15 58.16.0.0/14 58.20.0.0/16 58.21.0.0/16 58.22.0.0/15 58.34.0.0/16 58.37.0.0/16 58.38.0.0/16 58.40.0.0/16 58.42.0.0/16 58.44.0.0/14 58.48.0.0/13 58.56.0.0/14 58.60.0.0/14 58.68.128.0/17 58.82.0.0/15 58.100.0.0/15 58.116.0.0/14 58.128.0.0/13 58.208.0.0/12 58.240.0.0/13 58.248.0.0/13 59.32.0.0/12 59.48.0.0/14 59.52.0.0/14 59.56.0.0/13 59.72.0.0/16 59.108.0.0/15 59.172.0.0/14 60.0.0.0/12 60.11.0.0/16 60.12.0.0/14 60.16.0.0/13 60.24.0.0/13 60.160.0.0/11 60.194.0.0/15 60.205.0.0/16 60.208.0.0/12 60.253.128.0/17 61.4.64.0/20 61.4.80.0/22 61.4.176.0/20 61.48.0.0/13 61.128.0.0/10 61.135.0.0/16 61.136.0.0/18 61.139.0.0/16 61.145.73.208/28 61.147.0.0/16 61.150.0.0/16 61.152.0.0/16 61.154.0.0/16 61.160.0.0/16 61.162.0.0/15 61.164.0.0/16 61.172.0.0/15 61.175.0.0/16 61.177.0.0/16 61.179.0.0/16 61.183.0.0/16 61.184.0.0/16 61.185.219.232/29 61.187.0.0/16 61.188.0.0/16 61.232.0.0/14 61.236.0.0/15 61.240.0.0/14 deny from 101.16.0.0/12 101.37.0.0/16 101.64.0.0/13 101.72.0.0/14 101.76.0.0/15 101.80.0.0/12 101.200.0.0/15 101.224.0.0/13 101.248.0.0/15 101.254.0.0/16 103.253.4.0/22 106.4.0.0/14 106.8.0.0/15 106.16.0.0/12 106.32.0.0/12 106.43.0.0/16 106.56.0.0/13 106.80.0.0/12 106.108.0.0/14 106.112.0.0/13 106.120.0.0/13 110.6.0.0/15 110.16.0.0/14 110.51.0.0/16 110.52.0.0/15 110.80.0.0/13 110.88.0.0/14 110.96.0.0/11 110.152.0.0/14 110.156.0.0/15 110.166.0.0/15 110.173.0.0/19 110.173.32.0/20 110.173.64.0/18 110.176.0.0/14 110.184.0.0/13 110.192.0.0/11 110.228.0.0/14 110.240.0.0/12 111.0.0.0/10 111.72.0.0/13 111.85.0.0/16 111.112.0.0/15 111.120.0.0/14 111.124.0.0/16 111.126.0.0/15 111.128.0.0/11 111.160.0.0/13 111.172.0.0/14 111.176.0.0/13 111.192.0.0/12 111.224.0.0/14 111.228.0.0/14 112.0.0.0/10 112.64.0.0/14 112.73.0.0/16 112.74.0.0/16 112.80.0.0/12 112.98.0.0/15 112.100.0.0/14 112.109.128.0/17 112.111.0.0/16 112.112.0.0/14 112.116.0.0/15 112.122.0.0/15 112.192.0.0/14 112.224.0.0/11 113.0.0.0/13 113.8.0.0/15 113.12.0.0/14 113.16.0.0/15 113.18.0.0/16 113.54.0.0/15 113.56.0.0/15 113.58.0.0/16 113.59.0.0/17 113.62.0.0/15 113.64.0.0/10 113.120.0.0/13 113.128.0.0/15 113.132.0.0/14 113.136.0.0/13 113.194.0.0/15 113.200.0.0/15 113.204.0.0/14 113.218.0.0/15 113.220.0.0/14 113.224.0.0/12 113.240.0.0/13 113.248.0.0/14 114.28.0.0/16 114.80.0.0/12 114.96.0.0/13 114.104.0.0/14 114.112.0.0/14 114.135.0.0/16 114.138.0.0/15 114.215.0.0/16 114.216.0.0/13 114.224.0.0/11 115.24.0.0/15 115.28.0.0/15 115.32.0.0/14 115.48.0.0/12 115.84.0.0/18 115.100.0.0/15 115.148.0.0/14 115.152.0.0/15 115.159.0.0/16 115.166.64.0/19 115.168.0.0/14 115.192.0.0/11 115.224.0.0/12 116.1.0.0/16 116.2.0.0/15 116.4.0.0/14 116.8.0.0/14 116.16.0.0/12 116.52.0.0/14 116.56.0.0/15 116.60.0.0/14 116.76.0.0/15 116.90.80.0/20 116.95.0.0/16 116.112.0.0/14 116.116.0.0/15 116.128.0.0/10 116.204.0.0/15 116.207.0.0/16 116.208.0.0/14 116.213.64.0/18 116.213.128.0/17 116.224.0.0/12 116.248.0.0/15 116.252.0.0/15 116.254.128.0/18 117.8.0.0/13 117.21.0.0/16 117.22.0.0/15 117.24.0.0/13 117.32.0.0/13 117.40.0.0/14 117.44.0.0/15 117.57.0.0/16 117.60.0.0/14 117.64.0.0/13 117.79.224.0/20 117.80.0.0/12 117.106.0.0/15 117.112.0.0/13 117.128.0.0/10 118.26.0.0/16 118.72.0.0/13 118.80.0.0/15 118.112.0.0/13 118.120.0.0/14 118.124.0.0/15 118.132.0.0/14 118.144.0.0/14 118.180.0.0/14 118.186.0.0/15 118.192.0.0/15 118.213.0.0/16 118.244.0.0/16 118.248.0.0/13 119.0.0.0/13 119.8.0.0/16 119.10.0.0/17 119.18.192.0/20 119.23.0.0/16 119.28.0.0/15 119.32.0.0/14 119.36.0.0/16 119.39.0.0/16 119.44.0.0/16 119.48.0.0/13 119.57.0.0/16 119.60.0.0/15 119.62.0.0/16 119.84.0.0/14 119.88.0.0/14 119.96.0.0/13 119.108.0.0/15 119.112.0.0/13 119.120.0.0/13 119.128.0.0/12 119.144.0.0/14 119.162.0.0/15 119.164.0.0/14 119.176.0.0/12 119.233.0.0/16 119.248.0.0/14 120.0.0.0/12 120.24.0.0/14 120.32.0.0/13 120.40.0.0/14 120.68.0.0/14 120.76.0.0/14 120.80.0.0/13 120.92.0.0/16 120.192.0.0/10 121.0.16.0/20 121.4.0.0/15 121.8.0.0/13 121.16.0.0/12 121.32.0.0/14 121.40.0.0/14 121.56.0.0/15 121.60.0.0/14 121.68.0.0/14 121.76.0.0/15 121.100.128.0/17 121.196.0.0/14 121.201.0.0/16 121.204.0.0/14 121.224.0.0/12 122.4.0.0/14 122.10.128.0/17 122.51.128.0/17 122.64.0.0/11 122.96.0.0/15 122.119.0.0/16 122.136.0.0/13 122.156.0.0/14 122.188.0.0/14 122.192.0.0/14 122.198.0.0/16 122.200.64.0/18 122.224.0.0/12 122.240.0.0/13 123.4.0.0/14 123.8.0.0/13 123.52.0.0/14 123.56.0.0/14 123.64.0.0/11 123.97.128.0/17 123.100.0.0/19 123.112.0.0/12 123.128.0.0/13 123.138.0.0/15 123.144.0.0/14 123.148.0.0/15 123.150.0.0/15 123.152.0.0/13 123.160.0.0/14 123.164.0.0/14 123.172.0.0/15 123.178.0.0/15 123.180.0.0/14 123.184.0.0/13 123.196.0.0/15 123.206.0.0/15 123.232.0.0/14 123.244.0.0/14 123.249.0.0/16 124.42.0.0/16 124.64.0.0/15 124.66.0.0/17 124.67.0.0/16 124.72.0.0/13 124.88.0.0/15 124.92.0.0/14 124.112.0.0/15 124.114.0.0/15 124.117.0.0/16 124.118.0.0/15 124.126.0.0/15 124.128.0.0/13 124.152.0.0/16 124.160.0.0/13 124.192.0.0/15 124.200.0.0/13 124.224.0.0/16 124.226.0.0/15 124.228.0.0/14 124.234.0.0/15 124.236.0.0/14 124.240.0.0/17 124.240.128.0/18 124.248.0.0/17 125.32.0.0/14 125.36.0.0/14 125.40.0.0/13 125.64.0.0/12 125.79.0.0/16 125.80.0.0/13 125.88.0.0/13 125.104.0.0/13 125.112.0.0/12 125.210.0.0/15 125.216.0.0/13 139.129.0.0/16 139.170.0.0/16 139.189.0.0/16 139.199.0.0/16 139.206.0.0/16 139.208.0.0/13 139.217.0.0/16 139.224.0.0/16 139.226.0.0/15 140.206.0.0/15 140.224.0.0/16 140.237.0.0/16 140.240.0.0/16 140.246.0.0/16 140.249.0.0/16 140.255.0.0/16 142.4.117.0/30 144.0.0.0/16 144.52.0.0/16 144.255.0.0/16 150.138.0.0/15 153.0.0.0/16 153.99.0.0/16 159.226.0.0/16 162.209.168.0/24 171.8.0.0/13 171.34.0.0/15 171.36.0.0/14 171.40.0.0/13 171.80.0.0/14 171.88.0.0/13 171.104.0.0/13 171.112.0.0/14 171.116.0.0/14 171.120.0.0/13 171.208.0.0/12 175.0.0.0/12 175.16.0.0/13 175.24.0.0/14 175.30.0.0/15 175.42.0.0/15 175.44.0.0/16 175.46.0.0/15 175.48.0.0/12 175.64.0.0/11 175.102.0.0/16 175.106.128.0/17 175.146.0.0/15 175.148.0.0/14 175.152.0.0/14 175.160.0.0/12 175.178.0.0/16 175.184.128.0/18 175.185.0.0/16 175.186.0.0/15 175.188.0.0/14 180.76.0.0/16 180.95.128.0/17 180.96.0.0/11 180.136.0.0/13 180.152.0.0/13 180.160.0.0/12 180.208.0.0/15 180.212.0.0/15 182.18.0.0/17 182.32.0.0/12 182.50.112.0/20 182.61.0.0/16 182.84.0.0/14 182.88.0.0/14 182.96.0.0/12 182.112.0.0/12 182.128.0.0/12 182.144.0.0/13 182.200.0.0/13 182.240.0.0/13 183.0.0.0/10 183.64.0.0/13 183.92.0.0/14 183.128.0.0/11 183.160.0.0/12 183.184.0.0/13 183.192.0.0/10 192.34.109.224/28 198.2.203.64/28 198.2.212.160/28 198.15.171.64/26 deny from 202.43.144.0/22 202.46.32.0/19 202.66.0.0/16 202.75.208.0/20 202.96.0.0/12 202.111.160.0/19 202.112.0.0/14 202.117.0.0/16 202.127.112.0/20 202.165.176.0/20 202.196.80.0/20 203.69.0.0/16 203.81.16.0/20 203.86.0.0/18 203.86.64.0/19 203.93.0.0/16 203.169.160.0/19 203.171.224.0/20 203.195.160.0/23 210.5.0.0/19 210.12.0.0/16 210.14.128.0/19 210.21.0.0/16 210.22.0.0/16 210.32.0.0/14 210.51.0.0/16 210.52.0.0/15 210.75.0.0/16 210.77.0.0/16 210.79.64.0/18 210.192.96.0/19 211.76.96.0/20 211.78.208.0/20 211.80.0.0/13 211.86.144.0/20 211.90.0.0/15 211.92.0.0/14 211.96.0.0/13 211.136.0.0/13 211.144.0.0/12 211.160.0.0/13 211.233.70.0/24 218.0.0.0/11 218.56.0.0/13 218.64.0.0/11 218.84.0.0/14 218.88.0.0/13 218.96.0.0/14 218.102.0.0/16 218.104.0.0/14 218.108.0.0/15 218.194.80.0/20 218.200.0.0/13 218.240.0.0/13 218.249.0.0/16 219.128.0.0/11 219.154.0.0/15 219.223.192.0/18 219.232.0.0/16 219.234.80.0/20 219.235.0.0/16 219.238.0.0/15 220.112.0.0/16 220.154.0.0/15 220.160.0.0/11 220.181.0.0/16 220.191.0.0/16 220.192.0.0/12 220.228.70.0/24 220.242.0.0/15 220.248.0.0/14 220.250.0.0/19 220.252.0.0/16 221.0.0.0/12 221.122.0.0/15 221.130.0.0/15 221.136.0.0/15 221.172.0.0/14 221.176.0.0/13 221.192.0.0/14 221.196.0.0/15 221.198.0.0/16 221.199.0.0/17 221.200.0.0/14 221.204.0.0/15 221.206.0.0/16 221.207.0.0/16 221.208.0.0/12 221.212.0.0/15 221.214.0.0/15 221.216.0.0/13 221.224.0.0/13 221.228.0.0/14 221.232.0.0/13 222.32.0.0/11 222.64.0.0/12 222.80.0.0/12 222.128.0.0/14 222.132.0.0/14 222.136.0.0/13 222.160.0.0/14 222.168.0.0/13 222.172.222.0/24 222.176.0.0/13 222.184.0.0/13 222.200.0.0/16 222.208.0.0/13 222.216.0.0/14 222.220.0.0/15 222.222.0.0/15 222.240.0.0/13 222.249.0.0/16 223.4.0.0/14 223.8.0.0/13 223.64.0.0/11 223.96.0.0/12 223.112.0.0/14 223.144.0.0/12 223.198.0.0/15 223.223.176.0/20 223.223.192.0/20 223.255.0.0/17 223.240.0.0/13 @@ -69,7 +71,7 @@ deny from 204.9.184.0/21 212.1.224.0/19 212.9.224.0/19 212.13.0.0/19 212.22.200. # Nazarbayev University in Kazakhstan: unblocked allow from 178.91.253.0/24 - + # Hungary (HU) deny from 46.107.0.0/16 92.249.128.0/17 94.21.90.0/24 94.125.176.0/22 145.236.0.0/16 193.178.119.0/24 194.38.96.0/19 @@ -95,7 +97,7 @@ deny from 188.48.0.0/16 deny from 12.166.96.32/27 41.58.0.0/16 41.66.192.0/18 41.71.128.0/17 41.78.208.0/22 41.85.160.0/19 41.93.128.0/17 41.136.0.0/16 41.138.88.0/22 41.138.160.0/19 41.139.64.0/18 41.155.0.0/17 41.184.0.0/16 41.189.0.0/19 41.189.32.0/19 41.189.96.0/19 41.190.0.0/19 41.190.88.0/22 41.191.84.0/22 41.191.108.0/22 41.194.52.0/22 41.202.0.0/17 41.202.128.0/19 41.202.192.0/19 41.203.64.0/18 41.203.208.0/21 41.203.224.0/20 41.204.0.0/17 41.204.128.0/18 41.204.224.0/19 41.205.0.0/19 41.205.64.0/19 41.205.160.0/19 41.206.0.0/18 41.206.64.0/19 41.207.0.0/19 41.207.160.0/19 41.207.192.0/19 41.208.48.0/23 41.208.128.0/18 41.210.0.0/18 41.210.192.0/18 41.211.0.0/19 41.211.192.0/18 41.212.128.0/17 41.214.0.0/17 41.215.160.0/20 41.216.32.0/19 41.217.0.0/17 41.218.192.0/18 41.219.128.0/17 41.220.0.0/16 41.221.80.0/20 41.221.160.0/20 41.222.0.0/21 41.222.24.0/21 41.222.40.0/21 41.222.64.0/21 41.222.192.0/22 41.223.24.0/22 41.223.64.0/22 41.223.248.0/22 41.242.48.0/21 61.11.230.112/29 62.24.96.0/19 62.56.128.0/17 62.56.235.0/24 62.56.236.0/24 62.56.244.0/22 62.56.248.0/24 62.128.160.0/20 62.173.32.0/19 62.192.128.0/19 62.192.140.250 62.193.160.0/19 63.70.178.0/24 63.73.58.0/24 63.100.193.0/24 63.103.138.0/24 63.103.139.64/26 63.103.140.0/22 63.109.245.168/29 63.109.247.0/24 63.109.248.128/25 63.122.154.0/24 64.14.48.128/26 64.86.155.0/24 64.86.210.0/23 64.110.30.0/24 64.110.31.0/24 64.110.64.16/28 64.110.76.0/23 64.110.81.0/24 64.110.93.16/28 64.110.93.176/28 64.110.147.0/24 64.201.33.0/24 65.209.91.0/24 65.209.92.0/24 66.18.64.0/19 66.110.31.0/24 66.178.0.0/17 66.199.241.82 66.205.20.0/24 deny from 77.70.128.0/24 77.70.129.0/26 77.70.137.0/25 77.70.138.0/23 77.73.184.0/21 77.220.0.0/20 78.138.2.0/24 78.138.3.0/25 78.138.3.128/26 78.138.3.192/27 78.138.3.224/28 78.138.8.8/29 78.138.32.32/27 78.138.33.144/29 80.78.16.168/29 80.78.16.176/28 80.78.16.192/28 80.78.17.0/24 80.78.18.88/29 80.78.18.96/27 80.78.18.128/29 80.78.19.16/29 80.78.19.104/29 80.78.19.112/28 80.78.23.16/28 80.87.64.0/19 80.88.128.0/20 80.88.129.0/24 80.88.130.0/24 80.88.131.0/24 80.88.132.0/26 80.88.132.64/27 80.88.132.104/29 80.88.132.128/26 80.88.132.192/27 80.88.132.224/28 80.88.132.240/29 80.88.133.0/25 80.88.134.0/26 80.88.134.64/29 80.88.135.0/24 80.88.136.0/24 80.88.137.0/24 80.88.138.0/25 80.88.138.128/26 80.88.138.192/27 80.88.139.0/25 80.88.139.128/26 80.88.139.192/27 80.88.139.224/28 80.88.140.0/24 80.88.141.0/25 80.88.141.128/27 80.88.142.0/24 80.88.143.128/29 80.88.144.0/23 80.88.146.0/24 80.88.147.0/24 80.88.148.0/24 80.88.149.0/25 80.88.149.128/26 80.88.149.192/28 80.88.150.0/24 80.88.151.0/24 80.88.152.0/24 80.88.153.0/24 80.88.154.32/27 80.88.154.72/29 80.88.154.80/29 80.88.154.96/28 80.88.155.0/25 80.88.155.128/27 80.88.155.160/29 80.89.176.0/24 deny from 80.179.102.0/24 80.179.107.64/27 80.179.107.224/29 80.179.128.0/17 80.231.4.0/23 80.240.192.0/20 80.247.136.0/24 80.247.137.0/24 80.247.141.32/27 80.247.141.64/26 80.247.141.128/25 80.247.142.0/24 80.247.147.16/28 80.247.147.32/29 80.247.147.64/27 80.247.147.96/28 80.247.151.0/24 80.247.153.0/24 80.247.156.0/26 80.247.156.128/28 80.247.157.0/24 80.247.159.0/24 80.248.0.0/20 80.248.64.0/20 80.250.32.0/20 80.255.40.48/28 80.255.40.96/29 80.255.40.112/28 80.255.40.128/28 80.255.40.192/28 80.255.40.224/27 80.255.40.240/28 80.255.41.160/28 80.255.43.0/24 80.255.46.0/29 80.255.46.16/28 80.255.46.64/29 80.255.58.160/27 80.255.58.192/26 80.255.59.19 80.255.59.232/29 80.255.59.240/29 80.255.61.0/25 81.18.32.0/20 81.18.40.0/24 81.18.42.0/24 81.23.194.0/27 81.23.194.64/27 81.23.194.128/25 81.23.195.0/24 81.23.196.0/25 81.23.196.128/29 81.23.200.0/21 81.24.0.0/20 81.91.224.0/20 81.199.0.0/16 82.128.0.0/17 82.206.136.0/24 83.137.59.8/29 83.137.61.0/24 83.138.167.40/29 83.143.8.0/22 83.229.0.0/17 84.254.188.3 84.254.128.0/18 -deny from 105.112.0.0/12 105.235.0.0/17 154.66.0.0/18 154.68.192.0/18 154.113.0.0/16 154.117.64.0/18 154.118.0.0/17 154.120.64.0/18 155.239.0.0/16 160.226.0.0/17 169.159.64.0/18 192.116.64.0/18 192.116.128.0/18 192.116.152.0/21 192.118.71.0/24 193.93.96.0/22 193.95.0.0/17 193.110.2.0/23 193.189.0.0/18 193.189.64.0/23 193.189.128.0/24 193.194.64.0/19 193.219.192.0/18 193.220.0.0/16 193.220.26.0/24 193.220.30.0/26 193.220.30.64/27 193.220.31.0/26 193.220.31.64/27 193.220.45.0/25 193.220.47.0/25 193.220.77.0/26 193.220.187.0/26 193.220.187.128/27 194.200.0.0/14 195.8.22.0/24 195.10.109.192/26 195.24.192.0/19 195.44.168.0/21 195.44.176.0/21 195.137.13.0/24 195.137.14.0/24 195.166.224.0/19 195.214.240.0/21 195.219.176.0/24 195.225.62.0/23 195.245.108.0/23 196.0.0.0/16 196.1.176.0/20 196.3.60.0/22 196.3.180.0/22 196.12.12.0/22 196.20.0.0/19 196.29.96.0/19 196.29.216.0/21 196.29.224.0/20 196.40.160.0/20 196.44.96.0/19 196.45.192.0/18 196.46.240.0/21 196.47.96.0/19 196.128.0.0/10 196.192.0.0/12 196.208.0.0/14 196.212.0.0/14 196.216.64.0/19 196.220.0.0/19 196.220.128.0/19 197.210.0.0/16 197.211.32.0/19 197.234.32.0/19 197.234.216.0/21 197.242.96.0/19 197.251.128.0/17 197.253.0.0/18 198.54.0.0/16 +deny from 105.112.0.0/12 105.235.0.0/17 154.66.0.0/18 154.68.192.0/18 154.113.0.0/16 154.117.64.0/18 154.118.0.0/17 154.120.64.0/18 155.239.0.0/16 160.226.0.0/17 169.159.64.0/18 192.116.64.0/18 192.116.128.0/18 192.116.152.0/21 192.118.71.0/24 193.93.96.0/22 193.95.0.0/17 193.110.2.0/23 193.189.0.0/18 193.189.64.0/23 193.189.128.0/24 193.194.64.0/19 193.219.192.0/18 193.220.0.0/16 193.220.26.0/24 193.220.30.0/26 193.220.30.64/27 193.220.31.0/26 193.220.31.64/27 193.220.45.0/25 193.220.47.0/25 193.220.77.0/26 193.220.187.0/26 193.220.187.128/27 194.200.0.0/14 195.8.22.0/24 195.10.109.192/26 195.24.192.0/19 195.44.168.0/21 195.44.176.0/21 195.137.13.0/24 195.137.14.0/24 195.166.224.0/19 195.214.240.0/21 195.219.176.0/24 195.225.62.0/23 195.245.108.0/23 196.0.0.0/16 196.1.176.0/20 196.3.60.0/22 196.3.180.0/22 196.12.12.0/22 196.20.0.0/19 196.29.96.0/19 196.29.216.0/21 196.29.224.0/20 196.40.160.0/20 196.44.96.0/19 196.45.192.0/18 196.46.240.0/21 196.47.96.0/19 196.128.0.0/10 196.192.0.0/12 196.208.0.0/14 196.212.0.0/14 196.216.64.0/19 196.220.0.0/19 196.220.128.0/19 197.210.0.0/16 197.211.32.0/19 197.234.32.0/19 197.234.216.0/21 197.242.96.0/19 197.251.128.0/17 197.253.0.0/18 198.54.0.0/16 deny from 204.16.124.0/22 204.118.170.0/24 206.82.128.0/20 206.113.97.0/24 208.70.0.0/21 208.78.56.0/21 209.88.163.0/24 209.101.84.0/24 209.159.160.0/20 209.198.240.0/23 209.198.242.16/28 209.198.242.96/29 209.198.242.104/30 209.198.242.108/31 209.198.242.128/27 209.198.246.240/28 212.49.64.0/19 212.52.128.0/19 212.60.64.0/19 212.85.192.0/19 212.96.0.0/19 212.100.64.0/19 212.165.128.0/17 212.165.132.64/27 212.165.135.0/24 212.165.140.16/29 212.165.140.64/26 212.165.140.128/25 212.165.141.0/24 212.165.147.0/26 212.165.147.128/26 212.165.183.0/24 212.199.108.0/24 212.199.251.0/24 212.247.93.0/24 deny from 213.136.96.0/19 213.140.62.0/23 213.150.192.0/23 213.154.64.0/19 213.166.160.0/19 213.181.64.0/19 213.185.96.0/21 213.185.106.0/24 213.185.112.0/24 213.185.113.0/26 213.185.113.64/27 213.185.113.96/27 213.185.118.160/27 213.185.118.192/26 213.185.124.0/24 213.187.135.0/24 213.187.145.0/24 213.211.128.0/18 213.211.188.0/24 213.232.96.0/24 213.255.193.0/24 213.255.194.0/24 213.255.195.0/24 213.255.198.0/24 213.255.199.0/24 216.72.104.0/21 216.74.187.0/24 216.118.252.0/24 216.118.253.0/24 216.118.254.0/24 216.129.147.128/28 216.129.159.0/24 216.133.174.0/24 216.139.160.0/19 216.147.132.144/28 216.147.132.160/28 216.147.134.0/24 216.147.159.0/24 216.185.79.0/24 216.236.200.96/28 216.236.202.96/28 216.236.205.0/24 216.236.222.128/26 216.250.195.0/27 216.250.195.64/26 216.250.221.0/24 216.250.222.0/24 216.252.176.0/24 216.252.177.0/24 216.252.231.0/25 216.252.245.0/24 217.10.163.128/26 217.10.163.192/27 217.10.163.224/27 217.10.166.0/26 217.10.166.64/28 217.10.169.0/24 217.10.170.0/24 217.10.171.0/24 217.10.173.0/26 217.10.182.0/27 217.10.184.0/24 217.14.80.0/20 217.15.124.0/25 217.20.240.0/20 217.20.241.0/25 217.20.241.128/29 217.20.241.136/29 217.20.241.144/28 217.20.241.160/29 217.20.241.168/29 217.20.241.176/29 217.20.241.184/29 217.20.241.192/29 217.20.241.200/29 217.20.241.208/29 217.20.242.0/24 217.20.243.16/28 217.20.243.32/27 217.21.64.0/19 217.21.112.0/20 217.78.64.0/20 217.117.0.0/20 217.146.3.144/28 217.146.3.160/28 217.146.3.176/29 217.146.3.224/27 217.146.4.64/26 217.146.5.0/24 217.146.6.0/25 217.146.6.160/27 217.146.7.0/24 217.146.8.0/25 217.146.9.0/24 217.146.10.128/25 217.146.11.0/25 217.146.12.0/24 217.146.13.0/24 217.146.14.0/25 217.146.15.0/25 217.146.16.0/27 217.146.16.32/29 217.168.112.0/20 217.194.140.0/22 217.194.144.0/20 217.212.242.0/23 @@ -134,7 +136,11 @@ deny from 62.42.0.0/16 77.211.0.0/16 79.174.192.0/18 80.12.242.0/24 80.24.0.0/16 # Costa Rica (CR) exceptions: allow from 196.40.0.0/18 196.40.64.0/19 -# 01-2019: +# 01-2019: deny from 194.208.62.0/24 192.251.226.0/24 188.143.232.0/24 188.143.233.0/24 178.137.16.0/24 95.141.17.0/24 108.62.56.0/24 108.62.57.0/24 108.62.58.0/24 108.62.59.0/24 108.62.60.0/24 108.62.61.0/24 108.62.62.0/24 108.62.63.0/24 173.234.225.0/24 113.212.69.0/24 113.212.70.0/24 216.151.137.0/24 216.151.138.0/24 216.152.252.0/24 216.152.249.0/24 216.151.130.0/24 96.47.225.0/24 5.167.64.0/24 5.167.65.0/24 5.167.66.0/24 5.167.67.0/24 5.167.68.0/24 5.167.69.0/24 5.167.70.0/24 5.167.71.0/24 104.20.22.42 176.9.219.38 46.118.112.135 50.7.240.10 96.47.224.42 96.44.142.250 195.254.134.10 195.254.134.194 188.95.234.6 188.143.235.21 95.134.130.182 95.143.192.159 176.100.75.27 176.221.42.32 - - \ No newline at end of file + +# Scientology IP Addresses (5/2025) +deny from 12.9.238.0/23 192.216.201.0/24 198.77.154.0/24 198.77.155.0/24 192.95.10.0/24 205.227.165.0/24 208.30.51.0/24 + + +{%- endraw %} diff --git a/apache/jk.conf b/templates/apache/jk.conf.j2 similarity index 99% rename from apache/jk.conf rename to templates/apache/jk.conf.j2 index 2ca7da2..3bc5bb0 100644 --- a/apache/jk.conf +++ b/templates/apache/jk.conf.j2 @@ -1,3 +1,4 @@ +{% raw -%} # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. @@ -113,10 +114,11 @@ # IMPORTANT: Mounts and virtual hosts # If you are using VirtualHost elements, you - # - can put mounts only used in some virtual host into its VirtualHost element + # - can put mounts only used in some virtual host into its VirtualHost element # - can copy all global mounts to it using "JkMountCopy On" inside the VirtualHost # - can copy all global mounts to all virtual hosts by putting # "JkMountCopy All" into the global server # Since: 1.2.26 +{%- endraw %} diff --git a/templates/apache/ports.conf.j2 b/templates/apache/ports.conf.j2 new file mode 100644 index 0000000..fe5f0b6 --- /dev/null +++ b/templates/apache/ports.conf.j2 @@ -0,0 +1,25 @@ +{% raw -%} +# If you just change the port or add more ports here, you will likely also +# have to change the VirtualHost statement in +# /etc/apache2/sites-enabled/000-default.conf + +#NameVirtualHost 192.168.0.75:80 +Listen 80 +#Listen 81 + +#NameVirtualHost 192.168.0.75:443 +#Listen 443 +#Listen 444 + + + Listen 443 + #Listen 444 + + + + Listen 443 + #Listen 444 + + +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet +{%- endraw %} diff --git a/cleanjavaclasses.sh b/templates/cleanjavaclasses.j2 similarity index 100% rename from cleanjavaclasses.sh rename to templates/cleanjavaclasses.j2 diff --git a/templates/crontab/ctsms.j2 b/templates/crontab/ctsms.j2 new file mode 100644 index 0000000..c2cdb7d --- /dev/null +++ b/templates/crontab/ctsms.j2 @@ -0,0 +1,33 @@ +#SHELL=/bin/bash +#PATH=/sbin:/bin:/usr/sbin:/usr/bin +#MAILTO= +#HOME=/ + +# For details see man 4 crontabs + +# Example of job definition: +# .---------------- minute (0 - 59) +# | .------------- hour (0 - 23) +# | | .---------- day of month (1 - 31) +# | | | .------- month (1 - 12) OR jan,feb,mar,apr ... +# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat +# | | | | | +# * * * * * user-name command to be executed + +#prepare daily notifications: +00 05 * * * ctsms nice /ctsms/dbtool.sh -pn >> /ctsms/dbtool.log 2>&1 + +#send notifications via email: +*/5 06-21 * * * ctsms nice /ctsms/dbtool.sh -sn -l 10 >> /ctsms/dbtool.log 2>&1 + +#proband auto-delete job: +#45 23 * * * ctsms nice /ctsms/dbtool.sh -rp -f >> /ctsms/dbtool.log 2>&1 + +#render stats: +55 * * * * ctsms nice perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render/process.pl --task=create_journal_heatmap --task=create_logon_heatmap --task=cleanup_all -f + +#delete documents no longer in db +#00 23 * * sun ctsms nice /ctsms/dbtool.sh -dm -f >> /ctsms/dbtool.log 2>&1 +15 23 * * sun ctsms nice /ctsms/dbtool.sh -do -f >> /ctsms/dbtool.log 2>&1 + +#empty line at end: diff --git a/templates/crontab/my_department.j2 b/templates/crontab/my_department.j2 new file mode 100644 index 0000000..f188bec --- /dev/null +++ b/templates/crontab/my_department.j2 @@ -0,0 +1,35 @@ +#SHELL=/bin/bash +#PATH=/sbin:/bin:/usr/sbin:/usr/bin +#MAILTO= +#HOME=/ + +# For details see man 4 crontabs + +# Example of job definition: +# .---------------- minute (0 - 59) +# | .------------- hour (0 - 23) +# | | .---------- day of month (1 - 31) +# | | | .------- month (1 - 12) OR jan,feb,mar,apr ... +# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat +# | | | | | +# * * * * * user-name command to be executed + +#send mass mails: +*/5 06-21 * * * ctsms nice /ctsms/dbtool.sh -smm -u cron -p 12345 -l 10 >> /ctsms/dbtool.log 2>&1 + +#run daily jobs: +20 0 * * * ctsms nice /ctsms/dbtool.sh -rdj -u cron -p 12345 >> /ctsms/dbtool.log 2>&1 + +#run weekly jobs: +21 0 * * sat ctsms nice /ctsms/dbtool.sh -rwj -u cron -p 12345 >> /ctsms/dbtool.log 2>&1 + +#run monthly jobs: +22 0 1 * * ctsms nice /ctsms/dbtool.sh -rmj -u cron -p 12345 >> /ctsms/dbtool.log 2>&1 + +#indentify duplicate subjects: +45 23 * * sun ctsms nice perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/Duplicates/process.pl --task=cleanup_all --task=import_proband --task=create_duplicate --task=update_proband --task=cleanup_all --force + +#perform all pending delete operations: +00 23 * * sun ctsms nice /ctsms/dbtool.sh -pda -u cron -p 12345 -f >> /ctsms/dbtool.log 2>&1 + +#empty line at end: diff --git a/templates/ctsms/crowdin.yml.j2 b/templates/ctsms/crowdin.yml.j2 new file mode 100644 index 0000000..83adedc --- /dev/null +++ b/templates/ctsms/crowdin.yml.j2 @@ -0,0 +1,330 @@ +{% raw -%} + +files: + - source: /core/src/main/resources/*.properties + ignore: + - /core/src/main/resources/*_de.properties + - /core/src/main/resources/*_da.properties + - /core/src/main/resources/*_es.properties + - /core/src/main/resources/*_fi.properties + - /core/src/main/resources/*_fr.properties + - /core/src/main/resources/*_hr.properties + - /core/src/main/resources/*_hu.properties + - /core/src/main/resources/*_it.properties + - /core/src/main/resources/*_ja.properties + - /core/src/main/resources/*_ko.properties + - /core/src/main/resources/*_nl.properties + - /core/src/main/resources/*_pt.properties + - /core/src/main/resources/*_ro.properties + - /core/src/main/resources/*_sk.properties + - /core/src/main/resources/*_sl.properties + - /core/src/main/resources/*_sv.properties + - /core/src/main/resources/*_tr.properties + - /core/src/main/resources/*_uk.properties + - /core/src/main/resources/*_ru.properties + - /core/src/main/resources/*_ln.properties + - /core/src/main/resources/*_sw.properties + - /core/src/main/resources/*_yo.properties + - /core/src/main/resources/*_ig.properties + - /core/src/main/resources/*_ff.properties + - /core/src/main/resources/*_ar.properties + - /core/src/main/resources/*_kg.properties + - /core/src/main/resources/*_hi.properties + - /core/src/main/resources/*_zh.properties + - /core/src/main/resources/ctsms-applicationcontext.properties + - /core/src/main/resources/*settings.properties + - /core/src/main/resources/ctsms-dateformats.properties + - /core/src/main/resources/ctsms-job-mail-sender.properties + - /core/src/main/resources/ctsms-massmail-mail-sender.properties + - /core/src/main/resources/ctsms-notification-mail-sender.properties + translation: /core/src/main/resources/%file_name%_%two_letters_code%.properties + - source: /web/src/main/resources/org/phoenixctms/ctsms/web/ + ignore: + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_de.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_de.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_de.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_de.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_de.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_de.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_de.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_de.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_de.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_da.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_da.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_da.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_da.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_da.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_da.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_da.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_da.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_da.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_es.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_es.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_es.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_es.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_es.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_es.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_es.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_es.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_es.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_fi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_fi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_fi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_fi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_fi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_fi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_fi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_fi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_fi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_fr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_fr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_fr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_fr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_fr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_fr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_fr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_fr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_fr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_hr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_hr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_hr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_hr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_hr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_hr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_hr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_hr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_hr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_hu.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_hu.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_hu.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_hu.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_hu.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_hu.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_hu.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_hu.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_hu.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_it.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_it.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_it.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_it.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_it.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_it.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_it.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_it.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_it.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_ja.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_ja.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_ja.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_ja.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_ja.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_ja.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_ja.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_ja.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_ja.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_ko.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_ko.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_ko.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_ko.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_ko.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_ko.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_ko.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_ko.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_ko.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_nl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_nl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_nl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_nl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_nl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_nl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_nl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_nl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_nl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_pt.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_pt.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_pt.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_pt.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_pt.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_pt.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_pt.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_pt.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_pt.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_ro.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_ro.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_ro.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_ro.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_ro.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_ro.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_ro.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_ro.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_ro.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_sk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_sk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_sk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_sk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_sk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_sk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_sk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_sk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_sk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_sl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_sl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_sl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_sl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_sl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_sl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_sl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_sl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_sl.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_sv.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_sv.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_sv.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_sv.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_sv.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_sv.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_sv.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_sv.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_sv.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_tr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_tr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_tr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_tr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_tr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_tr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_tr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_tr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_tr.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_uk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_uk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_uk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_uk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_uk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_uk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_uk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_uk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_uk.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_ru.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_ru.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_ru.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_ru.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_ru.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_ru.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_ru.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_ru.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_ru.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_ln.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_ln.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_ln.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_ln.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_ln.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_ln.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_ln.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_ln.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_ln.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_sw.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_sw.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_sw.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_sw.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_sw.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_sw.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_sw.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_sw.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_sw.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_yo.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_yo.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_yo.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_yo.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_yo.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_yo.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_yo.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_yo.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_yo.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_ig.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_ig.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_ig.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_ig.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_ig.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_ig.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_ig.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_ig.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_ig.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_ff.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_ff.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_ff.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_ff.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_ff.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_ff.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_ff.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_ff.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_ff.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_ar.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_ar.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_ar.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_ar.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_ar.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_ar.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_ar.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_ar.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_ar.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_kg.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_kg.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_kg.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_kg.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_kg.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_kg.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_kg.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_kg.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_kg.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_hi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_hi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_hi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_hi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_hi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_hi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_hi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_hi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_hi.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/*_zh.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/user/*_zh.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/trial/*_zh.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/staff/*_zh.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/proband/*_zh.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/massmail/*_zh.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inventory/*_zh.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/inputfield/*_zh.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/course/*_zh.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/settings.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/themes.properties + - /web/src/main/resources/org/phoenixctms/ctsms/web/windows.properties + translation: /%original_path%/%file_name%_%two_letters_code%.properties + - source: /core/src/main/resources/*.vsl + ignore: + - /core/src/main/resources/*-de.vsl + - /core/src/main/resources/*-da.vsl + - /core/src/main/resources/*-es.vsl + - /core/src/main/resources/*-fi.vsl + - /core/src/main/resources/*-fr.vsl + - /core/src/main/resources/*-hr.vsl + - /core/src/main/resources/*-hu.vsl + - /core/src/main/resources/*-it.vsl + - /core/src/main/resources/*-ja.vsl + - /core/src/main/resources/*-ko.vsl + - /core/src/main/resources/*-nl.vsl + - /core/src/main/resources/*-pt.vsl + - /core/src/main/resources/*-ro.vsl + - /core/src/main/resources/*-sk.vsl + - /core/src/main/resources/*-sl.vsl + - /core/src/main/resources/*-sv.vsl + - /core/src/main/resources/*-tr.vsl + - /core/src/main/resources/*-uk.vsl + - /core/src/main/resources/*-ru.vsl + - /core/src/main/resources/*-ln.vsl + - /core/src/main/resources/*-sw.vsl + - /core/src/main/resources/*-yo.vsl + - /core/src/main/resources/*-ig.vsl + - /core/src/main/resources/*-ff.vsl + - /core/src/main/resources/*-ar.vsl + - /core/src/main/resources/*-kg.vsl + - /core/src/main/resources/*-hi.vsl + - /core/src/main/resources/*-zh.vsl + translation: /core/src/main/resources/%file_name%-%two_letters_code%.vsl +{%- endraw %} diff --git a/templates/ctsms/pom.xml.j2 b/templates/ctsms/pom.xml.j2 new file mode 100644 index 0000000..e69de29 diff --git a/logrotate/ctsms b/templates/logrotate/ctsms.j2 similarity index 97% rename from logrotate/ctsms rename to templates/logrotate/ctsms.j2 index 1567c5d..f595c13 100644 --- a/logrotate/ctsms +++ b/templates/logrotate/ctsms.j2 @@ -5,4 +5,4 @@ daily rotate 7 missingok size 5M -} \ No newline at end of file +} diff --git a/templates/properties/ctsms-applicationcontext.properties.j2 b/templates/properties/ctsms-applicationcontext.properties.j2 new file mode 100644 index 0000000..1a832c7 --- /dev/null +++ b/templates/properties/ctsms-applicationcontext.properties.j2 @@ -0,0 +1,15 @@ + +default_locale={{ default_locale|default("en", true) }} +time_zone={{ time_zone|default("UTC", true) }} +journal_database_write_locale={{ journal_database_write_locale|default("en", true) }} +audit_trail_database_write_locale={{ audit_trail_database_write_locale|default("en", true) }} +notifications_database_write_locale={{ notifications_database_write_locale|default("en", true) }} +proband_list_status_reasons_database_write_locale={{ proband_list_status_reasons_database_write_locale|default("en", true) }} +cv_pdf_locale={{ cv_pdf_locale|default("en", true) }} +reimbursements_pdf_locale={{ reimbursements_pdf_locale|default("en", true) }} +course_participant_list_pdf_locale={{ course_participant_list_pdf_locale|default("en", true) }} +proband_letter_pdf_locale={{ proband_letter_pdf_locale|default("en", true) }} +course_certificate_pdf_locale={{ course_certificate_pdf_locale|default("en", true) }} +ecrf_pdf_locale={{ ecrf_pdf_locale|default("en", true) }} +inquiries_pdf_locale={{ inquiries_pdf_locale|default("en", true) }} +proband_list_entry_tags_pdf_locale={{ proband_list_entry_tags_pdf_locale|default("en", true) }} diff --git a/templates/properties/ctsms-cv-pdf-settings.properties.j2 b/templates/properties/ctsms-cv-pdf-settings.properties.j2 new file mode 100644 index 0000000..7b34fa3 --- /dev/null +++ b/templates/properties/ctsms-cv-pdf-settings.properties.j2 @@ -0,0 +1,4 @@ + +#example for overloading the CV PDF document renderer: +#painter_class=org.phoenixctms.ctsms.pdf.MyCvPDFPainter +#painter_source_files=org/phoenixctms/ctsms/pdf/MyCvPDFBlock.java,org/phoenixctms/ctsms/pdf/MyCvPDFBlockCursor.java,org/phoenixctms/ctsms/pdf/MyCvPDFDefaultSettings.java,org/phoenixctms/ctsms/pdf/MyCvPDFLabelCodes.java,org/phoenixctms/ctsms/pdf/MyCvPDFPainter.java,org/phoenixctms/ctsms/pdf/MyCvPDFSettingCodes.java diff --git a/templates/properties/ctsms-dbtool.properties.j2 b/templates/properties/ctsms-dbtool.properties.j2 new file mode 100644 index 0000000..ce538f1 --- /dev/null +++ b/templates/properties/ctsms-dbtool.properties.j2 @@ -0,0 +1,6 @@ + +{% if ansible_os_family == 'Windows' %} +dbtool_lock_file_name=C\:\\ctsms\\{0}.lock +{% else %} +dbtool_lock_file_name=/ctsms/{0}.lock +{% endif %} diff --git a/templates/properties/ctsms-departments.properties.j2 b/templates/properties/ctsms-departments.properties.j2 new file mode 100644 index 0000000..ac01b16 --- /dev/null +++ b/templates/properties/ctsms-departments.properties.j2 @@ -0,0 +1,3 @@ +{% raw -%} +my_department=My Site +{%- endraw %} diff --git a/templates/properties/ctsms-departments_de.properties.j2 b/templates/properties/ctsms-departments_de.properties.j2 new file mode 100644 index 0000000..f229928 --- /dev/null +++ b/templates/properties/ctsms-departments_de.properties.j2 @@ -0,0 +1,3 @@ +{% raw -%} +my_department=Meine Site +{%- endraw %} diff --git a/templates/properties/ctsms-visitschedule-excel-settings.properties.j2 b/templates/properties/ctsms-visitschedule-excel-settings.properties.j2 new file mode 100644 index 0000000..ebc5167 --- /dev/null +++ b/templates/properties/ctsms-visitschedule-excel-settings.properties.j2 @@ -0,0 +1,4 @@ + +#example for overloading the visitschedule spreadsheet writer: +#painter_class=org.phoenixctms.ctsms.excel.MyVisitScheduleExcelWriter +#painter_source_files=org/phoenixctms/ctsms/excel/MyVisitScheduleExcelDefaultSettings.java,org/phoenixctms/ctsms/excel/MyVisitScheduleExcelLabelCodes.java,org/phoenixctms/ctsms/excel/MyVisitScheduleExcelWriter.java,org/phoenixctms/ctsms/excel/MyVisitScheduleExcelSettingCodes.java diff --git a/templates/properties/settings.properties.j2 b/templates/properties/settings.properties.j2 new file mode 100644 index 0000000..e8c3457 --- /dev/null +++ b/templates/properties/settings.properties.j2 @@ -0,0 +1,9 @@ + +enable_inventory_module={{ enable_inventory_module|default("true", true) }} +enable_staff_module={{ enable_staff_module|default("true", true) }} +enable_course_module={{ enable_course_module|default("true", true) }} +enable_trial_module={{ enable_trial_module|default("true", true) }} +enable_proband_module={{ enable_proband_module|default("true", true) }} +enable_input_field_module={{ enable_input_field_module|default("true", true) }} +enable_user_module={{ enable_user_module|default("true", true) }} +enable_mass_mail_module={{ enable_mass_mail_module|default("true", true) }} diff --git a/clearcache.sh b/templates/shell/clearcache.sh.j2 similarity index 100% rename from clearcache.sh rename to templates/shell/clearcache.sh.j2 diff --git a/templates/shell/ecrfdataexport.j2 b/templates/shell/ecrfdataexport.j2 new file mode 100644 index 0000000..7e293ed --- /dev/null +++ b/templates/shell/ecrfdataexport.j2 @@ -0,0 +1,8 @@ + +{% if ansible_os_family == 'Windows' %} +@echo off +perl C:\ctsms\bulk_processor\CTSMS\BulkProcessor\Projects\ETL\EcrfExporter\process.pl %* +{% else %} +#!/bin/bash +perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/process.pl $* +{% endif %} diff --git a/templates/shell/ecrfdataimport.j2 b/templates/shell/ecrfdataimport.j2 new file mode 100644 index 0000000..2db1c20 --- /dev/null +++ b/templates/shell/ecrfdataimport.j2 @@ -0,0 +1,8 @@ + +{% if ansible_os_family == 'Windows' %} +@echo off +perl C:\ctsms\bulk_processor\CTSMS\BulkProcessor\Projects\ETL\EcrfImporter\process.pl %* +{% else %} +#!/bin/bash +perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/process.pl $* +{% endif %} diff --git a/templates/shell/inquirydataexport.j2 b/templates/shell/inquirydataexport.j2 new file mode 100644 index 0000000..07f480e --- /dev/null +++ b/templates/shell/inquirydataexport.j2 @@ -0,0 +1,8 @@ + +{% if ansible_os_family == 'Windows' %} +@echo off +perl C:\ctsms\bulk_processor\CTSMS\BulkProcessor\Projects\ETL\InquiryExporter\process.pl %* +{% else %} +#!/bin/bash +perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/process.pl $* +{% endif %} diff --git a/tomcat/ctsms.conf b/templates/tomcat/ctsms.conf.j2 similarity index 71% rename from tomcat/ctsms.conf rename to templates/tomcat/ctsms.conf.j2 index 0a7ab73..72572a2 100644 --- a/tomcat/ctsms.conf +++ b/templates/tomcat/ctsms.conf.j2 @@ -1,3 +1,3 @@ [Service] -EnvironmentFile=/etc/default/tomcat9 +EnvironmentFile=/opt/tomcat9 ReadWritePaths=/ctsms/external_files/ /ctsms/bulk_processor/output/ /ctsms/ /tmp/ diff --git a/tomcat/server.xml b/templates/tomcat/server.xml.j2 similarity index 100% rename from tomcat/server.xml rename to templates/tomcat/server.xml.j2 diff --git a/tomcat/workers.properties b/templates/tomcat/workers.properties.j2 similarity index 100% rename from tomcat/workers.properties rename to templates/tomcat/workers.properties.j2 diff --git a/templates/update.j2 b/templates/update.j2 new file mode 100644 index 0000000..c5412ef --- /dev/null +++ b/templates/update.j2 @@ -0,0 +1,12 @@ +#!/bin/bash + +TAG=master +if [[ "$1" != "" ]]; then + TAG="$1" +fi + +wget https://raw.githubusercontent.com/phoenixctms/install-debian/$TAG/upgrade.sh -O ~/upgrade.sh +chmod 744 ~/upgrade.sh + +CURRENT_TIME=$(date "+%Y%m%d%H%M%S") +sudo ~/upgrade.sh "$@" 2>&1 | tee ~/upgrade_$CURRENT_TIME.log \ No newline at end of file diff --git a/upgrade.sh b/upgrade.sh index 088c682..0b5d2b7 100644 --- a/upgrade.sh +++ b/upgrade.sh @@ -99,8 +99,8 @@ sudo -u ctsms psql -U ctsms ctsms < /ctsms/build/ctsms/core/db/schema-up-$TAG.sq ###deploy .war chmod 755 /ctsms/build/ctsms/web/target/ctsms-$VERSION.war -rm /var/lib/tomcat9/webapps/ROOT/ -rf -cp /ctsms/build/ctsms/web/target/ctsms-$VERSION.war /var/lib/tomcat9/webapps/ROOT.war +rm /opt/tomcat9/webapps/ROOT/ -rf +cp /ctsms/build/ctsms/web/target/ctsms-$VERSION.war /opt/tomcat9/webapps/ROOT.war systemctl start tomcat9 ###update bulk-processor @@ -134,8 +134,8 @@ cd /ctsms/build/ctsms mvn -f web/pom.xml -Dmaven.test.skip=true chmod 755 /ctsms/build/ctsms/web/target/ctsms-$VERSION.war systemctl stop tomcat9 -rm /var/lib/tomcat9/webapps/ROOT/ -rf -cp /ctsms/build/ctsms/web/target/ctsms-$VERSION.war /var/lib/tomcat9/webapps/ROOT.war +rm /opt/tomcat9/webapps/ROOT/ -rf +cp /ctsms/build/ctsms/web/target/ctsms-$VERSION.war /opt/tomcat9/webapps/ROOT.war ###setup cron chmod +rwx /ctsms/install/install_cron.sh @@ -145,4 +145,4 @@ chmod +rwx /ctsms/install/install_cron.sh systemctl start tomcat9 systemctl start apache2 #systemctl start cron -echo "Phoenix CTMS $VERSION [$COMMIT] update finished." \ No newline at end of file +echo "Phoenix CTMS $VERSION [$COMMIT] update finished."