From 9b698ddf639dc11ce6afdd9550ae4dc5bb0195a5 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 9 Jan 2025 20:35:37 -0800 Subject: [PATCH 001/217] Create install.yml WIP --- install.yml | 171 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 install.yml diff --git a/install.yml b/install.yml new file mode 100644 index 0000000..9adef8c --- /dev/null +++ b/install.yml @@ -0,0 +1,171 @@ +TAG: main +CONFIG_REPO: +TOKEN: + +XMS: 2048m +XMX: 4096m +XSS: 512k +PERM: 256m + +--- +- name: Install Phoenix CTMS + hosts: all + remote_user: root + become: true + + tasks: + - name: Install General Packages + apt: + pkg: + - sudo + - wget + - curl + - lsb-release + - gnupg + - ntpd + state: latest + update_cache: true + + - name: Sync Time + ansible.builtin.command: ntpd -q -g + + - name: Create 'ctsms' user + ansible.builtin.user: + name: ctsms + shell: /bin/bash + + - name: Prepare CTSMS directory + ansible.builtin.file: + path: /ctsms + state: directory + + - name: Remove bulk_processor if installed + ansible.builtin.file: + path: /ctsms/bulk_processor + state: absent + + - name: Download dbtool.sh + ansible.builtin.get_url: + url: https://raw.githubusercontent.com/phoenixctms/install-debian/$TAG/dbtool.sh + owner: ctsms + group: ctsms + dest: /ctsms/dbtool.sh + mode: '0755' + + - name: Download clearcache.sh + ansible.builtin.get_url: + url: https://raw.githubusercontent.com/phoenixctms/install-debian/$TAG/clearcache.sh + owner: ctsms + group: ctsms + dest: /ctsms/clearcache.sh + mode: '0755' + + - name: Download config-default via basic auth + ansible.builtin.get_url: + url: https://github.com/phoenixctms/config-default/archive/$TAG.tar.gz + dest: /ctsms/config.tar.gz + force_basic_auth: yes + + - name: Extract config.tar.gz into /ctsms + ansible.builtin.unarchive: + src: /ctsms/config.tar.gz + dest: /ctsms/config + extra_opts: + - --strip-components 1 + + - name: Remove /ctsms/config.tar.gz + ansible.builtin.file: + path: /ctsms/config.tar.gz + state: absent + force: true + + - name: Add XMS Value to dbtool.sh + shell: sed -r -i "s/-Xms[^ ]+/-Xms$XMS/" /ctsms/dbtool.sh + + - name: Add XMX Value to dbtool.sh + shell: sed -r -i "s/-Xmx[^ ]+/-Xmx$XMX/" /ctsms/dbtool.sh + + - name: Add XSS Value to dbtool.sh + shell: sed -r -i "s/-Xss[^ ]+/-Xss$XSS/" /ctsms/dbtool.sh + + - name: Add XSS Value to dbtool.sh + shell: sed -r -i "s/-XX:ReservedCodeCacheSize=[^ ]+/-XX:ReservedCodeCacheSize=$PERM/" /ctsms/dbtool.sh + + - name: Download config-default via basic auth + ansible.builtin.get_url: + url: https://api.github.com/repos/phoenixctms/master-data/tarball/$TAG + dest: /ctsms/master-data.tar.gz + + - name: Remove /ctsms/config.tar.gz + ansible.builtin.file: + path: /ctsms/master_data + state: absent + force: true + + - name: Create /ctsms/master_data + ansible.builtin.file: + path: /ctsms/master_data + state: present + force: true + + - name: Extract master-data.tar.gz into /ctsms + ansible.builtin.unarchive: + src: /ctsms/master-data.tar.gz + dest: /ctsms/master_data + extra_opts: + - --strip-components 1 + + - name: Remove master-data.tar.gz + ansible.builtin.file: + path: /ctsms/master_data.tar.gz + state: absent + force: true + + - name: Recursively change ownership of /ctsms + ansible.builtin.file: + path: /ctsms + state: directory + recurse: yes + owner: ctsms + group: ctsms + + - name: Set permissions of /ctsms + ansible.builtin.file: + path: /ctsms + state: directory + mode: '0775' + + - name: Set permissions of /ctsms/external_files + ansible.builtin.file: + path: /ctsms/external_files + state: directory + mode: '0775' + recurse: yes + + - name: Download update via basic auth + ansible.builtin.get_url: + url: https://raw.githubusercontent.com/phoenixctms/install-debian/$TAG/update + owner: ctsms + group: ctsms + dest: /ctsms/update + mode: '0755' + + - name: Install OpenJDK 11 + apt: + pkg: + - default-jdk + state: latest + update_cache: true + + - name: Install tomcat9 + apt: + pkg: + - libservlet3.1-java + - tomcat9 + state: latest + update_cache: true + + - name: Stop service tomcat9, if started + ansible.builtin.service: + name: tomcat9 + state: stopped From e988f9050ab2bea14ad9dd039da3e5bd62ea4e20 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 9 Jan 2025 21:19:39 -0800 Subject: [PATCH 002/217] Update install.yml --- install.yml | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/install.yml b/install.yml index 9adef8c..6e86d0e 100644 --- a/install.yml +++ b/install.yml @@ -15,16 +15,16 @@ PERM: 256m tasks: - name: Install General Packages - apt: - pkg: - - sudo - - wget - - curl - - lsb-release - - gnupg - - ntpd - state: latest - update_cache: true + apt: + pkg: + - sudo + - wget + - curl + - lsb-release + - gnupg + - ntpd + state: latest + update_cache: true - name: Sync Time ansible.builtin.command: ntpd -q -g @@ -34,7 +34,7 @@ PERM: 256m name: ctsms shell: /bin/bash - - name: Prepare CTSMS directory + - name: Prepare /ctsms directory ansible.builtin.file: path: /ctsms state: directory @@ -151,19 +151,18 @@ PERM: 256m mode: '0755' - name: Install OpenJDK 11 - apt: - pkg: - - default-jdk - state: latest - update_cache: true + apt: + pkg: default-jdk + state: latest + update_cache: true - name: Install tomcat9 - apt: - pkg: - - libservlet3.1-java - - tomcat9 - state: latest - update_cache: true + apt: + pkg: + - libservlet3.1-java + - tomcat9 + state: latest + update_cache: true - name: Stop service tomcat9, if started ansible.builtin.service: From 06d33c43a2489fefc7ab832a0590c3cf41ddfc61 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 15 Jan 2025 01:58:07 -0800 Subject: [PATCH 003/217] Update install.yml migrating tomcat install to ansible role --- install.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/install.yml b/install.yml index 6e86d0e..e535660 100644 --- a/install.yml +++ b/install.yml @@ -12,6 +12,16 @@ PERM: 256m hosts: all remote_user: root become: true + vars: + tomcat_major_version: 9 + tomcat_permissions_production: False + tomcat_users: + - username: "ctsms" + password: "ctsms" + roles: "tomcat,admin,manager,manager-gui" + roles: + - java-open-jdk11 + - vantaworks.tomcat tasks: - name: Install General Packages @@ -27,7 +37,7 @@ PERM: 256m update_cache: true - name: Sync Time - ansible.builtin.command: ntpd -q -g + service: name=ntp state=started enabled=yes - name: Create 'ctsms' user ansible.builtin.user: @@ -150,12 +160,6 @@ PERM: 256m dest: /ctsms/update mode: '0755' - - name: Install OpenJDK 11 - apt: - pkg: default-jdk - state: latest - update_cache: true - - name: Install tomcat9 apt: pkg: From 134c8694e05df6d83286633a1ff27b47b6bac2f0 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 18 Jan 2025 18:09:55 -0800 Subject: [PATCH 004/217] adding install-bulk-processor.yml partially working bulk processor module (do not merge) --- install-bulk-processor.yml | 188 +++++++++++++++++++++++++++++++++++++ install.sh | 96 +------------------ install.yml | 8 -- 3 files changed, 190 insertions(+), 102 deletions(-) create mode 100644 install-bulk-processor.yml diff --git a/install-bulk-processor.yml b/install-bulk-processor.yml new file mode 100644 index 0000000..3b98576 --- /dev/null +++ b/install-bulk-processor.yml @@ -0,0 +1,188 @@ +- name: Install bulk-processor + hosts: 127.0.0.1 + connection: local + become: true + 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" + 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: replace in sql files + shell: sed -r -i 's/^\s*()\s*$//' /etc/ImageMagick-6/policy.xml + + - 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 Perl CPU Affinity + community.general.cpanm: + name: + - Sys + - threads + when: ansible_os_family != "Debian" + + - name: Install Perl modules + community.general.cpanm: + name: + - Dancer + - DateTime::Format::Excel + - Spreadsheet::Reader::Format + - Spreadsheet::Reader::ExcelXML + mode: compatibility + + - name: Download bulk processor archive + ansible.builtin.get_url: + url: "{{ bulk_processor_url }}" + dest: "/ctsms/bulk-processor.tar.gz" + validate_certs: false + + - name: Extract bulk processor archive + ansible.builtin.unarchive: + src: "/ctsms/bulk-processor.tar.gz" + dest: "{{ dest_dir }}" + remote_src: true + extra_opts: + - "--strip-components=1" + + - name: Download bulk processor archive + ansible.builtin.get_url: + url: "{{ bulk_processor_url }}" + dest: "/ctsms/bulk-processor.tar.gz" + validate_certs: false + + - name: Extract bulk processor archive + ansible.builtin.unarchive: + src: "/ctsms/bulk-processor.tar.gz" + dest: "{{ dest_dir }}" + remote_src: true + extra_opts: + - "--strip-components=1" + + - name: Run minify.pl scripts + ansible.builtin.command: + cmd: > + perl {{ dest_dir }}/CTSMS/BulkProcessor/Projects/WebApps/minify.pl + --folder={{ dest_dir }}/CTSMS/BulkProcessor/Projects/WebApps/Signup + + - name: Create output directory + ansible.builtin.file: + path: "{{ output_dir }}" + state: directory + owner: "{{ user_group }}" + group: "{{ user_group }}" + mode: "0777" + + - name: Set permissions for bulk processor directory + ansible.builtin.file: + path: "{{ dest_dir }}" + state: directory + recurse: true + owner: "{{ user_group }}" + group: "{{ user_group }}" + mode: "0755" + + - name: Remove bulk processor archive + ansible.builtin.file: + path: "/ctsms/bulk-processor.tar.gz" + state: absent + + - name: Download scripts + ansible.builtin.get_url: + url: "{{ scripts_base_url }}/{{ item }}" + dest: "/ctsms/{{ item }}" + loop: + - ecrfdataexport.sh + - ecrfdataimport.sh + - inquirydataexport.sh + + - name: Set ownership and permissions for scripts + ansible.builtin.file: + path: "/ctsms/{{ item }}" + owner: "{{ user_group }}" + group: "{{ user_group }}" + mode: "0755" + loop: + - ecrfdataexport.sh + - ecrfdataimport.sh + - inquirydataexport.sh diff --git a/install.sh b/install.sh index a65b3a5..3f3c06e 100644 --- a/install.sh +++ b/install.sh @@ -157,100 +157,8 @@ sed -r -i 's/-l 127\.0\.0\.1/-s \/var\/run\/memcached\/memcached.sock -a 0666/' 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 +pipx install --include-deps ansible +ansible-playbook install-bulk-processor.yml ###setup apache2 chmod +rwx /ctsms/install/install_apache.sh diff --git a/install.yml b/install.yml index e535660..e6b6fc9 100644 --- a/install.yml +++ b/install.yml @@ -160,14 +160,6 @@ PERM: 256m dest: /ctsms/update mode: '0755' - - name: Install tomcat9 - apt: - pkg: - - libservlet3.1-java - - tomcat9 - state: latest - update_cache: true - - name: Stop service tomcat9, if started ansible.builtin.service: name: tomcat9 From 19e22b728abe516133488841c6d9980880568912 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 20 Feb 2025 19:20:38 -0800 Subject: [PATCH 005/217] wip: jinja2 migrating certain files to jinja2 templates --- install.yml | 26 +++++-------------- .../cleanjavaclasses.j2 | 0 dbtool.sh => templates/dbtool.j2 | 2 +- .../ecrfdataexport.j2 | 0 4 files changed, 8 insertions(+), 20 deletions(-) rename cleanjavaclasses.sh => templates/cleanjavaclasses.j2 (100%) rename dbtool.sh => templates/dbtool.j2 (99%) rename ecrfdataexport.sh => templates/ecrfdataexport.j2 (100%) diff --git a/install.yml b/install.yml index e6b6fc9..78d2620 100644 --- a/install.yml +++ b/install.yml @@ -54,13 +54,13 @@ PERM: 256m path: /ctsms/bulk_processor state: absent - - name: Download dbtool.sh - ansible.builtin.get_url: - url: https://raw.githubusercontent.com/phoenixctms/install-debian/$TAG/dbtool.sh - owner: ctsms - group: ctsms - dest: /ctsms/dbtool.sh - mode: '0755' + - name: Write dbtool.sh + hosts: all + tasks: + - name: write dbtool.sh using jinja2 + ansible.builtin.template: + src: templates/dbtool.j2 + dest: /ctsms/dbtool.sh - name: Download clearcache.sh ansible.builtin.get_url: @@ -89,18 +89,6 @@ PERM: 256m state: absent force: true - - name: Add XMS Value to dbtool.sh - shell: sed -r -i "s/-Xms[^ ]+/-Xms$XMS/" /ctsms/dbtool.sh - - - name: Add XMX Value to dbtool.sh - shell: sed -r -i "s/-Xmx[^ ]+/-Xmx$XMX/" /ctsms/dbtool.sh - - - name: Add XSS Value to dbtool.sh - shell: sed -r -i "s/-Xss[^ ]+/-Xss$XSS/" /ctsms/dbtool.sh - - - name: Add XSS Value to dbtool.sh - shell: sed -r -i "s/-XX:ReservedCodeCacheSize=[^ ]+/-XX:ReservedCodeCacheSize=$PERM/" /ctsms/dbtool.sh - - name: Download config-default via basic auth ansible.builtin.get_url: url: https://api.github.com/repos/phoenixctms/master-data/tarball/$TAG diff --git a/cleanjavaclasses.sh b/templates/cleanjavaclasses.j2 similarity index 100% rename from cleanjavaclasses.sh rename to templates/cleanjavaclasses.j2 diff --git a/dbtool.sh b/templates/dbtool.j2 similarity index 99% rename from dbtool.sh rename to templates/dbtool.j2 index 0ff9ed8..2529a51 100644 --- a/dbtool.sh +++ b/templates/dbtool.j2 @@ -2,4 +2,4 @@ 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 +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 $* diff --git a/ecrfdataexport.sh b/templates/ecrfdataexport.j2 similarity index 100% rename from ecrfdataexport.sh rename to templates/ecrfdataexport.j2 From 39e1735d4299481601057578de62f5f0d756dd53 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 22 Feb 2025 14:58:43 -0800 Subject: [PATCH 006/217] modifying dbtool for jinja2 template --- playbooks/prepare-ctsms-directory.yml | 26 ++++++++++++++++++++++++ clearcache.sh => templates/clearcache.j2 | 0 templates/{dbtool.j2 => dbtool-linux.j2} | 2 +- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 playbooks/prepare-ctsms-directory.yml rename clearcache.sh => templates/clearcache.j2 (100%) rename templates/{dbtool.j2 => dbtool-linux.j2} (54%) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml new file mode 100644 index 0000000..a12f419 --- /dev/null +++ b/playbooks/prepare-ctsms-directory.yml @@ -0,0 +1,26 @@ +tasks: + + + - name: Prepare /ctsms Directory + 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 dbtool to /ctsms/dbtool.sh + ansible.builtin.template: + src: ./templates/dbtool-linux.j2 + dest: /ctsms/dbtool.sh + owner: ctsms + group: ctsms + mode: '0755' + - name: Template clearcache to /ctsms/clearcache.sh + ansible.builtin.template: + src: ./templates/clearcache.j2 + dest: /ctsms/clearcache.sh + owner: ctsms + group: ctsms + mode: '0755' diff --git a/clearcache.sh b/templates/clearcache.j2 similarity index 100% rename from clearcache.sh rename to templates/clearcache.j2 diff --git a/templates/dbtool.j2 b/templates/dbtool-linux.j2 similarity index 54% rename from templates/dbtool.j2 rename to templates/dbtool-linux.j2 index 2529a51..002d185 100644 --- a/templates/dbtool.j2 +++ b/templates/dbtool-linux.j2 @@ -2,4 +2,4 @@ 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 $* +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{{ ansible_facts['xms'] }} -Xmx{{ ansible_facts['xmx'] }} -Xss{{ ansible_facts['xss'] }} -XX:+UseParallelGC -XX:MaxGCPauseMillis=1500 -XX:GCTimeRatio=9 -XX:+CMSClassUnloadingEnabled -XX:ReservedCodeCacheSize={{ ansible_facts['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 $* From 4599800a07709eb20b5a39963856fbb6e78d4763 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 22 Feb 2025 15:08:42 -0800 Subject: [PATCH 007/217] master-data as submodule adding master-data as submodule --- .gitmodules | 3 +++ master-data | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 master-data diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9a3a0c9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "master-data"] + path = master-data + url = https://github.com/phoenixctms/master-data/ diff --git a/master-data b/master-data new file mode 160000 index 0000000..7caf562 --- /dev/null +++ b/master-data @@ -0,0 +1 @@ +Subproject commit 7caf562273569854fee3a52ba6a38faca60abf1f From 13e3dfcbe9b2b0ecdcd03fc7931b465d74b96a46 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 22 Feb 2025 16:06:17 -0800 Subject: [PATCH 008/217] wip --- install.sh | 195 ------------------ install.yml | 116 +---------- .../install-bulk-processor.yml | 77 ------- playbooks/prepare-ctsms-directory.yml | 32 ++- playbooks/tomcat9.yml | 24 +++ .../ecrfdataimport.j2 | 0 .../inquirydataexport.j2 | 0 {tomcat => templates/tomcat}/ctsms.conf | 0 .../server.xml => templates/tomcat/server.j2 | 0 .../tomcat/workers.j2 | 0 templates/update.j2 | 12 ++ 11 files changed, 71 insertions(+), 385 deletions(-) delete mode 100644 install.sh rename install-bulk-processor.yml => playbooks/install-bulk-processor.yml (60%) create mode 100644 playbooks/tomcat9.yml rename ecrfdataimport.sh => templates/ecrfdataimport.j2 (100%) rename inquirydataexport.sh => templates/inquirydataexport.j2 (100%) rename {tomcat => templates/tomcat}/ctsms.conf (100%) rename tomcat/server.xml => templates/tomcat/server.j2 (100%) rename tomcat/workers.properties => templates/tomcat/workers.j2 (100%) create mode 100644 templates/update.j2 diff --git a/install.sh b/install.sh deleted file mode 100644 index 3f3c06e..0000000 --- a/install.sh +++ /dev/null @@ -1,195 +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 -pipx install --include-deps ansible -ansible-playbook install-bulk-processor.yml - -###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 index 78d2620..0374602 100644 --- a/install.yml +++ b/install.yml @@ -2,17 +2,15 @@ TAG: main CONFIG_REPO: TOKEN: -XMS: 2048m -XMX: 4096m -XSS: 512k -PERM: 256m - ---- - name: Install Phoenix CTMS hosts: all remote_user: root become: true vars: + xms: "2048m" + xmx: "4096m" + xss: "512k" + perm: "256m" tomcat_major_version: 9 tomcat_permissions_production: False tomcat_users: @@ -44,111 +42,7 @@ PERM: 256m name: ctsms shell: /bin/bash - - name: Prepare /ctsms directory - ansible.builtin.file: - path: /ctsms - state: directory - - - name: Remove bulk_processor if installed - ansible.builtin.file: - path: /ctsms/bulk_processor - state: absent - - - name: Write dbtool.sh - hosts: all - tasks: - - name: write dbtool.sh using jinja2 - ansible.builtin.template: - src: templates/dbtool.j2 - dest: /ctsms/dbtool.sh - - - name: Download clearcache.sh - ansible.builtin.get_url: - url: https://raw.githubusercontent.com/phoenixctms/install-debian/$TAG/clearcache.sh - owner: ctsms - group: ctsms - dest: /ctsms/clearcache.sh - mode: '0755' - - - name: Download config-default via basic auth - ansible.builtin.get_url: - url: https://github.com/phoenixctms/config-default/archive/$TAG.tar.gz - dest: /ctsms/config.tar.gz - force_basic_auth: yes - - - name: Extract config.tar.gz into /ctsms - ansible.builtin.unarchive: - src: /ctsms/config.tar.gz - dest: /ctsms/config - extra_opts: - - --strip-components 1 - - - name: Remove /ctsms/config.tar.gz - ansible.builtin.file: - path: /ctsms/config.tar.gz - state: absent - force: true - - - name: Download config-default via basic auth - ansible.builtin.get_url: - url: https://api.github.com/repos/phoenixctms/master-data/tarball/$TAG - dest: /ctsms/master-data.tar.gz - - - name: Remove /ctsms/config.tar.gz - ansible.builtin.file: - path: /ctsms/master_data - state: absent - force: true - - - name: Create /ctsms/master_data - ansible.builtin.file: - path: /ctsms/master_data - state: present - force: true - - - name: Extract master-data.tar.gz into /ctsms - ansible.builtin.unarchive: - src: /ctsms/master-data.tar.gz - dest: /ctsms/master_data - extra_opts: - - --strip-components 1 - - - name: Remove master-data.tar.gz - ansible.builtin.file: - path: /ctsms/master_data.tar.gz - state: absent - force: true - - - name: Recursively change ownership of /ctsms + - name: Prepare /ctsms directory with default-config and master-data ansible.builtin.file: path: /ctsms state: directory - recurse: yes - owner: ctsms - group: ctsms - - - name: Set permissions of /ctsms - ansible.builtin.file: - path: /ctsms - state: directory - mode: '0775' - - - name: Set permissions of /ctsms/external_files - ansible.builtin.file: - path: /ctsms/external_files - state: directory - mode: '0775' - recurse: yes - - - name: Download update via basic auth - ansible.builtin.get_url: - url: https://raw.githubusercontent.com/phoenixctms/install-debian/$TAG/update - owner: ctsms - group: ctsms - dest: /ctsms/update - mode: '0755' - - - name: Stop service tomcat9, if started - ansible.builtin.service: - name: tomcat9 - state: stopped diff --git a/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml similarity index 60% rename from install-bulk-processor.yml rename to playbooks/install-bulk-processor.yml index 3b98576..fc104d7 100644 --- a/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -1,5 +1,4 @@ - name: Install bulk-processor - hosts: 127.0.0.1 connection: local become: true vars: @@ -110,79 +109,3 @@ - Spreadsheet::Reader::Format - Spreadsheet::Reader::ExcelXML mode: compatibility - - - name: Download bulk processor archive - ansible.builtin.get_url: - url: "{{ bulk_processor_url }}" - dest: "/ctsms/bulk-processor.tar.gz" - validate_certs: false - - - name: Extract bulk processor archive - ansible.builtin.unarchive: - src: "/ctsms/bulk-processor.tar.gz" - dest: "{{ dest_dir }}" - remote_src: true - extra_opts: - - "--strip-components=1" - - - name: Download bulk processor archive - ansible.builtin.get_url: - url: "{{ bulk_processor_url }}" - dest: "/ctsms/bulk-processor.tar.gz" - validate_certs: false - - - name: Extract bulk processor archive - ansible.builtin.unarchive: - src: "/ctsms/bulk-processor.tar.gz" - dest: "{{ dest_dir }}" - remote_src: true - extra_opts: - - "--strip-components=1" - - - name: Run minify.pl scripts - ansible.builtin.command: - cmd: > - perl {{ dest_dir }}/CTSMS/BulkProcessor/Projects/WebApps/minify.pl - --folder={{ dest_dir }}/CTSMS/BulkProcessor/Projects/WebApps/Signup - - - name: Create output directory - ansible.builtin.file: - path: "{{ output_dir }}" - state: directory - owner: "{{ user_group }}" - group: "{{ user_group }}" - mode: "0777" - - - name: Set permissions for bulk processor directory - ansible.builtin.file: - path: "{{ dest_dir }}" - state: directory - recurse: true - owner: "{{ user_group }}" - group: "{{ user_group }}" - mode: "0755" - - - name: Remove bulk processor archive - ansible.builtin.file: - path: "/ctsms/bulk-processor.tar.gz" - state: absent - - - name: Download scripts - ansible.builtin.get_url: - url: "{{ scripts_base_url }}/{{ item }}" - dest: "/ctsms/{{ item }}" - loop: - - ecrfdataexport.sh - - ecrfdataimport.sh - - inquirydataexport.sh - - - name: Set ownership and permissions for scripts - ansible.builtin.file: - path: "/ctsms/{{ item }}" - owner: "{{ user_group }}" - group: "{{ user_group }}" - mode: "0755" - loop: - - ecrfdataexport.sh - - ecrfdataimport.sh - - inquirydataexport.sh diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index a12f419..d07bc13 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -1,6 +1,4 @@ tasks: - - - name: Prepare /ctsms Directory ansible.builtin.file: path: /ctsms/ @@ -24,3 +22,33 @@ tasks: owner: ctsms group: ctsms mode: '0755' + - name: Copy master-data to /ctsms/master_data/ + ansible.builtin.copy: + src: ./master-data/ + dest: /ctsms/master_data/ + owner: ctsms + group: ctsms + mode: '0755' + - name: Recursively change ownership of /ctsms/ + ansible.builtin.file: + path: /ctsms/ + state: directory + recurse: yes + owner: ctsms + group: ctsms + mode: '0755' + - 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 + owner: ctsms + group: ctsms + mode: '0755' diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml new file mode 100644 index 0000000..4cc1996 --- /dev/null +++ b/playbooks/tomcat9.yml @@ -0,0 +1,24 @@ +- name: allow tomcat writing to /ctsms/external_files + user: + name: tomcat + groups: ctsms + append: yes +- name: allow ctsms user to load jars from exploded .war + user: + name: ctsms + groups: tomcat,adm + append: yes +- name: Template workers.properties to /etc/tomcat9/workers.properties + ansible.builtin.template: + src: ./templates/tomcat/workers.j2 + dest: /etc/tomcat9/workers.properties + owner: root + group: tomcat + mode: '0640' +- name: Template server.xml to /etc/tomcat9/server.xml + ansible.builtin.template: + src: ./templates/tomcat/workers.j2 + dest: /etc/tomcat9/workers.properties + owner: root + group: tomcat + mode: '0640' diff --git a/ecrfdataimport.sh b/templates/ecrfdataimport.j2 similarity index 100% rename from ecrfdataimport.sh rename to templates/ecrfdataimport.j2 diff --git a/inquirydataexport.sh b/templates/inquirydataexport.j2 similarity index 100% rename from inquirydataexport.sh rename to templates/inquirydataexport.j2 diff --git a/tomcat/ctsms.conf b/templates/tomcat/ctsms.conf similarity index 100% rename from tomcat/ctsms.conf rename to templates/tomcat/ctsms.conf diff --git a/tomcat/server.xml b/templates/tomcat/server.j2 similarity index 100% rename from tomcat/server.xml rename to templates/tomcat/server.j2 diff --git a/tomcat/workers.properties b/templates/tomcat/workers.j2 similarity index 100% rename from tomcat/workers.properties rename to templates/tomcat/workers.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 From d9b7ece6362c41e5e8413198d15f6c6102af46ae Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sun, 11 May 2025 19:58:45 -0700 Subject: [PATCH 009/217] wip --- install.yml | 63 ++++++++------- playbooks/build-phoenix.yml | 79 +++++++++++++++++++ playbooks/install-bulk-processor.yml | 8 +- playbooks/postgres.yml | 23 ++++++ playbooks/prepare-ctsms-directory.yml | 20 ++++- playbooks/tomcat9.yml | 53 ++++++++++++- repl.lisp-repl | 0 .../{clearcache.j2 => bash/clearcache.sh.j2} | 0 .../{dbtool-linux.j2 => bash/dbtool.sh.j2} | 0 ...ydataexport.j2 => inquirydataexport.sh.j2} | 0 .../tomcat/{ctsms.conf => ctsms.conf.j2} | 0 templates/tomcat/{server.j2 => server.xml.j2} | 0 .../{workers.j2 => workers.properties.j2} | 0 13 files changed, 211 insertions(+), 35 deletions(-) create mode 100644 playbooks/build-phoenix.yml create mode 100644 playbooks/postgres.yml create mode 100644 repl.lisp-repl rename templates/{clearcache.j2 => bash/clearcache.sh.j2} (100%) rename templates/{dbtool-linux.j2 => bash/dbtool.sh.j2} (100%) rename templates/{inquirydataexport.j2 => inquirydataexport.sh.j2} (100%) rename templates/tomcat/{ctsms.conf => ctsms.conf.j2} (100%) rename templates/tomcat/{server.j2 => server.xml.j2} (100%) rename templates/tomcat/{workers.j2 => workers.properties.j2} (100%) diff --git a/install.yml b/install.yml index 0374602..a820fc1 100644 --- a/install.yml +++ b/install.yml @@ -1,28 +1,9 @@ -TAG: main -CONFIG_REPO: -TOKEN: - -- name: Install Phoenix CTMS +- name: Install Phoenix CTMS v1.8.2 + gather_facts: false hosts: all - remote_user: root - become: true - vars: - xms: "2048m" - xmx: "4096m" - xss: "512k" - perm: "256m" - tomcat_major_version: 9 - tomcat_permissions_production: False - tomcat_users: - - username: "ctsms" - password: "ctsms" - roles: "tomcat,admin,manager,manager-gui" - roles: - - java-open-jdk11 - - vantaworks.tomcat - tasks: - name: Install General Packages + hosts: all apt: pkg: - sudo @@ -35,14 +16,42 @@ TOKEN: update_cache: true - name: Sync Time + hosts: all service: name=ntp state=started enabled=yes - name: Create 'ctsms' user + hosts: all ansible.builtin.user: name: ctsms - shell: /bin/bash - - name: Prepare /ctsms directory with default-config and master-data - ansible.builtin.file: - path: /ctsms - state: directory + - name: Prepare ctsms directory with default-config and master-data + hosts: all + ansible.builtin.import_playbook: playbooks/prepare-ctsms-directory.yml + + - name: Install OpenJDK 11 + ansible.builtin.include_role: + name: openjdk + + - name: Install tomcat9 + hosts: all + ansible.builtin.import_playbook: playbooks/tomcat9.yml + + - name: Build phoenix + hosts: all + ansible.builtin.import_playbook: playbooks/build-phoenix.yml + + # - name: Install Postgres 13 + # + # - name: Enable SSH and database remote access + # + # - name: deploy .war + # + # - name: install bulk-bulk_processor + # + # - name: setup apache2 + # - name: initialize database + # - name: setup cron + # - name: setup logrotate + # - name: render workflow diagrams + # + # - name: ready diff --git a/playbooks/build-phoenix.yml b/playbooks/build-phoenix.yml new file mode 100644 index 0000000..dd9f030 --- /dev/null +++ b/playbooks/build-phoenix.yml @@ -0,0 +1,79 @@ +- 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/ + +- name: Read application.version from pom.xml + command: grep -oP '\K[^<]+' /ctsms/build/ctsms/pom.xml + register: app_version + +- name: Get short git commit hash + command: git rev-parse --short HEAD + args: + chdir: /ctsms/build/ctsms + register: git_commit + +- name: Generate a UUID + command: cat /proc/sys/kernel/random/uuid + register: uuid_output + +- name: Update application.version in pom.xml with commit hash + replace: + path: /ctsms/build/ctsms/pom.xml + regexp: '()[^<]+()' + replace: '\1{{ app_version.stdout }} [{{ git_commit.stdout }}]\2' + backup: yes + +- name: Update application.uuid tag with generated UUID + replace: + path: /ctsms/build/ctsms/pom.xml + regexp: '' + replace: '{{ uuid_output.stdout }}' + backup: yes + +- 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: Check if .war file exists + stat: + path: "/ctsms/build/ctsms/web/target/ctsms-{{ app_version.stdout }}.war" + register: war_file + +- 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/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index fc104d7..dcc96fc 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -82,8 +82,12 @@ update_cache: yes force: yes - - name: replace in sql files - shell: sed -r -i 's/^\s*()\s*$//' /etc/ImageMagick-6/policy.xml + - 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: diff --git a/playbooks/postgres.yml b/playbooks/postgres.yml new file mode 100644 index 0000000..d8a5ca5 --- /dev/null +++ b/playbooks/postgres.yml @@ -0,0 +1,23 @@ + + +- name: Create PostgreSQL user + community.postgresql.postgresql_user: + name: ctsms + password: ctsms + login_user: postgres + +- name: Create PostgreSQL database with correct owner + community.postgresql.postgresql_db: + name: ctsms + owner: ctsms + login_user: postgres + +- name: Grant all privileges on the database to the user + community.postgresql.postgresql_privs: + db: ctsms + roles: ctsms + type: database + privs: ALL + objs: ctsms + grant_option: no + login_user: postgres diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index d07bc13..07bfa51 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -1,5 +1,5 @@ tasks: - - name: Prepare /ctsms Directory + - name: Create /ctsms ansible.builtin.file: path: /ctsms/ state: directory @@ -10,18 +10,32 @@ tasks: state: absent - name: Template dbtool to /ctsms/dbtool.sh ansible.builtin.template: - src: ./templates/dbtool-linux.j2 + src: ./templates/dbtool.sh.j2 dest: /ctsms/dbtool.sh owner: ctsms group: ctsms mode: '0755' - name: Template clearcache to /ctsms/clearcache.sh ansible.builtin.template: - src: ./templates/clearcache.j2 + src: ./templates/bash/clearcache.sh.j2 dest: /ctsms/clearcache.sh owner: ctsms group: ctsms mode: '0755' + - name: Copy config-default to /ctsms/config-default/ + ansible.builtin.copy: + src: ./master-data/ + dest: /ctsms/config-default/ + owner: ctsms + group: ctsms + mode: '0755' + - name: Template dbtool to /ctsms/dbtool.sh + ansible.builtin.template: + src: ./templates/bash/dbtool.sh.j2 + dest: /ctsms/dbtool.sh + owner: ctsms + group: ctsms + mode: '0755' - name: Copy master-data to /ctsms/master_data/ ansible.builtin.copy: src: ./master-data/ diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index 4cc1996..4941ea2 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -1,3 +1,16 @@ +- name: install libservlet3.1-java + ansible.builtin.apt: + name: libservlet3.1-java + state: present + +- name: install tomcat9 + ansible.builtin.include_role: + name: vantaworks.tomcat + tomcat_major_version: 9 +- name: Stop service tomcat9, if started + ansible.builtin.service: + name: tomcat9 + state: stopped - name: allow tomcat writing to /ctsms/external_files user: name: tomcat @@ -10,15 +23,49 @@ append: yes - name: Template workers.properties to /etc/tomcat9/workers.properties ansible.builtin.template: - src: ./templates/tomcat/workers.j2 + src: ./templates/tomcat/workers.properties.j2 dest: /etc/tomcat9/workers.properties owner: root group: tomcat mode: '0640' - name: Template server.xml to /etc/tomcat9/server.xml ansible.builtin.template: - src: ./templates/tomcat/workers.j2 - dest: /etc/tomcat9/workers.properties + src: ./templates/tomcat/server.xml.j2 + dest: /etc/tomcat9/server.xml owner: root group: tomcat mode: '0640' + +- 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 + +- name: Add CTSMS_PROPERTIES to /etc/default/tomcat9 + lineinfile: + path: /etc/default/tomcat9 + line: 'CTSMS_PROPERTIES=/ctsms/properties' + insertafter: EOF + +- name: Add CTSMS_JAVA to /etc/default/tomcat9 + lineinfile: + path: /etc/default/tomcat9 + line: 'CTSMS_JAVA=/ctsms/java' + insertafter: EOF + +- name: Ensure tomcat9.service.d directory exists + file: + path: /etc/systemd/system/tomcat9.service.d + state: directory + mode: '0755' + +- name: Template ctsms.conf to /etc/tomcat9/server.xml + ansible.builtin.template: + src: ./templates/tomcat/workers.j2 + dest: /etc/systemd/system/tomcat9.service.d/ctsms.conf + owner: root + group: tomcat + mode: '0644' diff --git a/repl.lisp-repl b/repl.lisp-repl new file mode 100644 index 0000000..e69de29 diff --git a/templates/clearcache.j2 b/templates/bash/clearcache.sh.j2 similarity index 100% rename from templates/clearcache.j2 rename to templates/bash/clearcache.sh.j2 diff --git a/templates/dbtool-linux.j2 b/templates/bash/dbtool.sh.j2 similarity index 100% rename from templates/dbtool-linux.j2 rename to templates/bash/dbtool.sh.j2 diff --git a/templates/inquirydataexport.j2 b/templates/inquirydataexport.sh.j2 similarity index 100% rename from templates/inquirydataexport.j2 rename to templates/inquirydataexport.sh.j2 diff --git a/templates/tomcat/ctsms.conf b/templates/tomcat/ctsms.conf.j2 similarity index 100% rename from templates/tomcat/ctsms.conf rename to templates/tomcat/ctsms.conf.j2 diff --git a/templates/tomcat/server.j2 b/templates/tomcat/server.xml.j2 similarity index 100% rename from templates/tomcat/server.j2 rename to templates/tomcat/server.xml.j2 diff --git a/templates/tomcat/workers.j2 b/templates/tomcat/workers.properties.j2 similarity index 100% rename from templates/tomcat/workers.j2 rename to templates/tomcat/workers.properties.j2 From 15e6310ad48185291b747ddb98bb1036e838c1aa Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 12 May 2025 15:45:07 -0700 Subject: [PATCH 010/217] Minor changes --- apache/blocklist.conf | 15 +++++++++------ playbooks/init-database.yml | 0 playbooks/prepare-ctsms-directory.yml | 9 +++++++++ playbooks/tomcat9.yml | 5 +++++ 4 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 playbooks/init-database.yml diff --git a/apache/blocklist.conf b/apache/blocklist.conf index e1bffa7..32ea3d5 100644 --- a/apache/blocklist.conf +++ b/apache/blocklist.conf @@ -6,7 +6,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 +69,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 +95,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 +134,10 @@ 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 + + diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml new file mode 100644 index 0000000..e69de29 diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 07bfa51..dc83f40 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -4,10 +4,12 @@ tasks: path: /ctsms/ state: directory mode: '0755' + - name: Remove /ctsms/bulk_processor ansible.builtin.file: path: /ctsms/bulk_processor/ state: absent + - name: Template dbtool to /ctsms/dbtool.sh ansible.builtin.template: src: ./templates/dbtool.sh.j2 @@ -15,6 +17,7 @@ tasks: owner: ctsms group: ctsms mode: '0755' + - name: Template clearcache to /ctsms/clearcache.sh ansible.builtin.template: src: ./templates/bash/clearcache.sh.j2 @@ -22,6 +25,7 @@ tasks: owner: ctsms group: ctsms mode: '0755' + - name: Copy config-default to /ctsms/config-default/ ansible.builtin.copy: src: ./master-data/ @@ -29,6 +33,7 @@ tasks: owner: ctsms group: ctsms mode: '0755' + - name: Template dbtool to /ctsms/dbtool.sh ansible.builtin.template: src: ./templates/bash/dbtool.sh.j2 @@ -36,6 +41,7 @@ tasks: owner: ctsms group: ctsms mode: '0755' + - name: Copy master-data to /ctsms/master_data/ ansible.builtin.copy: src: ./master-data/ @@ -43,6 +49,7 @@ tasks: owner: ctsms group: ctsms mode: '0755' + - name: Recursively change ownership of /ctsms/ ansible.builtin.file: path: /ctsms/ @@ -51,6 +58,7 @@ tasks: owner: ctsms group: ctsms mode: '0755' + - name: Recursively change ownership of /ctsms/external_files ansible.builtin.file: path: /ctsms/external_files @@ -59,6 +67,7 @@ tasks: owner: ctsms group: ctsms mode: '0755' + - name: Template update to /ctsms/update ansible.builtin.template: src: ./templates/update.j2 diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index 4941ea2..8c7ab6d 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -7,20 +7,24 @@ ansible.builtin.include_role: name: vantaworks.tomcat tomcat_major_version: 9 + - name: Stop service tomcat9, if started ansible.builtin.service: name: tomcat9 state: stopped + - name: allow tomcat writing to /ctsms/external_files user: name: tomcat groups: ctsms append: yes + - name: allow ctsms user to load jars from exploded .war user: name: ctsms groups: tomcat,adm append: yes + - name: Template workers.properties to /etc/tomcat9/workers.properties ansible.builtin.template: src: ./templates/tomcat/workers.properties.j2 @@ -28,6 +32,7 @@ owner: root group: tomcat mode: '0640' + - name: Template server.xml to /etc/tomcat9/server.xml ansible.builtin.template: src: ./templates/tomcat/server.xml.j2 From 8a141ec044847dbe5d59d9c9c3d45f427cbde0f6 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 12 May 2025 16:56:32 -0700 Subject: [PATCH 011/217] migrating settings to jinja templates --- README.md | 35 +++++++- install.yml | 8 +- templates/apache/00_ctsms_http.conf.j2 | 11 +++ templates/apache/00_ctsms_https.conf.j2 | 81 +++++++++++++++++++ templates/apache/ports.conf.j2 | 23 ++++++ .../ctsms-applicationcontext.properties.j2 | 15 ++++ .../ctsms-cv-pdf-settings.properties.j2 | 4 + .../properties/ctsms-dbtool.properties.j2 | 6 ++ ...visitschedule-excel-settings.properties.j2 | 4 + templates/properties/settings.properties.j2 | 9 +++ 10 files changed, 191 insertions(+), 5 deletions(-) create mode 100644 templates/apache/00_ctsms_http.conf.j2 create mode 100644 templates/apache/00_ctsms_https.conf.j2 create mode 100644 templates/apache/ports.conf.j2 create mode 100644 templates/properties/ctsms-applicationcontext.properties.j2 create mode 100644 templates/properties/ctsms-cv-pdf-settings.properties.j2 create mode 100644 templates/properties/ctsms-dbtool.properties.j2 create mode 100644 templates/properties/ctsms-visitschedule-excel-settings.properties.j2 create mode 100644 templates/properties/settings.properties.j2 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/install.yml b/install.yml index a820fc1..47c59fa 100644 --- a/install.yml +++ b/install.yml @@ -28,9 +28,9 @@ hosts: all ansible.builtin.import_playbook: playbooks/prepare-ctsms-directory.yml - - name: Install OpenJDK 11 - ansible.builtin.include_role: - name: openjdk + - name: Install OpenJDK + ansible.builtin.apt: + - openjdk - name: Install tomcat9 hosts: all @@ -46,7 +46,7 @@ # # - name: deploy .war # - # - name: install bulk-bulk_processor + # - name: install bulk_processor # # - name: setup apache2 # - name: initialize database diff --git a/templates/apache/00_ctsms_http.conf.j2 b/templates/apache/00_ctsms_http.conf.j2 new file mode 100644 index 0000000..f08acba --- /dev/null +++ b/templates/apache/00_ctsms_http.conf.j2 @@ -0,0 +1,11 @@ + + ServerName localhost:80 + + RewriteEngine On + RewriteCond %{HTTPS} off + RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} + + HostnameLookups Off + UseCanonicalName Off + ServerSignature On + diff --git a/templates/apache/00_ctsms_https.conf.j2 b/templates/apache/00_ctsms_https.conf.j2 new file mode 100644 index 0000000..dc602b5 --- /dev/null +++ b/templates/apache/00_ctsms_https.conf.j2 @@ -0,0 +1,81 @@ +# +# + + ServerName localhost: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 /var/lib/tomcat9/webapps/ROOT/resources + + #Options FollowSymLinks + #allow from all + AllowOverride None + Require all granted + + Alias / /var/lib/tomcat9/webapps/ROOT/ + + #Options FollowSymLinks + #allow from all + AllowOverride None + Require all granted + + + + #AllowOverride None + deny from all + + + DocumentRoot /var/lib/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 + #SSLCertificateChainFile /etc/apache2/ssl.crt/ComodoIntermediateCertificates.crt + + +# +# diff --git a/templates/apache/ports.conf.j2 b/templates/apache/ports.conf.j2 new file mode 100644 index 0000000..240ceb1 --- /dev/null +++ b/templates/apache/ports.conf.j2 @@ -0,0 +1,23 @@ +# 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 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-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) }} From 8e0b572c6e97766f8ba692a165232325522b9138 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 12 May 2025 17:06:03 -0700 Subject: [PATCH 012/217] migrating other apache files to jinja2 --- apache/blocklist.conf => templates/apache/blocklist.conf.j2 | 0 apache/jk.conf => templates/apache/jk.conf.j2 | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename apache/blocklist.conf => templates/apache/blocklist.conf.j2 (100%) rename apache/jk.conf => templates/apache/jk.conf.j2 (100%) diff --git a/apache/blocklist.conf b/templates/apache/blocklist.conf.j2 similarity index 100% rename from apache/blocklist.conf rename to templates/apache/blocklist.conf.j2 diff --git a/apache/jk.conf b/templates/apache/jk.conf.j2 similarity index 100% rename from apache/jk.conf rename to templates/apache/jk.conf.j2 From b7731ea5053f794a2591d66d1ec53c50bcada77c Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 12 May 2025 21:57:04 -0700 Subject: [PATCH 013/217] adding windows compatibility to shell jinja templates --- inventories/local/hosts | 1 + templates/ecrfdataexport.j2 | 8 +++++++- templates/ecrfdataimport.j2 | 8 +++++++- templates/inquirydataexport.sh.j2 | 7 ++++++- 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 inventories/local/hosts diff --git a/inventories/local/hosts b/inventories/local/hosts new file mode 100644 index 0000000..2302eda --- /dev/null +++ b/inventories/local/hosts @@ -0,0 +1 @@ +localhost ansible_connection=local diff --git a/templates/ecrfdataexport.j2 b/templates/ecrfdataexport.j2 index d136101..7e293ed 100644 --- a/templates/ecrfdataexport.j2 +++ b/templates/ecrfdataexport.j2 @@ -1,2 +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 $* \ No newline at end of file +perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/process.pl $* +{% endif %} diff --git a/templates/ecrfdataimport.j2 b/templates/ecrfdataimport.j2 index 554261a..2db1c20 100644 --- a/templates/ecrfdataimport.j2 +++ b/templates/ecrfdataimport.j2 @@ -1,2 +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 $* \ No newline at end of file +perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/process.pl $* +{% endif %} diff --git a/templates/inquirydataexport.sh.j2 b/templates/inquirydataexport.sh.j2 index 9014f30..8232463 100644 --- a/templates/inquirydataexport.sh.j2 +++ b/templates/inquirydataexport.sh.j2 @@ -1,2 +1,7 @@ +{% 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 $* \ No newline at end of file +perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/process.pl $* +{% endif %} From 98f6fc8f6863841daab4caebc085f18f528f8561 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 12 May 2025 23:07:34 -0700 Subject: [PATCH 014/217] addming more steps --- install.yml | 23 ++- playbooks/build-phoenix.yml | 136 +++++++++--------- playbooks/deploy-war.yml | 19 +++ playbooks/enable-remote-access.yml | 40 ++++++ playbooks/install-bulk-processor.yml | 88 +++++++++++- playbooks/install-postgres.yml | 96 +++++++++++++ playbooks/postgres.yml | 23 --- playbooks/prepare-ctsms-directory.yml | 2 +- templates/{bash => shell}/clearcache.sh.j2 | 0 templates/{bash => shell}/dbtool.sh.j2 | 0 templates/{ => shell}/ecrfdataexport.j2 | 0 templates/{ => shell}/ecrfdataimport.j2 | 0 .../inquirydataexport.j2} | 1 + 13 files changed, 329 insertions(+), 99 deletions(-) create mode 100644 playbooks/deploy-war.yml create mode 100644 playbooks/enable-remote-access.yml create mode 100644 playbooks/install-postgres.yml delete mode 100644 playbooks/postgres.yml rename templates/{bash => shell}/clearcache.sh.j2 (100%) rename templates/{bash => shell}/dbtool.sh.j2 (100%) rename templates/{ => shell}/ecrfdataexport.j2 (100%) rename templates/{ => shell}/ecrfdataimport.j2 (100%) rename templates/{inquirydataexport.sh.j2 => shell/inquirydataexport.j2} (99%) diff --git a/install.yml b/install.yml index 47c59fa..9bd1c23 100644 --- a/install.yml +++ b/install.yml @@ -40,13 +40,22 @@ hosts: all ansible.builtin.import_playbook: playbooks/build-phoenix.yml - # - name: Install Postgres 13 - # - # - name: Enable SSH and database remote access - # - # - name: deploy .war - # - # - name: install bulk_processor + - name: Install Postgres 13 + hosts: all + ansible.builtin.import_playbook: playbooks/install-postgres.yml + + - name: Enable SSH and database remote access + hosts: all + ansible.builtin.import_playbook: playbooks/enable-remote-access.yml + + - name: deploy .war + hosts: all + ansible.builtin.import_playbook: playbooks/deploy-war.yml + + - name: install bulk_processor + hosts: all + ansible.builtin.import_playbook: playbooks/install-bulk-processor.yml + # # - name: setup apache2 # - name: initialize database diff --git a/playbooks/build-phoenix.yml b/playbooks/build-phoenix.yml index dd9f030..d163890 100644 --- a/playbooks/build-phoenix.yml +++ b/playbooks/build-phoenix.yml @@ -1,79 +1,83 @@ -- name: install maven - ansible.builtin.apt: - name: maven - state: present +- name: Build Phoenix CTMS + connection: local + become: true + tasks: + - name: install maven + ansible.builtin.apt: + name: maven + state: present -- name: Remove /ctsms/build - ansible.builtin.file: - path: /ctsms/build - state: absent + - 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: 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/ + - name: Clone Phoenix repository + ansible.builtin.git: + repo: 'https://github.com/phoenixctms/ctsms.git' + dest: /ctsms/build/ -- name: Read application.version from pom.xml - command: grep -oP '\K[^<]+' /ctsms/build/ctsms/pom.xml - register: app_version + - name: Read application.version from pom.xml + command: grep -oP '\K[^<]+' /ctsms/build/ctsms/pom.xml + register: app_version -- name: Get short git commit hash - command: git rev-parse --short HEAD - args: - chdir: /ctsms/build/ctsms - register: git_commit + - name: Get short git commit hash + command: git rev-parse --short HEAD + args: + chdir: /ctsms/build/ctsms + register: git_commit -- name: Generate a UUID - command: cat /proc/sys/kernel/random/uuid - register: uuid_output + - name: Generate a UUID + command: cat /proc/sys/kernel/random/uuid + register: uuid_output -- name: Update application.version in pom.xml with commit hash - replace: - path: /ctsms/build/ctsms/pom.xml - regexp: '()[^<]+()' - replace: '\1{{ app_version.stdout }} [{{ git_commit.stdout }}]\2' - backup: yes + - name: Update application.version in pom.xml with commit hash + replace: + path: /ctsms/build/ctsms/pom.xml + regexp: '()[^<]+()' + replace: '\1{{ app_version.stdout }} [{{ git_commit.stdout }}]\2' + backup: yes -- name: Update application.uuid tag with generated UUID - replace: - path: /ctsms/build/ctsms/pom.xml - regexp: '' - replace: '{{ uuid_output.stdout }}' - backup: yes + - name: Update application.uuid tag with generated UUID + replace: + path: /ctsms/build/ctsms/pom.xml + regexp: '' + replace: '{{ uuid_output.stdout }}' + backup: yes -- 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: 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: Check if .war file exists - stat: - path: "/ctsms/build/ctsms/web/target/ctsms-{{ app_version.stdout }}.war" - register: war_file + - name: Check if .war file exists + stat: + path: "/ctsms/build/ctsms/web/target/ctsms-{{ app_version.stdout }}.war" + register: war_file -- 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: 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 (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 + - 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..37ce7be --- /dev/null +++ b/playbooks/deploy-war.yml @@ -0,0 +1,19 @@ +- name: Deploy .war + connection: local + become: true + tasks: + - name: Change file ownership, group and permissions + ansible.builtin.file: + path: /ctsms/build/ctsms/web/target/ctsms-{{ version }}.war + mode: '0755' + + - name: Remove /ctsms/bulk_processor + ansible.builtin.file: + path: /var/lib/tomcat9/webapps/ROOT/ + state: absent + + - name: Copy .war to Tomcat directory + ansible.builtin.copy: + src: /ctsms/build/ctsms/web/target/ctsms-{{ version }}.war + dest: /var/lib/tomcat9/webapps/ROOT.war + mode: '0755' diff --git a/playbooks/enable-remote-access.yml b/playbooks/enable-remote-access.yml new file mode 100644 index 0000000..76fd773 --- /dev/null +++ b/playbooks/enable-remote-access.yml @@ -0,0 +1,40 @@ +- name: Install Postgres 13 + connection: local + become: true + tasks: + - name: install ssh + ansible.builtin.apt: + name: ssh + state: present + + - name: Set listen_addresses in postgresql.conf + ansible.builtin.lineinfile: + path: /etc/postgresql/13/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/13/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/13/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/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index dcc96fc..cabc8e9 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -98,14 +98,14 @@ force: yes when: ansible_os_family == "Debian" - - name: Install Perl CPU Affinity + - name: Install sys, threads from CPANM community.general.cpanm: name: - Sys - threads when: ansible_os_family != "Debian" - - name: Install Perl modules + - name: Install Perl modules from CPANM community.general.cpanm: name: - Dancer @@ -113,3 +113,87 @@ - Spreadsheet::Reader::Format - 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: 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: Run minify.pl on Signup folder + ansible.builtin.command: + cmd: > + perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl + --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup + + - 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.file: + path: /ctsms/bulk_processor + state: directory + recurse: true + owner: ctsms + group: ctsms + + - name: Set permissions 0755 on /ctsms/bulk_processor + ansible.builtin.file: + path: /ctsms/bulk_processor + state: directory + recurse: true + mode: '0755' + + - name: Set permissions 0777 on /ctsms/bulk_processor/output + ansible.builtin.file: + path: /ctsms/bulk_processor/output + state: directory + recurse: true + mode: '0777' + + - 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/ecrfdataexport.j2 + dest: /ctsms/ecrfdataexport.sh + owner: ctsms + group: ctsms + mode: '0755' + + - name: Template ecrfdataeimport.sh to /ctsms/ + ansible.builtin.template: + src: ./templates/ecrfdataimport.j2 + dest: /ctsms/ecrfdataimport.sh + owner: ctsms + group: ctsms + mode: '0755' + + - name: Template inquirydataexport.sh to /ctsms/ + ansible.builtin.template: + src: ./templates/inquirydataexport.j2 + dest: /ctsms/inquirydataexport.sh + owner: ctsms + group: ctsms + mode: '0755' diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml new file mode 100644 index 0000000..9a993b2 --- /dev/null +++ b/playbooks/install-postgres.yml @@ -0,0 +1,96 @@ +- name: Install Postgres 13 + connection: local + become: true + vars: + db_name: 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: Create PostgreSQL user + community.postgresql.postgresql_user: + name: "{{ db_name }}" + password: "{{ db_password }}" + login_user: postgres + notify: Restart PostgreSQL + + - name: Create PostgreSQL database with correct owner + community.postgresql.postgresql_db: + name: ctsms + owner: ctsms + login_user: postgres + notify: Restart PostgreSQL + + - name: Grant all privileges on the database to the user + community.postgresql.postgresql_privs: + db: ctsms + roles: ctsms + type: database + privs: ALL + objs: ctsms + grant_option: no + login_user: postgres + notify: Restart PostgreSQL + + - name: Run dbtool.sql as postgres + community.postgresql.postgresql_script: + db: "{{ db_name }}" + login_user: postgres + executable: psql + path: "{{ dbtool_sql_path }}" + notify: Restart PostgreSQL + + - name: Run schema-create.sql as ctsms + community.postgresql.postgresql_script: + db: "{{ db_name }}" + login_user: ctsms + executable: psql + path: "{{ schema_create_sql_path }}" + notify: Restart PostgreSQL + + - name: Run index-create.sql as ctsms + community.postgresql.postgresql_script: + db: "{{ db_name }}" + login_user: ctsms + executable: psql + path: "{{ index_create_sql_path }}" + notify: Restart PostgreSQL + + - name: Run schema-set-version.sql as ctsms + community.postgresql.postgresql_script: + db: "{{ db_name }}" + login_user: ctsms + executable: psql + path: "{{ schema_set_version_sql_path }}" + notify: Restart PostgreSQL + +### +### Any custom scripts needing to add to the database should be invoked here. +### + + - name: Set join_collapse_limit to 1 in postgresql.conf + ansible.builtin.replace: + path: /etc/postgresql/13/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/postgres.yml b/playbooks/postgres.yml deleted file mode 100644 index d8a5ca5..0000000 --- a/playbooks/postgres.yml +++ /dev/null @@ -1,23 +0,0 @@ - - -- name: Create PostgreSQL user - community.postgresql.postgresql_user: - name: ctsms - password: ctsms - login_user: postgres - -- name: Create PostgreSQL database with correct owner - community.postgresql.postgresql_db: - name: ctsms - owner: ctsms - login_user: postgres - -- name: Grant all privileges on the database to the user - community.postgresql.postgresql_privs: - db: ctsms - roles: ctsms - type: database - privs: ALL - objs: ctsms - grant_option: no - login_user: postgres diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index dc83f40..82a9655 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -67,7 +67,7 @@ tasks: owner: ctsms group: ctsms mode: '0755' - + - name: Template update to /ctsms/update ansible.builtin.template: src: ./templates/update.j2 diff --git a/templates/bash/clearcache.sh.j2 b/templates/shell/clearcache.sh.j2 similarity index 100% rename from templates/bash/clearcache.sh.j2 rename to templates/shell/clearcache.sh.j2 diff --git a/templates/bash/dbtool.sh.j2 b/templates/shell/dbtool.sh.j2 similarity index 100% rename from templates/bash/dbtool.sh.j2 rename to templates/shell/dbtool.sh.j2 diff --git a/templates/ecrfdataexport.j2 b/templates/shell/ecrfdataexport.j2 similarity index 100% rename from templates/ecrfdataexport.j2 rename to templates/shell/ecrfdataexport.j2 diff --git a/templates/ecrfdataimport.j2 b/templates/shell/ecrfdataimport.j2 similarity index 100% rename from templates/ecrfdataimport.j2 rename to templates/shell/ecrfdataimport.j2 diff --git a/templates/inquirydataexport.sh.j2 b/templates/shell/inquirydataexport.j2 similarity index 99% rename from templates/inquirydataexport.sh.j2 rename to templates/shell/inquirydataexport.j2 index 8232463..07f480e 100644 --- a/templates/inquirydataexport.sh.j2 +++ b/templates/shell/inquirydataexport.j2 @@ -1,3 +1,4 @@ + {% if ansible_os_family == 'Windows' %} @echo off perl C:\ctsms\bulk_processor\CTSMS\BulkProcessor\Projects\ETL\InquiryExporter\process.pl %* From cefeb8d4fa9b9fa7db5f302b7baee7bce487cc87 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 12 May 2025 23:52:00 -0700 Subject: [PATCH 015/217] all logic ported minus database setup --- install.yml | 27 +++++- playbooks/install-cron.yml | 27 ++++++ playbooks/install-memcached.yml | 36 +++++++ playbooks/render-workflow-diagrams.yml | 36 +++++++ playbooks/setup-apache2.yml | 96 +++++++++++++++++++ templates/crontab/ctsms.j2 | 33 +++++++ templates/crontab/my_department.j2 | 35 +++++++ .../ctsms => templates/logrotate/ctsms.j2 | 2 +- 8 files changed, 286 insertions(+), 6 deletions(-) create mode 100644 playbooks/install-cron.yml create mode 100644 playbooks/install-memcached.yml create mode 100644 playbooks/render-workflow-diagrams.yml create mode 100644 playbooks/setup-apache2.yml create mode 100644 templates/crontab/ctsms.j2 create mode 100644 templates/crontab/my_department.j2 rename logrotate/ctsms => templates/logrotate/ctsms.j2 (97%) diff --git a/install.yml b/install.yml index 9bd1c23..ab8ccd8 100644 --- a/install.yml +++ b/install.yml @@ -17,7 +17,7 @@ - name: Sync Time hosts: all - service: name=ntp state=started enabled=yes + ansible.builtin.service: name=ntp state=started enabled=yes - name: Create 'ctsms' user hosts: all @@ -52,15 +52,32 @@ hosts: all ansible.builtin.import_playbook: playbooks/deploy-war.yml + - name: install memcached + hosts: all + ansible.builtin.import_playbook: playbooks/install-memcached.yml + - name: install bulk_processor hosts: all ansible.builtin.import_playbook: playbooks/install-bulk-processor.yml - # - # - name: setup apache2 + - name: setup apache2 + hosts: all + ansible.builtin.import_playbook: playbooks/setup-apache2.yml + # - name: initialize database - # - name: setup cron - # - name: setup logrotate + + - name: install cron + hosts: all + ansible.builtin.import_playbook: playbooks/install-cron.yml + + - name: Setup logrotate + ansible.builtin.template: + src: ./templates/logrotate/ctsms.j2 + dest: /etc/logrotate.d/ctsms + owner: root + group: wheel + mode: "0644" + # - name: render workflow diagrams # # - name: ready diff --git a/playbooks/install-cron.yml b/playbooks/install-cron.yml new file mode 100644 index 0000000..68d03e1 --- /dev/null +++ b/playbooks/install-cron.yml @@ -0,0 +1,27 @@ +- name: Install cron + connection: local + become: true + tasks: + - name: Setup /etc/cron.d/ctsms + ansible.builtin.template: + src: ./templates/crontab/ctsms.j2 + dest: /etc/logrotate.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/logrotate.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..c55a2ab --- /dev/null +++ b/playbooks/install-memcached.yml @@ -0,0 +1,36 @@ +- name: Install memcached + connection: local + become: true + 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/render-workflow-diagrams.yml b/playbooks/render-workflow-diagrams.yml new file mode 100644 index 0000000..c81fc2c --- /dev/null +++ b/playbooks/render-workflow-diagrams.yml @@ -0,0 +1,36 @@ +- name: Run render.sh + ansible.builtin.command: + cmd: ./render.sh + 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: tomcat9 + state: stopped + +- name: Remove exploded ROOT webapp + ansible.builtin.file: + path: /var/lib/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: /var/lib/tomcat9/webapps/ROOT.war + mode: '0644' + remote_src: true + +- name: Start Tomcat service + ansible.builtin.service: + name: tomcat9 + state: started diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml new file mode 100644 index 0000000..0786920 --- /dev/null +++ b/playbooks/setup-apache2.yml @@ -0,0 +1,96 @@ +- name: Install Apache2 + connection: local + become: true + vars: + certificate: "self-signed" + cert_subject: "/C=AT/ST=Austria/L=Graz/O=phoenix/CN={{ ansible_hostname }}" + tasks: + - name: Install Apache and required modules + ansible.builtin.apt: + name: + - apache2 + - libapache2-mod-jk + - libapache2-mod-fcgid + state: present + update_cache: true + notify: Restart Apache2 + + - name: Add www-data to tomcat and ctsms groups + ansible.builtin.user: + name: www-data + groups: + - tomcat + - ctsms + append: true + notify: Restart Apache2 + + - 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: Restart Apache2 + + - 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: Restart Apache2 + + - name: Template blocklist.conf to /etc/apache2/ + ansible.builtin.template: + src: ./templates/apache/blocklist.conf.j2 + dest: /etc/apache2/blocklist.conf + notify: Restart Apache2 + + - name: Template jk.conf to /etc/apache2/mods-available/ + ansible.builtin.template: + src: ./templates/apache/jk.conf.j2 + dest: /etc/apache2/mods-available/ + notify: Restart Apache2 + + - 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 + mode: '0755' + + - name: Generate self-signed SSL certificate (only if certificate == 'self-signed') + ansible.builtin.command: > + openssl req -x509 -nodes -days 365 -newkey rsa:2048 + -keyout /etc/apache2/ssl/apache.key + -subj "{{ cert_subject }}" + -out /etc/apache2/ssl/apache.crt + when: certificate == "self-signed" + notify: Reload Apache + + - name: Set permissions on SSL key and cert + ansible.builtin.file: + path: /etc/apache2/ssl + mode: '0600' + recurse: true + + - name: Enable 00_ctsms_https.conf site + ansible.builtin.command: a2ensite 00_ctsms_https.conf + notify: Reload Apache + + # Handler to reload Apache + - name: Reload Apache + ansible.builtin.service: + name: apache2 + state: reloaded 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/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 +} From 671d274f0474f060d901e66b3ce1b4da921d44d2 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 12 May 2025 23:55:15 -0700 Subject: [PATCH 016/217] minor update --- .gitignore | 2 ++ install.yml | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 751553b..12ac79b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ *.bak +./inventories/dev/* +./inventories/prod/* diff --git a/install.yml b/install.yml index ab8ccd8..d797fc3 100644 --- a/install.yml +++ b/install.yml @@ -78,6 +78,11 @@ group: wheel mode: "0644" - # - name: render workflow diagrams + - name: render workflow diagrams + hosts: all + ansible.builtin.import_playbook: playbooks/render-workflow-diagrams.yml # - # - name: ready + - name: ready + hosts: all + ansible.builtin.debug: + msg: Phoenix CTMS installation finished. From 14290bf0900c9553653c5ea94f50b1e6a8d3445e Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 13 May 2025 00:03:39 -0700 Subject: [PATCH 017/217] adding initial support for clustered installations... --- install.yml | 27 ++++++++++++++++----------- inventories/local/hosts | 10 ++++++++++ 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/install.yml b/install.yml index d797fc3..db81db2 100644 --- a/install.yml +++ b/install.yml @@ -17,7 +17,10 @@ - name: Sync Time hosts: all - ansible.builtin.service: name=ntp state=started enabled=yes + ansible.builtin.service: + name: ntp + state: started + enabled=: yes - name: Create 'ctsms' user hosts: all @@ -29,48 +32,50 @@ ansible.builtin.import_playbook: playbooks/prepare-ctsms-directory.yml - name: Install OpenJDK + hosts: all ansible.builtin.apt: - openjdk - name: Install tomcat9 - hosts: all + hosts: webapp ansible.builtin.import_playbook: playbooks/tomcat9.yml - name: Build phoenix - hosts: all + hosts: webapp ansible.builtin.import_playbook: playbooks/build-phoenix.yml - name: Install Postgres 13 - hosts: all + hosts: db ansible.builtin.import_playbook: playbooks/install-postgres.yml - name: Enable SSH and database remote access - hosts: all + hosts: db ansible.builtin.import_playbook: playbooks/enable-remote-access.yml - name: deploy .war - hosts: all + hosts: webapp ansible.builtin.import_playbook: playbooks/deploy-war.yml - name: install memcached - hosts: all + hosts: bulk-processor ansible.builtin.import_playbook: playbooks/install-memcached.yml - name: install bulk_processor - hosts: all + hosts: bulk-processor ansible.builtin.import_playbook: playbooks/install-bulk-processor.yml - name: setup apache2 - hosts: all + hosts: reverse-proxy ansible.builtin.import_playbook: playbooks/setup-apache2.yml # - name: initialize database - name: install cron - hosts: all + hosts: webapp ansible.builtin.import_playbook: playbooks/install-cron.yml - name: Setup logrotate + hosts: webapp ansible.builtin.template: src: ./templates/logrotate/ctsms.j2 dest: /etc/logrotate.d/ctsms @@ -79,7 +84,7 @@ mode: "0644" - name: render workflow diagrams - hosts: all + hosts: webapp ansible.builtin.import_playbook: playbooks/render-workflow-diagrams.yml # - name: ready diff --git a/inventories/local/hosts b/inventories/local/hosts index 2302eda..64581e3 100644 --- a/inventories/local/hosts +++ b/inventories/local/hosts @@ -1 +1,11 @@ +[webapp] +localhost ansible_connection=local + +[db] +localhost ansible_connection=local + +[bulk-processor] +localhost ansible_connection=local + +[reverse-proxy] localhost ansible_connection=local From 77ac49207361f9ffcb4364b85e5e6355b529d7d0 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 13 May 2025 21:22:04 -0700 Subject: [PATCH 018/217] all logic ported --- install.yml | 18 +- playbooks/init-database.yml | 568 ++++++++++++++++++++++++++ playbooks/prepare-ctsms-directory.yml | 2 +- playbooks/tomcat9.yml | 140 ++++--- 4 files changed, 653 insertions(+), 75 deletions(-) diff --git a/install.yml b/install.yml index db81db2..030834e 100644 --- a/install.yml +++ b/install.yml @@ -20,7 +20,7 @@ ansible.builtin.service: name: ntp state: started - enabled=: yes + enabled: yes - name: Create 'ctsms' user hosts: all @@ -32,7 +32,7 @@ ansible.builtin.import_playbook: playbooks/prepare-ctsms-directory.yml - name: Install OpenJDK - hosts: all + hosts: webapp ansible.builtin.apt: - openjdk @@ -52,25 +52,25 @@ hosts: db ansible.builtin.import_playbook: playbooks/enable-remote-access.yml - - name: deploy .war + - name: Deploy .war hosts: webapp ansible.builtin.import_playbook: playbooks/deploy-war.yml - - name: install memcached + - name: Install memcached hosts: bulk-processor ansible.builtin.import_playbook: playbooks/install-memcached.yml - - name: install bulk_processor + - name: Install bulk_processor hosts: bulk-processor ansible.builtin.import_playbook: playbooks/install-bulk-processor.yml - - name: setup apache2 + - name: Setup apache2 hosts: reverse-proxy ansible.builtin.import_playbook: playbooks/setup-apache2.yml # - name: initialize database - - name: install cron + - name: Install cron hosts: webapp ansible.builtin.import_playbook: playbooks/install-cron.yml @@ -83,11 +83,11 @@ group: wheel mode: "0644" - - name: render workflow diagrams + - name: Render workflow diagrams hosts: webapp ansible.builtin.import_playbook: playbooks/render-workflow-diagrams.yml # - - name: ready + - name: Ready hosts: all ansible.builtin.debug: msg: Phoenix CTMS installation finished. diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index e69de29..e55f960 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -0,0 +1,568 @@ +- name: Initialize Database + connection: local + become: true + 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 + 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') }}" + IP: "{{ ansible_default_ipv4.address }}" + + tasks: + - name: initialize db by inserting required setup records + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -i -f + + - name: import criterion properties tables + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -icp /ctsms/master_data/criterion_property_definitions.csv + + - name: import permission definitions from csv/text file + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -ipd /ctsms/master_data/permission_definitions.csv + + - name: import inventory file mime types from csv/text file + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -imi /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import staff file mime types from csv/text file + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -ims /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import course file mime types from csv/text file + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -imc /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import trial file mime types from csv/text file + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -imt /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import proband file mime types from csv/text file + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -imp /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import mass mail file mime types from csv/text file + become: yes + become_user: ctsms + shell: /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 + become: yes + become_user: ctsms + shell: /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 + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -imsi /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import proband image file mime types from csv/text file + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -impi /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import job data file mime types from csv/text file + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -imjf /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import course certificate file mime types from csv/text file + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -imcc /ctsms/master_data/mime.types -e ISO-8859-1 + + - name: import titles from csv/text file + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -it "{{ titles_file }}" -e ISO-8859-1 + + - name: import bank identifications from csv/text file + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -ib "{{ bank_identification_file }}" -e ISO-8859-1 + + - name: import country names from csv/text file + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -ic "{{ countries_file }}" -e ISO-8859-1 + + - name: import zip codes from csv/text file + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -iz "{{ street_names_file }}" -e utf-8 + + - name: import street names from csv/text file + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -is "{{ street_names_file }}" -e utf-8 + + - name: import icd systematics with language encoding + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -iis "{{ icd_systematics_file }}" -sl "{{ icd_systematics_lang }}" + + - name: import alpha ids + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -iai "{{ alpha_id_file }}" -e "{{ alpha_id_file_encoding }}" -isr "{{ alpha_id_file_revision }}" + + - name: import ops systematics + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -ios "{{ ops_systematics_file }}" -sl "{{ ops_systematics_file_lang }}" + + - name: import ops codes + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -ioc "{{ ops_codes_file }}" -osr "{{ ops_codes_file_revisions }}" + + - name: import asp and substances + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -ia "{{ asp_substances_file }}" -e "{{ asp_substances_file_encoding }}" + + - name: create department 'my_department' + become: yes + become_user: ctsms + shell: /ctsms/dbtool.sh -cd -dlk my_department -dp "{{ department_password }}" + + - name: create user 'phoenix' + become: yes + become_user: ctsms + shell: | + /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 user 'my_department_signup_de' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_de" + -p "my_department_signup_de" + -ul de + -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, + OURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" + + - name: create user 'my_department_signup_en' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_en" + -p "my_department_signup_en" + -ul en + -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" + + - name: create user 'my_department_signup_da' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_da" + -p "my_department_signup_da" + -ul da + -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" + + - name: create user 'my_department_signup_es' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_es" + -p "my_department_signup_es" + -ul es + -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" + + - name: create user 'my_department_signup_fi' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_fi" + -p "my_department_signup_fi" + -ul fi + -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" + + - name: create user 'my_department_signup_fr' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_fr" + -p "my_department_signup_fr" + -ul fr + -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" + + - name: create user 'my_department_signup_hu' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_hu" + -p "my_department_signup_hu" + -ul hu + -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" + + - name: create user 'my_department_signup_it' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_it" + -p "my_department_signup_it" + -ul it + -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" + + - name: create user 'my_department_signup_ja' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_ja" + -p "my_department_signup_ja" + -ul ja + -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" + + - name: create user 'my_department_signup_ko' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_ko" + -p "my_department_signup_ko" + -ul ko + -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" + + - name: create user 'my_department_signup_nl' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_nl" + -p "my_department_signup_nl" + -ul nl + -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" + + - name: create user 'my_department_signup_pt' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_pt" + -p "my_department_signup_pt" + -ul pt + -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" + + - name: create user 'my_department_signup_ro' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_ro" + -p "my_department_signup_ro" + -ul ro + -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" + + - name: create user 'my_department_signup_sk' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_sk" + -p "my_department_signup_sk" + -ul sk + -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" + + - name: create user 'my_department_signup_sl' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_sl" + -p "my_department_signup_sl" + -ul sl + -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" + + - name: create user 'my_department_signup_sv' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_sv" + -p "my_department_signup_sv" + -ul sv + -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" + + - name: create user 'my_department_signup_uk' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_uk" + -p "my_department_signup_uk" + -ul uk + -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" + + - name: create user 'my_department_signup_ru' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_ru" + -p "my_department_signup_ru" + -ul ru + -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" + + - name: create user 'my_department_signup_ln' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_ln" + -p "my_department_signup_ln" + -ul ln + -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" + + - name: create user 'my_department_signup_sw' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_sw" + -p "my_department_signup_sw" + -ul sw + -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" + + - name: create user 'my_department_signup_yo' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_yo" + -p "my_department_signup_yo" + -ul yo + -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" + + - name: create user 'my_department_signup_ig' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_ig" + -p "my_department_signup_ig" + -ul ig + -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" + + - name: create user 'my_department_signup_ff' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_ff" + -p "my_department_signup_ff" + -ul ff + -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" + + - name: create user 'my_department_signup_ar' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_ar" + -p "my_department_signup_ar" + -ul ar + -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" + + - name: create user 'my_department_signup_kg' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_kg" + -p "my_department_signup_kg" + -ul kg + -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" + + - name: create user 'my_department_signup_hi' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_hi" + -p "my_department_signup_hi" + -ul hi + -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" + + - name: create user 'my_department_signup_zh' + become: yes + become_user: ctsms + shell: | + /ctsms/dbtool.sh -cu -dlk my_department + -dp "{{ department_password }}" + -u "my_department_signup_zh" + -p "my_department_signup_zh" + -ul yo + -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" + + - name: create user 'my_department_cron' + become: yes + become_user: ctsms + shell: | + /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: Update ctsms_base_uri in EcrfExporter settings + ansible.builtin.lineinfile: + path: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/settings.yml + regexp: '^ctsms_base_uri:.*' + line: "ctsms_base_uri: 'https://{{ IP }}'" + backrefs: yes + + - name: Update ctsms_base_uri in EcrfImporter settings + ansible.builtin.lineinfile: + path: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/settings.yml + regexp: '^ctsms_base_uri:.*' + line: "ctsms_base_uri: 'https://{{ IP }}'" + backrefs: yes + + - name: Update ctsms_base_uri in InquiryExporter settings + ansible.builtin.lineinfile: + path: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/settings.yml + regexp: '^ctsms_base_uri:.*' + line: "ctsms_base_uri: 'https://{{ IP }}'" + backrefs: yes + + - name: Update ctsms_base_uri in Signup settings + ansible.builtin.lineinfile: + path: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/settings.yml + regexp: '^ctsms_base_uri:.*' + line: "ctsms_base_uri: 'https://{{ IP }}'" + backrefs: yes + + - 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 /ctsms/dbtool.sh is {{ department_password }}." + + - name: Print login info + ansible.builtin.debug: + msg: "Log in at https://${IP} with username 'phoenix' password {{ user_password }}." diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 82a9655..382ecd1 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -71,7 +71,7 @@ tasks: - name: Template update to /ctsms/update ansible.builtin.template: src: ./templates/update.j2 - dest: /ctsms/update + dest: /ctsms/update.sh owner: ctsms group: ctsms mode: '0755' diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index 8c7ab6d..50fde74 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -1,76 +1,86 @@ -- name: install libservlet3.1-java - ansible.builtin.apt: - name: libservlet3.1-java - state: present +- name: Install Tomcat 9 + connection: local + become: true + vars: +- tasks: + - name: install libservlet3.1-java + ansible.builtin.apt: + name: libservlet3.1-java + state: present -- name: install tomcat9 - ansible.builtin.include_role: - name: vantaworks.tomcat - tomcat_major_version: 9 + - name: install tomcat9 + ansible.builtin.include_role: + name: vantaworks.tomcat + tomcat_major_version: 9 -- name: Stop service tomcat9, if started - ansible.builtin.service: - name: tomcat9 - state: stopped + - name: Stop service tomcat9, if started + ansible.builtin.service: + name: tomcat9 + state: stopped -- name: allow tomcat writing to /ctsms/external_files - user: - name: tomcat - groups: ctsms - append: yes + - name: allow tomcat writing to /ctsms/external_files + user: + name: tomcat + groups: ctsms + append: yes -- name: allow ctsms user to load jars from exploded .war - user: - name: ctsms - groups: tomcat,adm - append: yes + - name: allow ctsms user to load jars from exploded .war + user: + name: ctsms + groups: tomcat,adm + append: yes -- name: Template workers.properties to /etc/tomcat9/workers.properties - ansible.builtin.template: - src: ./templates/tomcat/workers.properties.j2 - dest: /etc/tomcat9/workers.properties - owner: root - group: tomcat - mode: '0640' + - name: Template workers.properties to /etc/tomcat9/workers.properties + ansible.builtin.template: + src: ./templates/tomcat/workers.properties.j2 + dest: /etc/tomcat9/workers.properties + owner: root + group: tomcat + mode: '0640' -- name: Template server.xml to /etc/tomcat9/server.xml - ansible.builtin.template: - src: ./templates/tomcat/server.xml.j2 - dest: /etc/tomcat9/server.xml - owner: root - group: tomcat - mode: '0640' + - name: Template server.xml to /etc/tomcat9/server.xml + ansible.builtin.template: + src: ./templates/tomcat/server.xml.j2 + dest: /etc/tomcat9/server.xml + owner: root + group: tomcat + mode: '0640' -- 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 + - 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 -- name: Add CTSMS_PROPERTIES to /etc/default/tomcat9 - lineinfile: - path: /etc/default/tomcat9 - line: 'CTSMS_PROPERTIES=/ctsms/properties' - insertafter: EOF + - name: Add CTSMS_PROPERTIES to /etc/default/tomcat9 + lineinfile: + path: /etc/default/tomcat9 + line: 'CTSMS_PROPERTIES=/ctsms/properties' + insertafter: EOF -- name: Add CTSMS_JAVA to /etc/default/tomcat9 - lineinfile: - path: /etc/default/tomcat9 - line: 'CTSMS_JAVA=/ctsms/java' - insertafter: EOF + - name: Add CTSMS_JAVA to /etc/default/tomcat9 + lineinfile: + path: /etc/default/tomcat9 + line: 'CTSMS_JAVA=/ctsms/java' + insertafter: EOF -- name: Ensure tomcat9.service.d directory exists - file: - path: /etc/systemd/system/tomcat9.service.d - state: directory - mode: '0755' + - name: Ensure tomcat9.service.d directory exists + file: + path: /etc/systemd/system/tomcat9.service.d + state: directory + mode: '0755' -- name: Template ctsms.conf to /etc/tomcat9/server.xml - ansible.builtin.template: - src: ./templates/tomcat/workers.j2 - dest: /etc/systemd/system/tomcat9.service.d/ctsms.conf - owner: root - group: tomcat - mode: '0644' + - name: Template ctsms.conf to /etc/tomcat9/server.xml + ansible.builtin.template: + src: ./templates/tomcat/workers.j2 + dest: /etc/systemd/system/tomcat9.service.d/ctsms.conf + owner: root + group: tomcat + mode: '0644' + + - name: Start service tomcat9 + ansible.builtin.service: + name: tomcat9 + state: started From 2b68505443e51b7fa5a2aabc2824a0c83a9449ac Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 13 May 2025 21:35:05 -0700 Subject: [PATCH 019/217] Update install.yml --- install.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/install.yml b/install.yml index 030834e..8a91858 100644 --- a/install.yml +++ b/install.yml @@ -1,9 +1,7 @@ - name: Install Phoenix CTMS v1.8.2 gather_facts: false - hosts: all tasks: - name: Install General Packages - hosts: all apt: pkg: - sudo @@ -16,19 +14,16 @@ update_cache: true - name: Sync Time - hosts: all ansible.builtin.service: name: ntp state: started enabled: yes - name: Create 'ctsms' user - hosts: all ansible.builtin.user: name: ctsms - name: Prepare ctsms directory with default-config and master-data - hosts: all ansible.builtin.import_playbook: playbooks/prepare-ctsms-directory.yml - name: Install OpenJDK @@ -37,45 +32,35 @@ - openjdk - name: Install tomcat9 - hosts: webapp ansible.builtin.import_playbook: playbooks/tomcat9.yml - name: Build phoenix - hosts: webapp ansible.builtin.import_playbook: playbooks/build-phoenix.yml - name: Install Postgres 13 - hosts: db ansible.builtin.import_playbook: playbooks/install-postgres.yml - name: Enable SSH and database remote access - hosts: db ansible.builtin.import_playbook: playbooks/enable-remote-access.yml - name: Deploy .war - hosts: webapp ansible.builtin.import_playbook: playbooks/deploy-war.yml - name: Install memcached - hosts: bulk-processor ansible.builtin.import_playbook: playbooks/install-memcached.yml - name: Install bulk_processor - hosts: bulk-processor ansible.builtin.import_playbook: playbooks/install-bulk-processor.yml - name: Setup apache2 - hosts: reverse-proxy ansible.builtin.import_playbook: playbooks/setup-apache2.yml # - name: initialize database - name: Install cron - hosts: webapp ansible.builtin.import_playbook: playbooks/install-cron.yml - name: Setup logrotate - hosts: webapp ansible.builtin.template: src: ./templates/logrotate/ctsms.j2 dest: /etc/logrotate.d/ctsms @@ -84,10 +69,8 @@ mode: "0644" - name: Render workflow diagrams - hosts: webapp ansible.builtin.import_playbook: playbooks/render-workflow-diagrams.yml # - name: Ready - hosts: all ansible.builtin.debug: msg: Phoenix CTMS installation finished. From 975da686897eaddf3eee3b29092a3cc3490ad669 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 13 May 2025 21:44:24 -0700 Subject: [PATCH 020/217] testing something --- install.yml | 89 +++++--------------------------- playbooks/begin-installation.yml | 28 ++++++++++ playbooks/setup-logrotate.yml | 8 +++ playbooks/tomcat9.yml | 5 ++ 4 files changed, 54 insertions(+), 76 deletions(-) create mode 100644 playbooks/begin-installation.yml create mode 100644 playbooks/setup-logrotate.yml diff --git a/install.yml b/install.yml index 8a91858..3f7da9d 100644 --- a/install.yml +++ b/install.yml @@ -1,76 +1,13 @@ -- name: Install Phoenix CTMS v1.8.2 - gather_facts: false - tasks: - - name: Install General Packages - apt: - pkg: - - sudo - - wget - - curl - - lsb-release - - gnupg - - ntpd - 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 - - - name: Prepare ctsms directory with default-config and master-data - ansible.builtin.import_playbook: playbooks/prepare-ctsms-directory.yml - - - name: Install OpenJDK - hosts: webapp - ansible.builtin.apt: - - openjdk - - - name: Install tomcat9 - ansible.builtin.import_playbook: playbooks/tomcat9.yml - - - name: Build phoenix - ansible.builtin.import_playbook: playbooks/build-phoenix.yml - - - name: Install Postgres 13 - ansible.builtin.import_playbook: playbooks/install-postgres.yml - - - name: Enable SSH and database remote access - ansible.builtin.import_playbook: playbooks/enable-remote-access.yml - - - name: Deploy .war - ansible.builtin.import_playbook: playbooks/deploy-war.yml - - - name: Install memcached - ansible.builtin.import_playbook: playbooks/install-memcached.yml - - - name: Install bulk_processor - ansible.builtin.import_playbook: playbooks/install-bulk-processor.yml - - - name: Setup apache2 - ansible.builtin.import_playbook: playbooks/setup-apache2.yml - - # - name: initialize database - - - name: Install cron - ansible.builtin.import_playbook: playbooks/install-cron.yml - - - name: Setup logrotate - ansible.builtin.template: - src: ./templates/logrotate/ctsms.j2 - dest: /etc/logrotate.d/ctsms - owner: root - group: wheel - mode: "0644" - - - name: Render workflow diagrams - ansible.builtin.import_playbook: playbooks/render-workflow-diagrams.yml - # - - name: Ready - ansible.builtin.debug: - msg: Phoenix CTMS installation finished. +- 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/install-cron.yml +- import_playbook: playbooks/setup-logrotate.yml +- import_playbook: playbooks/render-workflow-diagrams.yml diff --git a/playbooks/begin-installation.yml b/playbooks/begin-installation.yml new file mode 100644 index 0000000..c222fe1 --- /dev/null +++ b/playbooks/begin-installation.yml @@ -0,0 +1,28 @@ +- name: Install Phoenix CTMS v1.8.2 + gather_facts: true + hosts: all + tasks: + - name: Install General Packages + hosts: all + apt: + pkg: + - sudo + - wget + - curl + - lsb-release + - gnupg + - ntpd + state: latest + update_cache: true + + - name: Sync Time + hosts: all + ansible.builtin.service: + name: ntp + state: started + enabled: yes + + - name: Create 'ctsms' user + hosts: all + ansible.builtin.user: + name: ctsms diff --git a/playbooks/setup-logrotate.yml b/playbooks/setup-logrotate.yml new file mode 100644 index 0000000..dd9c593 --- /dev/null +++ b/playbooks/setup-logrotate.yml @@ -0,0 +1,8 @@ + - name: Setup logrotate + hosts: webapp + ansible.builtin.template: + src: ./templates/logrotate/ctsms.j2 + dest: /etc/logrotate.d/ctsms + owner: root + group: wheel + mode: "0644" diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index 50fde74..269d365 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -3,6 +3,11 @@ become: true vars: - tasks: + - name: install openjdk + ansible.builtin.apt: + name: openjdk + state: present + - name: install libservlet3.1-java ansible.builtin.apt: name: libservlet3.1-java From 8aec552d99092493b70ac76d282da3df3c6c57cb Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 13 May 2025 21:48:10 -0700 Subject: [PATCH 021/217] testing --- inventories/{local/hosts => local} | 0 playbooks/setup-logrotate.yml | 1 - playbooks/tomcat9.yml | 1 - 3 files changed, 2 deletions(-) rename inventories/{local/hosts => local} (100%) diff --git a/inventories/local/hosts b/inventories/local similarity index 100% rename from inventories/local/hosts rename to inventories/local diff --git a/playbooks/setup-logrotate.yml b/playbooks/setup-logrotate.yml index dd9c593..c4ffb6a 100644 --- a/playbooks/setup-logrotate.yml +++ b/playbooks/setup-logrotate.yml @@ -1,5 +1,4 @@ - name: Setup logrotate - hosts: webapp ansible.builtin.template: src: ./templates/logrotate/ctsms.j2 dest: /etc/logrotate.d/ctsms diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index 269d365..c51b537 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -1,5 +1,4 @@ - name: Install Tomcat 9 - connection: local become: true vars: - tasks: From 7aabe1954ca70ba9d504625cbf9b4f3b31babb62 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 13 May 2025 21:48:53 -0700 Subject: [PATCH 022/217] Update begin-installation.yml --- playbooks/begin-installation.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/playbooks/begin-installation.yml b/playbooks/begin-installation.yml index c222fe1..0e68caa 100644 --- a/playbooks/begin-installation.yml +++ b/playbooks/begin-installation.yml @@ -1,9 +1,7 @@ - name: Install Phoenix CTMS v1.8.2 gather_facts: true - hosts: all tasks: - name: Install General Packages - hosts: all apt: pkg: - sudo @@ -16,13 +14,11 @@ update_cache: true - name: Sync Time - hosts: all ansible.builtin.service: name: ntp state: started enabled: yes - name: Create 'ctsms' user - hosts: all ansible.builtin.user: name: ctsms From c8f6332ff59f46a1fe80b8bccbfc25120ac73fc4 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 13 May 2025 21:49:37 -0700 Subject: [PATCH 023/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 138 +++++++++++++------------- 1 file changed, 70 insertions(+), 68 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 382ecd1..1362c7f 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -1,77 +1,79 @@ -tasks: - - name: Create /ctsms - ansible.builtin.file: - path: /ctsms/ - state: directory - mode: '0755' +- name: Prepare CTMS directory + gather_facts: true + 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: Remove /ctsms/bulk_processor + ansible.builtin.file: + path: /ctsms/bulk_processor/ + state: absent - - name: Template dbtool to /ctsms/dbtool.sh - ansible.builtin.template: - src: ./templates/dbtool.sh.j2 - dest: /ctsms/dbtool.sh - owner: ctsms - group: ctsms - mode: '0755' + - name: Template dbtool to /ctsms/dbtool.sh + ansible.builtin.template: + src: ./templates/dbtool.sh.j2 + dest: /ctsms/dbtool.sh + owner: ctsms + group: ctsms + mode: '0755' - - name: Template clearcache to /ctsms/clearcache.sh - ansible.builtin.template: - src: ./templates/bash/clearcache.sh.j2 - dest: /ctsms/clearcache.sh - owner: ctsms - group: ctsms - mode: '0755' + - name: Template clearcache to /ctsms/clearcache.sh + ansible.builtin.template: + src: ./templates/bash/clearcache.sh.j2 + dest: /ctsms/clearcache.sh + owner: ctsms + group: ctsms + mode: '0755' - - name: Copy config-default to /ctsms/config-default/ - ansible.builtin.copy: - src: ./master-data/ - dest: /ctsms/config-default/ - owner: ctsms - group: ctsms - mode: '0755' + - name: Copy config-default to /ctsms/config-default/ + ansible.builtin.copy: + src: ./master-data/ + dest: /ctsms/config-default/ + owner: ctsms + group: ctsms + mode: '0755' - - name: Template dbtool to /ctsms/dbtool.sh - ansible.builtin.template: - src: ./templates/bash/dbtool.sh.j2 - dest: /ctsms/dbtool.sh - owner: ctsms - group: ctsms - mode: '0755' + - name: Template dbtool to /ctsms/dbtool.sh + ansible.builtin.template: + src: ./templates/bash/dbtool.sh.j2 + dest: /ctsms/dbtool.sh + owner: ctsms + group: ctsms + mode: '0755' - - name: Copy master-data to /ctsms/master_data/ - ansible.builtin.copy: - src: ./master-data/ - dest: /ctsms/master_data/ - owner: ctsms - group: ctsms - mode: '0755' + - name: Copy master-data to /ctsms/master_data/ + ansible.builtin.copy: + src: ./master-data/ + dest: /ctsms/master_data/ + owner: ctsms + group: ctsms + mode: '0755' - - name: Recursively change ownership of /ctsms/ - ansible.builtin.file: - path: /ctsms/ - state: directory - recurse: yes - owner: ctsms - group: ctsms - mode: '0755' + - name: Recursively change ownership of /ctsms/ + ansible.builtin.file: + path: /ctsms/ + state: directory + recurse: yes + owner: ctsms + group: ctsms + mode: '0755' - - 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: 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' + - name: Template update to /ctsms/update + ansible.builtin.template: + src: ./templates/update.j2 + dest: /ctsms/update.sh + owner: ctsms + group: ctsms + mode: '0755' From 48b162c276a150e52172e2801b027190c672e59a Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 13 May 2025 21:52:33 -0700 Subject: [PATCH 024/217] Update tomcat9.yml --- playbooks/tomcat9.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index c51b537..4bfe313 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -15,7 +15,6 @@ - name: install tomcat9 ansible.builtin.include_role: name: vantaworks.tomcat - tomcat_major_version: 9 - name: Stop service tomcat9, if started ansible.builtin.service: From 275b22e3e64031a27bc6969108845ddf58bb950f Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 13 May 2025 21:53:29 -0700 Subject: [PATCH 025/217] Update build-phoenix.yml --- playbooks/build-phoenix.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/playbooks/build-phoenix.yml b/playbooks/build-phoenix.yml index d163890..e46dbc2 100644 --- a/playbooks/build-phoenix.yml +++ b/playbooks/build-phoenix.yml @@ -41,14 +41,12 @@ path: /ctsms/build/ctsms/pom.xml regexp: '()[^<]+()' replace: '\1{{ app_version.stdout }} [{{ git_commit.stdout }}]\2' - backup: yes - name: Update application.uuid tag with generated UUID replace: path: /ctsms/build/ctsms/pom.xml regexp: '' replace: '{{ uuid_output.stdout }}' - backup: yes - name: Run mvn install with -DskipTests command: mvn install -DskipTests From f3418f474a4801c3dcbf44c662763d2415482f6f Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 13 May 2025 21:54:28 -0700 Subject: [PATCH 026/217] Update setup-logrotate.yml --- playbooks/setup-logrotate.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/playbooks/setup-logrotate.yml b/playbooks/setup-logrotate.yml index c4ffb6a..a4dbd30 100644 --- a/playbooks/setup-logrotate.yml +++ b/playbooks/setup-logrotate.yml @@ -1,7 +1,9 @@ - - name: Setup logrotate - ansible.builtin.template: - src: ./templates/logrotate/ctsms.j2 - dest: /etc/logrotate.d/ctsms - owner: root - group: wheel - mode: "0644" +- name: Setup logrotate + tasks: + - name: Setup logrotate + ansible.builtin.template: + src: ./templates/logrotate/ctsms.j2 + dest: /etc/logrotate.d/ctsms + owner: root + group: wheel + mode: "0644" From ba4bfd5fc065a294c33890e9868cd4321f2e6bdd Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 13 May 2025 21:55:26 -0700 Subject: [PATCH 027/217] Update render-workflow-diagrams.yml --- playbooks/render-workflow-diagrams.yml | 62 +++++++++++++------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/playbooks/render-workflow-diagrams.yml b/playbooks/render-workflow-diagrams.yml index c81fc2c..ef1cf2c 100644 --- a/playbooks/render-workflow-diagrams.yml +++ b/playbooks/render-workflow-diagrams.yml @@ -1,36 +1,38 @@ -- name: Run render.sh - ansible.builtin.command: - cmd: ./render.sh - chdir: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render +- name: Final configuration + tasks: + - name: Run render.sh + ansible.builtin.command: + cmd: ./render.sh + 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: 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: 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: tomcat9 - state: stopped + - name: Stop Tomcat service + ansible.builtin.service: + name: tomcat9 + state: stopped -- name: Remove exploded ROOT webapp - ansible.builtin.file: - path: /var/lib/tomcat9/webapps/ROOT - state: absent + - name: Remove exploded ROOT webapp + ansible.builtin.file: + path: /var/lib/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: /var/lib/tomcat9/webapps/ROOT.war - mode: '0644' - remote_src: true + - name: Copy WAR file to Tomcat ROOT.war + ansible.builtin.copy: + src: "/ctsms/build/ctsms/web/target/ctsms-{{ version }}.war" + dest: /var/lib/tomcat9/webapps/ROOT.war + mode: '0644' + remote_src: true -- name: Start Tomcat service - ansible.builtin.service: - name: tomcat9 - state: started + - name: Start Tomcat service + ansible.builtin.service: + name: tomcat9 + state: started From 5464fc3ca702b6d64e47b106e56fdae38a6d68da Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 13 May 2025 21:59:20 -0700 Subject: [PATCH 028/217] test --- playbooks/build-phoenix.yml | 1 - playbooks/deploy-war.yml | 1 - playbooks/init-database.yml | 1 - playbooks/install-bulk-processor.yml | 1 - playbooks/install-cron.yml | 1 - playbooks/install-memcached.yml | 1 - playbooks/install-postgres.yml | 1 - playbooks/setup-apache2.yml | 1 - 8 files changed, 8 deletions(-) diff --git a/playbooks/build-phoenix.yml b/playbooks/build-phoenix.yml index e46dbc2..70658ec 100644 --- a/playbooks/build-phoenix.yml +++ b/playbooks/build-phoenix.yml @@ -1,5 +1,4 @@ - name: Build Phoenix CTMS - connection: local become: true tasks: - name: install maven diff --git a/playbooks/deploy-war.yml b/playbooks/deploy-war.yml index 37ce7be..1191e91 100644 --- a/playbooks/deploy-war.yml +++ b/playbooks/deploy-war.yml @@ -1,5 +1,4 @@ - name: Deploy .war - connection: local become: true tasks: - name: Change file ownership, group and permissions diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index e55f960..f9e7436 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -1,5 +1,4 @@ - name: Initialize Database - connection: local become: true gather_facts: yes vars: diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index cabc8e9..157fabb 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -1,5 +1,4 @@ - name: Install bulk-processor - connection: local become: true vars: tag: "master" diff --git a/playbooks/install-cron.yml b/playbooks/install-cron.yml index 68d03e1..c4c4a54 100644 --- a/playbooks/install-cron.yml +++ b/playbooks/install-cron.yml @@ -1,5 +1,4 @@ - name: Install cron - connection: local become: true tasks: - name: Setup /etc/cron.d/ctsms diff --git a/playbooks/install-memcached.yml b/playbooks/install-memcached.yml index c55a2ab..785627b 100644 --- a/playbooks/install-memcached.yml +++ b/playbooks/install-memcached.yml @@ -1,5 +1,4 @@ - name: Install memcached - connection: local become: true tasks: - name: Install memcached diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml index 9a993b2..425d0fb 100644 --- a/playbooks/install-postgres.yml +++ b/playbooks/install-postgres.yml @@ -1,5 +1,4 @@ - name: Install Postgres 13 - connection: local become: true vars: db_name: ctsms diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 0786920..51f69cc 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -1,5 +1,4 @@ - name: Install Apache2 - connection: local become: true vars: certificate: "self-signed" From cebef5e89d99058184f98e1cb431667c204bc3d8 Mon Sep 17 00:00:00 2001 From: Josh Armenta Date: Wed, 14 May 2025 12:20:20 -0700 Subject: [PATCH 029/217] Update install-cron.yml --- playbooks/install-cron.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/install-cron.yml b/playbooks/install-cron.yml index c4c4a54..91416bf 100644 --- a/playbooks/install-cron.yml +++ b/playbooks/install-cron.yml @@ -4,7 +4,7 @@ - name: Setup /etc/cron.d/ctsms ansible.builtin.template: src: ./templates/crontab/ctsms.j2 - dest: /etc/logrotate.d/ctsms + dest: /etc/crontab/ctsms owner: root group: root mode: "0644" @@ -13,7 +13,7 @@ - name: Setup /etc/cron.d/my_department ansible.builtin.template: src: ./templates/crontab/my_department.j2 - dest: /etc/logrotate.d/my_department + dest: /etc/crontab/my_department owner: root group: root mode: "0644" From 2521ac903256cad10ac4ae35fa1a4bc9f283f6e8 Mon Sep 17 00:00:00 2001 From: Josh Armenta Date: Wed, 14 May 2025 12:26:31 -0700 Subject: [PATCH 030/217] Delete repl.lisp-repl Common Lisp interpreter garbage --- repl.lisp-repl | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 repl.lisp-repl diff --git a/repl.lisp-repl b/repl.lisp-repl deleted file mode 100644 index e69de29..0000000 From c274de4dd3288b406603c199c322db8a3f3a39e7 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 17:19:00 -0700 Subject: [PATCH 031/217] adding back hosts line --- playbooks/build-phoenix.yml | 1 + playbooks/deploy-war.yml | 1 + playbooks/enable-remote-access.yml | 2 +- playbooks/init-database.yml | 13 +++++++------ playbooks/install-bulk-processor.yml | 1 + playbooks/install-cron.yml | 5 +++-- playbooks/install-memcached.yml | 1 + playbooks/install-postgres.yml | 1 + playbooks/prepare-ctsms-directory.yml | 1 + playbooks/setup-apache2.yml | 1 + playbooks/tomcat9.yml | 2 +- 11 files changed, 19 insertions(+), 10 deletions(-) diff --git a/playbooks/build-phoenix.yml b/playbooks/build-phoenix.yml index 70658ec..d8a07e8 100644 --- a/playbooks/build-phoenix.yml +++ b/playbooks/build-phoenix.yml @@ -1,5 +1,6 @@ - name: Build Phoenix CTMS become: true + hosts: all tasks: - name: install maven ansible.builtin.apt: diff --git a/playbooks/deploy-war.yml b/playbooks/deploy-war.yml index 1191e91..eb9ac53 100644 --- a/playbooks/deploy-war.yml +++ b/playbooks/deploy-war.yml @@ -1,5 +1,6 @@ - name: Deploy .war become: true + hosts: all tasks: - name: Change file ownership, group and permissions ansible.builtin.file: diff --git a/playbooks/enable-remote-access.yml b/playbooks/enable-remote-access.yml index 76fd773..d3b86da 100644 --- a/playbooks/enable-remote-access.yml +++ b/playbooks/enable-remote-access.yml @@ -1,6 +1,6 @@ - name: Install Postgres 13 - connection: local become: true + hosts: all tasks: - name: install ssh ansible.builtin.apt: diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index f9e7436..29de582 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -1,5 +1,6 @@ - name: Initialize Database become: true + hosts: all gather_facts: yes vars: titles_file: /ctsms/master_data/titles.csv @@ -7,16 +8,16 @@ 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 + 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 + 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_systematics_file_lang: "de" ops_codes_file: /ctsms/master_data/ops2011alpha_edv_ascii_20111031.txt - ops_codes_file_revisions: ops2012syst_claml_20111103 + ops_codes_file_revisions: "ops2012syst_claml_20111103" asp_substances_file: /ctsms/master_data/asp_register_20240316.xls - asp_substances_file_encoding: Cp1252 + asp_substances_file_encoding: "Cp1252" 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') }}" diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 157fabb..32838a6 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -8,6 +8,7 @@ dest_dir: "/ctsms/bulk_processor" output_dir: "{{ dest_dir }}/output" user_group: "ctsms" + hosts: all tasks: - name: Install Perl libraries and utilities ansible.builtin.apt: diff --git a/playbooks/install-cron.yml b/playbooks/install-cron.yml index 91416bf..00656b7 100644 --- a/playbooks/install-cron.yml +++ b/playbooks/install-cron.yml @@ -1,9 +1,10 @@ - name: Install cron become: true + hosts: all tasks: - name: Setup /etc/cron.d/ctsms ansible.builtin.template: - src: ./templates/crontab/ctsms.j2 + src: templates/crontab/ctsms.j2 dest: /etc/crontab/ctsms owner: root group: root @@ -12,7 +13,7 @@ - name: Setup /etc/cron.d/my_department ansible.builtin.template: - src: ./templates/crontab/my_department.j2 + src: templates/crontab/my_department.j2 dest: /etc/crontab/my_department owner: root group: root diff --git a/playbooks/install-memcached.yml b/playbooks/install-memcached.yml index 785627b..dc2ef09 100644 --- a/playbooks/install-memcached.yml +++ b/playbooks/install-memcached.yml @@ -1,5 +1,6 @@ - name: Install memcached become: true + hosts: all tasks: - name: Install memcached ansible.builtin.apt: diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml index 425d0fb..5ab0501 100644 --- a/playbooks/install-postgres.yml +++ b/playbooks/install-postgres.yml @@ -1,5 +1,6 @@ - name: Install Postgres 13 become: true + hosts: all vars: db_name: ctsms db_password: ctsms diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 1362c7f..e287e87 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -1,5 +1,6 @@ - name: Prepare CTMS directory gather_facts: true + hosts: all tasks: - name: Create /ctsms ansible.builtin.file: diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 51f69cc..fe4ab89 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -3,6 +3,7 @@ vars: certificate: "self-signed" cert_subject: "/C=AT/ST=Austria/L=Graz/O=phoenix/CN={{ ansible_hostname }}" + hosts: all tasks: - name: Install Apache and required modules ansible.builtin.apt: diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index 4bfe313..e846c37 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -1,6 +1,6 @@ - name: Install Tomcat 9 become: true - vars: + hosts: all - tasks: - name: install openjdk ansible.builtin.apt: From bbf2f5a529a4d42a6f151d3d5b1ddba4959b241e Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 17:20:49 -0700 Subject: [PATCH 032/217] Update begin-installation.yml --- playbooks/begin-installation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/begin-installation.yml b/playbooks/begin-installation.yml index 0e68caa..e6664cd 100644 --- a/playbooks/begin-installation.yml +++ b/playbooks/begin-installation.yml @@ -1,5 +1,6 @@ - name: Install Phoenix CTMS v1.8.2 gather_facts: true + hosts: all tasks: - name: Install General Packages apt: From fe0daf9caf4b086c0943e11180cb11cbed340f3d Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 17:23:14 -0700 Subject: [PATCH 033/217] Update begin-installation.yml --- playbooks/begin-installation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/begin-installation.yml b/playbooks/begin-installation.yml index e6664cd..74859f4 100644 --- a/playbooks/begin-installation.yml +++ b/playbooks/begin-installation.yml @@ -1,5 +1,6 @@ - name: Install Phoenix CTMS v1.8.2 gather_facts: true + become: true hosts: all tasks: - name: Install General Packages From 4ab1d372b8dae6b218e91ca2c10901aa1587cd71 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 17:26:59 -0700 Subject: [PATCH 034/217] Update begin-installation.yml --- playbooks/begin-installation.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/playbooks/begin-installation.yml b/playbooks/begin-installation.yml index 74859f4..9bb19fb 100644 --- a/playbooks/begin-installation.yml +++ b/playbooks/begin-installation.yml @@ -11,7 +11,6 @@ - curl - lsb-release - gnupg - - ntpd state: latest update_cache: true From af5c87bb2ecbd211eafd9be698afcc4efa2af30b Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 17:28:03 -0700 Subject: [PATCH 035/217] removing ntp for now... --- playbooks/begin-installation.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/playbooks/begin-installation.yml b/playbooks/begin-installation.yml index 9bb19fb..9162902 100644 --- a/playbooks/begin-installation.yml +++ b/playbooks/begin-installation.yml @@ -14,12 +14,6 @@ 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 From 834a35528e706dd04af8511ccb79c522a1583683 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 17:28:48 -0700 Subject: [PATCH 036/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index e287e87..4aaeaf8 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -1,6 +1,7 @@ - name: Prepare CTMS directory gather_facts: true hosts: all + become: true tasks: - name: Create /ctsms ansible.builtin.file: From ac5bac2abed1c09ff35f41c5058030aeab473209 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 17:30:10 -0700 Subject: [PATCH 037/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 4aaeaf8..41f3088 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -16,7 +16,7 @@ - name: Template dbtool to /ctsms/dbtool.sh ansible.builtin.template: - src: ./templates/dbtool.sh.j2 + src: templates/shell/dbtool.sh.j2 dest: /ctsms/dbtool.sh owner: ctsms group: ctsms From 3d9c5c396719fe0c272f5418b0f51249c1e41cca Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 17:35:34 -0700 Subject: [PATCH 038/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 41f3088..40b6af0 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -16,7 +16,7 @@ - name: Template dbtool to /ctsms/dbtool.sh ansible.builtin.template: - src: templates/shell/dbtool.sh.j2 + src: shell/dbtool.sh.j2 dest: /ctsms/dbtool.sh owner: ctsms group: ctsms @@ -24,7 +24,7 @@ - name: Template clearcache to /ctsms/clearcache.sh ansible.builtin.template: - src: ./templates/bash/clearcache.sh.j2 + src: shell/clearcache.sh.j2 dest: /ctsms/clearcache.sh owner: ctsms group: ctsms @@ -40,7 +40,7 @@ - name: Template dbtool to /ctsms/dbtool.sh ansible.builtin.template: - src: ./templates/bash/dbtool.sh.j2 + src: bash/dbtool.sh.j2 dest: /ctsms/dbtool.sh owner: ctsms group: ctsms @@ -74,7 +74,7 @@ - name: Template update to /ctsms/update ansible.builtin.template: - src: ./templates/update.j2 + src: update.j2 dest: /ctsms/update.sh owner: ctsms group: ctsms From 14c0f0db0e216bac7616065c031c1ff4bb5db02d Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 17:37:57 -0700 Subject: [PATCH 039/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 40b6af0..917fcc7 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -16,7 +16,7 @@ - name: Template dbtool to /ctsms/dbtool.sh ansible.builtin.template: - src: shell/dbtool.sh.j2 + src: ../templates/shell/dbtool.sh.j2 dest: /ctsms/dbtool.sh owner: ctsms group: ctsms @@ -24,7 +24,7 @@ - name: Template clearcache to /ctsms/clearcache.sh ansible.builtin.template: - src: shell/clearcache.sh.j2 + src: ../templates/shell/clearcache.sh.j2 dest: /ctsms/clearcache.sh owner: ctsms group: ctsms @@ -40,7 +40,7 @@ - name: Template dbtool to /ctsms/dbtool.sh ansible.builtin.template: - src: bash/dbtool.sh.j2 + src: ../templates/shell/dbtool.sh.j2 dest: /ctsms/dbtool.sh owner: ctsms group: ctsms From d4a759f3f23481ed864244b48fbd0475a394298c Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 20:59:56 -0700 Subject: [PATCH 040/217] Update begin-installation.yml --- playbooks/begin-installation.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/playbooks/begin-installation.yml b/playbooks/begin-installation.yml index 9162902..4a736c4 100644 --- a/playbooks/begin-installation.yml +++ b/playbooks/begin-installation.yml @@ -11,9 +11,16 @@ - 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 From db196c47bec04532df242749d5fce3f76cdfe9c2 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:02:35 -0700 Subject: [PATCH 041/217] Update dbtool.sh.j2 --- templates/shell/dbtool.sh.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/shell/dbtool.sh.j2 b/templates/shell/dbtool.sh.j2 index 002d185..6fa5524 100644 --- a/templates/shell/dbtool.sh.j2 +++ b/templates/shell/dbtool.sh.j2 @@ -1,5 +1,7 @@ +{% raw -%} #!/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 -Xms{{ ansible_facts['xms'] }} -Xmx{{ ansible_facts['xmx'] }} -Xss{{ ansible_facts['xss'] }} -XX:+UseParallelGC -XX:MaxGCPauseMillis=1500 -XX:GCTimeRatio=9 -XX:+CMSClassUnloadingEnabled -XX:ReservedCodeCacheSize={{ ansible_facts['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 $* +{%- endraw %} From 6766214941b6958d30a783e6c8a29e9a42725bf5 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:04:21 -0700 Subject: [PATCH 042/217] Update build-phoenix.yml --- playbooks/build-phoenix.yml | 50 ++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/playbooks/build-phoenix.yml b/playbooks/build-phoenix.yml index d8a07e8..638f3fc 100644 --- a/playbooks/build-phoenix.yml +++ b/playbooks/build-phoenix.yml @@ -22,31 +22,31 @@ repo: 'https://github.com/phoenixctms/ctsms.git' dest: /ctsms/build/ - - name: Read application.version from pom.xml - command: grep -oP '\K[^<]+' /ctsms/build/ctsms/pom.xml - register: app_version - - - name: Get short git commit hash - command: git rev-parse --short HEAD - args: - chdir: /ctsms/build/ctsms - register: git_commit - - - name: Generate a UUID - command: cat /proc/sys/kernel/random/uuid - register: uuid_output - - - name: Update application.version in pom.xml with commit hash - replace: - path: /ctsms/build/ctsms/pom.xml - regexp: '()[^<]+()' - replace: '\1{{ app_version.stdout }} [{{ git_commit.stdout }}]\2' - - - name: Update application.uuid tag with generated UUID - replace: - path: /ctsms/build/ctsms/pom.xml - regexp: '' - replace: '{{ uuid_output.stdout }}' + # - name: Read application.version from pom.xml + # command: grep -oP '\K[^<]+' /ctsms/build/ctsms/pom.xml + # register: app_version + # + # - name: Get short git commit hash + # command: git rev-parse --short HEAD + # args: + # chdir: /ctsms/build/ctsms + # register: git_commit + # + # - name: Generate a UUID + # command: cat /proc/sys/kernel/random/uuid + # register: uuid_output + # + # - name: Update application.version in pom.xml with commit hash + # replace: + # path: /ctsms/build/ctsms/pom.xml + # regexp: '()[^<]+()' + # replace: '\1{{ app_version.stdout }} [{{ git_commit.stdout }}]\2' + # + # - name: Update application.uuid tag with generated UUID + # replace: + # path: /ctsms/build/ctsms/pom.xml + # regexp: '' + # replace: '{{ uuid_output.stdout }}' - name: Run mvn install with -DskipTests command: mvn install -DskipTests From 668c4a82475ae498e019697ec5d14091801ecf1f Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:09:18 -0700 Subject: [PATCH 043/217] Update build-phoenix.yml --- playbooks/build-phoenix.yml | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/playbooks/build-phoenix.yml b/playbooks/build-phoenix.yml index 638f3fc..5574155 100644 --- a/playbooks/build-phoenix.yml +++ b/playbooks/build-phoenix.yml @@ -22,32 +22,6 @@ repo: 'https://github.com/phoenixctms/ctsms.git' dest: /ctsms/build/ - # - name: Read application.version from pom.xml - # command: grep -oP '\K[^<]+' /ctsms/build/ctsms/pom.xml - # register: app_version - # - # - name: Get short git commit hash - # command: git rev-parse --short HEAD - # args: - # chdir: /ctsms/build/ctsms - # register: git_commit - # - # - name: Generate a UUID - # command: cat /proc/sys/kernel/random/uuid - # register: uuid_output - # - # - name: Update application.version in pom.xml with commit hash - # replace: - # path: /ctsms/build/ctsms/pom.xml - # regexp: '()[^<]+()' - # replace: '\1{{ app_version.stdout }} [{{ git_commit.stdout }}]\2' - # - # - name: Update application.uuid tag with generated UUID - # replace: - # path: /ctsms/build/ctsms/pom.xml - # regexp: '' - # replace: '{{ uuid_output.stdout }}' - - name: Run mvn install with -DskipTests command: mvn install -DskipTests args: From 286778fde8e7f2ad1b994de09ea27b5ebdd83b98 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:14:10 -0700 Subject: [PATCH 044/217] adding ansible.cfg & hosts --- ansible.cfg | 3 +++ hosts | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 ansible.cfg create mode 100644 hosts 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/hosts b/hosts new file mode 100644 index 0000000..df8b5f6 --- /dev/null +++ b/hosts @@ -0,0 +1,2 @@ +[all] +localhost ansible_connection=local From 9fb18fed5e399cdb993323fb8ee27f5fe25c33b8 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:19:46 -0700 Subject: [PATCH 045/217] adding config-default as submodule --- .gitmodules | 3 +++ config-default | 1 + playbooks/prepare-ctsms-directory.yml | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) create mode 160000 config-default diff --git a/.gitmodules b/.gitmodules index 9a3a0c9..99b96ea 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "master-data"] path = master-data url = https://github.com/phoenixctms/master-data/ +[submodule "config-default"] + path = config-default + url = https://github.com/josharmenta/config-default diff --git a/config-default b/config-default new file mode 160000 index 0000000..9c1420f --- /dev/null +++ b/config-default @@ -0,0 +1 @@ +Subproject commit 9c1420fe3e8177044328e7b2f1cccdf75fa80b58 diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 917fcc7..5140c0b 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -32,7 +32,7 @@ - name: Copy config-default to /ctsms/config-default/ ansible.builtin.copy: - src: ./master-data/ + src: ../config-default/ dest: /ctsms/config-default/ owner: ctsms group: ctsms From e3173690a12a80c89c3771de3a130c78b62267fe Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:20:49 -0700 Subject: [PATCH 046/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 5140c0b..078b61e 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -48,7 +48,7 @@ - name: Copy master-data to /ctsms/master_data/ ansible.builtin.copy: - src: ./master-data/ + src: ../master-data/ dest: /ctsms/master_data/ owner: ctsms group: ctsms From 03d3a1731d7ba33e8b66d1de3c19d311296e6134 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:21:47 -0700 Subject: [PATCH 047/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 078b61e..c3c2453 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -74,7 +74,7 @@ - name: Template update to /ctsms/update ansible.builtin.template: - src: update.j2 + src: shell/update.j2 dest: /ctsms/update.sh owner: ctsms group: ctsms From 7c85caede6bf29b97f500162818aa39072b3cec8 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:22:15 -0700 Subject: [PATCH 048/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index c3c2453..d93e907 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -74,7 +74,7 @@ - name: Template update to /ctsms/update ansible.builtin.template: - src: shell/update.j2 + src: ../templates/update.j2 dest: /ctsms/update.sh owner: ctsms group: ctsms From 08b2493e0383ef20f8fafb6bf2b46a366bbb2cbb Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:23:51 -0700 Subject: [PATCH 049/217] Update tomcat9.yml --- playbooks/tomcat9.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index e846c37..99ae194 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -1,7 +1,8 @@ - name: Install Tomcat 9 + gather_facts: true become: true hosts: all -- tasks: + tasks: - name: install openjdk ansible.builtin.apt: name: openjdk From 3160227efe29d97ff38195e3b140ec2b99642998 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:28:40 -0700 Subject: [PATCH 050/217] updating packge name --- playbooks/tomcat9.yml | 4 ++-- requirements.yml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 requirements.yml diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index 99ae194..9f0ea9e 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -3,9 +3,9 @@ become: true hosts: all tasks: - - name: install openjdk + - name: install default OpenJDK ansible.builtin.apt: - name: openjdk + name: default-jdk state: present - name: install libservlet3.1-java 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 From e2f2236af87f19f96059b96457b089724fd846b7 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:35:57 -0700 Subject: [PATCH 051/217] Update tomcat9.yml --- playbooks/tomcat9.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index 9f0ea9e..81f1861 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -13,9 +13,10 @@ name: libservlet3.1-java state: present - - name: install tomcat9 - ansible.builtin.include_role: - name: vantaworks.tomcat + - name: Download and install tomcat9 .deb package + apt: + deb: http://www.mirbsd.org/~tg/Debs/dists/bookworm/wtf/Pkgs/tomcat9/tomcat9_9.0.91+dfsg-1_all.deb + become: true - name: Stop service tomcat9, if started ansible.builtin.service: From 017b16ce967a3c3a38740d6adea0cea944b8b09f Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:41:31 -0700 Subject: [PATCH 052/217] Update tomcat9.yml --- playbooks/tomcat9.yml | 112 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 108 insertions(+), 4 deletions(-) diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index 81f1861..5915c62 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -13,10 +13,114 @@ name: libservlet3.1-java state: present - - name: Download and install tomcat9 .deb package - apt: - deb: http://www.mirbsd.org/~tg/Debs/dists/bookworm/wtf/Pkgs/tomcat9/tomcat9_9.0.91+dfsg-1_all.deb - become: true + - name: Create tomcat group + group: + name: tomcat + state: present + + - name: Create tomcat user + user: + name: tomcat + group: tomcat + home: /opt/tomcat9 + shell: /bin/false + system: yes + create_home: no + + - name: Create Tomcat installation directory + file: + path: /opt/tomcat9 + state: directory + owner: tomcat + group: tomcat + mode: '0755' + + - name: Set Tomcat version + set_fact: + tomcat_version: 9.0.80 + + - 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' + + - name: Extract Tomcat archive + unarchive: + src: "/tmp/apache-tomcat-{{ tomcat_version }}.tar.gz" + dest: /opt/tomcat9 + remote_src: yes + extra_opts: [--strip-components=1] + - name: Change ownership of Tomcat directories + file: + path: "/opt/tomcat9/{{ item }}" + owner: tomcat + group: tomcat + recurse: yes + loop: + - logs + - temp + - webapps + - work + + - name: Set group ownership for the rest of Tomcat files + file: + path: /opt/tomcat9 + group: tomcat + recurse: yes + + - name: Assign read permissions to conf directory + file: + path: /opt/tomcat9/conf + mode: '0750' + recurse: yes + - 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' + - 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' + + - name: Reload systemd daemon + systemd: + daemon_reload: yes + + - name: Enable and start Tomcat service + systemd: + name: tomcat + enabled: yes + state: started - name: Stop service tomcat9, if started ansible.builtin.service: From f023db496cb9052bb4da7cbc94d570d0e5f2c23d Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:43:32 -0700 Subject: [PATCH 053/217] Update tomcat9.yml --- playbooks/tomcat9.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index 5915c62..da896e1 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -37,7 +37,7 @@ - name: Set Tomcat version set_fact: - tomcat_version: 9.0.80 + tomcat_version: 9.0.105 - name: Download Tomcat 9 archive get_url: From bc227876e63e303181fd803dcf9e34a87da20c1b Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:45:13 -0700 Subject: [PATCH 054/217] Update tomcat9.yml --- playbooks/tomcat9.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index da896e1..390ac6b 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -124,7 +124,7 @@ - name: Stop service tomcat9, if started ansible.builtin.service: - name: tomcat9 + name: tomcat state: stopped - name: allow tomcat writing to /ctsms/external_files @@ -191,5 +191,5 @@ - name: Start service tomcat9 ansible.builtin.service: - name: tomcat9 + name: tomcat state: started From 6e495e01f609b0561f570a27188448c6ed7bab23 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:46:07 -0700 Subject: [PATCH 055/217] Update tomcat9.yml --- playbooks/tomcat9.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index 390ac6b..b7cf2fb 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -183,7 +183,7 @@ - name: Template ctsms.conf to /etc/tomcat9/server.xml ansible.builtin.template: - src: ./templates/tomcat/workers.j2 + src: ../templates/tomcat/workers.j2 dest: /etc/systemd/system/tomcat9.service.d/ctsms.conf owner: root group: tomcat From a47a6cfd45b6e9f52fd895adea1867e6c0c22297 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:47:16 -0700 Subject: [PATCH 056/217] Update tomcat9.yml --- playbooks/tomcat9.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index b7cf2fb..8680c40 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -183,7 +183,7 @@ - name: Template ctsms.conf to /etc/tomcat9/server.xml ansible.builtin.template: - src: ../templates/tomcat/workers.j2 + src: ../templates/tomcat/ctsms.conf.j2 dest: /etc/systemd/system/tomcat9.service.d/ctsms.conf owner: root group: tomcat From a98ed9a5c7c41159b357217047b13faf46749876 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:48:26 -0700 Subject: [PATCH 057/217] Update tomcat9.yml --- playbooks/tomcat9.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index 8680c40..5e33e59 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -141,7 +141,7 @@ - name: Template workers.properties to /etc/tomcat9/workers.properties ansible.builtin.template: - src: ./templates/tomcat/workers.properties.j2 + src: ../templates/tomcat/workers.properties.j2 dest: /etc/tomcat9/workers.properties owner: root group: tomcat @@ -149,7 +149,7 @@ - name: Template server.xml to /etc/tomcat9/server.xml ansible.builtin.template: - src: ./templates/tomcat/server.xml.j2 + src: ../templates/tomcat/server.xml.j2 dest: /etc/tomcat9/server.xml owner: root group: tomcat From 9960d550c167060f531d4e8fe1f13d441c744268 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:49:45 -0700 Subject: [PATCH 058/217] Update tomcat9.yml --- playbooks/tomcat9.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index 5e33e59..f08864a 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -142,7 +142,7 @@ - name: Template workers.properties to /etc/tomcat9/workers.properties ansible.builtin.template: src: ../templates/tomcat/workers.properties.j2 - dest: /etc/tomcat9/workers.properties + dest: /opt/tomcat9/workers.properties owner: root group: tomcat mode: '0640' @@ -150,7 +150,7 @@ - name: Template server.xml to /etc/tomcat9/server.xml ansible.builtin.template: src: ../templates/tomcat/server.xml.j2 - dest: /etc/tomcat9/server.xml + dest: /opt/tomcat9/server.xml owner: root group: tomcat mode: '0640' From 3f25a14832bad1b60e4aee97e4b983c5de84d2f0 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 21:56:02 -0700 Subject: [PATCH 059/217] Update tomcat9.yml --- playbooks/tomcat9.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index f08864a..01238fc 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -2,6 +2,11 @@ gather_facts: true become: true hosts: all + vars: + XMS: "2048m" + XMX: "4096m" + XSS: "512k" + PERM: "256m" tasks: - name: install default OpenJDK ansible.builtin.apt: From 7b50289139e48ee64eade3fdc4850dc0e3f55dcd Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 22:00:47 -0700 Subject: [PATCH 060/217] Update build-phoenix.yml --- playbooks/build-phoenix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/build-phoenix.yml b/playbooks/build-phoenix.yml index 5574155..74de82d 100644 --- a/playbooks/build-phoenix.yml +++ b/playbooks/build-phoenix.yml @@ -20,7 +20,7 @@ - name: Clone Phoenix repository ansible.builtin.git: repo: 'https://github.com/phoenixctms/ctsms.git' - dest: /ctsms/build/ + dest: /ctsms/build/ctsms - name: Run mvn install with -DskipTests command: mvn install -DskipTests From 72f8f9a8ff6b0fc1da48472d0e7d1487513d8f04 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 22:18:25 -0700 Subject: [PATCH 061/217] Update tomcat9.yml --- playbooks/tomcat9.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index 01238fc..9b96d31 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -7,7 +7,12 @@ 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 @@ -40,10 +45,6 @@ group: tomcat mode: '0755' - - name: Set Tomcat version - set_fact: - tomcat_version: 9.0.105 - - 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" @@ -56,6 +57,7 @@ dest: /opt/tomcat9 remote_src: yes extra_opts: [--strip-components=1] + - name: Change ownership of Tomcat directories file: path: "/opt/tomcat9/{{ item }}" @@ -194,7 +196,7 @@ group: tomcat mode: '0644' - - name: Start service tomcat9 + - name: Start service tomcat ansible.builtin.service: name: tomcat state: started From e49733c39ba3646119f22db45b8efd193e0901a6 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 22:19:18 -0700 Subject: [PATCH 062/217] Update build-phoenix.yml --- playbooks/build-phoenix.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/playbooks/build-phoenix.yml b/playbooks/build-phoenix.yml index 74de82d..a8c462d 100644 --- a/playbooks/build-phoenix.yml +++ b/playbooks/build-phoenix.yml @@ -29,11 +29,6 @@ register: mvn_install changed_when: "'BUILD SUCCESS' in mvn_install.stdout" - - name: Check if .war file exists - stat: - path: "/ctsms/build/ctsms/web/target/ctsms-{{ app_version.stdout }}.war" - register: war_file - - name: Retry mvn install if .war file was not created command: mvn install -DskipTests args: From 9283ebc749b2af7c983f8d41c766898368c159d3 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 22:30:04 -0700 Subject: [PATCH 063/217] Update build-phoenix.yml --- playbooks/build-phoenix.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/playbooks/build-phoenix.yml b/playbooks/build-phoenix.yml index a8c462d..a48964a 100644 --- a/playbooks/build-phoenix.yml +++ b/playbooks/build-phoenix.yml @@ -29,13 +29,13 @@ 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: 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: > From 5c5392ae5c77a96d73633b45f2253b71534433ec Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 22:44:35 -0700 Subject: [PATCH 064/217] Update install-postgres.yml --- playbooks/install-postgres.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml index 5ab0501..3eb0f49 100644 --- a/playbooks/install-postgres.yml +++ b/playbooks/install-postgres.yml @@ -21,6 +21,18 @@ 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 psycopg2 + ansible.builtin.apt: + name: postgresql + state: present + notify: Restart PostgreSQL + - name: Create PostgreSQL user community.postgresql.postgresql_user: name: "{{ db_name }}" From 3e7e08ddc85788e1d22de260994a189bd3465524 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 22:57:18 -0700 Subject: [PATCH 065/217] Update install-postgres.yml --- playbooks/install-postgres.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml index 3eb0f49..5ece976 100644 --- a/playbooks/install-postgres.yml +++ b/playbooks/install-postgres.yml @@ -27,7 +27,7 @@ state: present notify: Restart PostgreSQL - - name: install psycopg2 + - name: install postgresql ansible.builtin.apt: name: postgresql state: present @@ -61,7 +61,8 @@ - name: Run dbtool.sql as postgres community.postgresql.postgresql_script: db: "{{ db_name }}" - login_user: postgres + become: true + become_user: postgres executable: psql path: "{{ dbtool_sql_path }}" notify: Restart PostgreSQL From 42fc94c3d4ebd93c086bbbff17302eb437a7b339 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 23:18:50 -0700 Subject: [PATCH 066/217] Update install-postgres.yml --- playbooks/install-postgres.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml index 5ece976..bf2b98c 100644 --- a/playbooks/install-postgres.yml +++ b/playbooks/install-postgres.yml @@ -28,6 +28,7 @@ notify: Restart PostgreSQL - name: install postgresql + ansible.builtin.apt: name: postgresql state: present @@ -37,17 +38,19 @@ community.postgresql.postgresql_user: name: "{{ db_name }}" password: "{{ db_password }}" - login_user: postgres notify: Restart PostgreSQL - name: Create PostgreSQL database with correct owner + become: true + become_user: postgres community.postgresql.postgresql_db: name: ctsms owner: ctsms - login_user: postgres notify: Restart PostgreSQL - name: Grant all privileges on the database to the user + become: true + become_user: postgres community.postgresql.postgresql_privs: db: ctsms roles: ctsms @@ -55,38 +58,40 @@ privs: ALL objs: ctsms grant_option: no - login_user: postgres notify: Restart PostgreSQL - name: Run dbtool.sql as postgres + become: true + become_user: postgres community.postgresql.postgresql_script: db: "{{ db_name }}" - become: true - become_user: postgres executable: psql path: "{{ dbtool_sql_path }}" notify: Restart PostgreSQL - name: Run schema-create.sql as ctsms + become: true + become_user: ctsms community.postgresql.postgresql_script: db: "{{ db_name }}" - login_user: ctsms executable: psql path: "{{ schema_create_sql_path }}" notify: Restart PostgreSQL - name: Run index-create.sql as ctsms + become: true + become_user: ctsms community.postgresql.postgresql_script: db: "{{ db_name }}" - login_user: ctsms executable: psql path: "{{ index_create_sql_path }}" notify: Restart PostgreSQL - name: Run schema-set-version.sql as ctsms + become: true + become_user: ctsms community.postgresql.postgresql_script: db: "{{ db_name }}" - login_user: ctsms executable: psql path: "{{ schema_set_version_sql_path }}" notify: Restart PostgreSQL From 9cd668979141b40deba2f9a34d2b2c8d0eadfcf4 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 23:31:25 -0700 Subject: [PATCH 067/217] Update install-postgres.yml --- playbooks/install-postgres.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml index bf2b98c..f40f455 100644 --- a/playbooks/install-postgres.yml +++ b/playbooks/install-postgres.yml @@ -28,13 +28,14 @@ notify: Restart PostgreSQL - name: install postgresql - ansible.builtin.apt: name: postgresql state: present notify: Restart PostgreSQL - name: Create PostgreSQL user + become: true + become_user: postgres community.postgresql.postgresql_user: name: "{{ db_name }}" password: "{{ db_password }}" From 567644cf9144707b54d91cdc1cf754f13b416077 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 23:34:22 -0700 Subject: [PATCH 068/217] Update install-postgres.yml --- playbooks/install-postgres.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml index f40f455..e00a3ab 100644 --- a/playbooks/install-postgres.yml +++ b/playbooks/install-postgres.yml @@ -37,9 +37,9 @@ become: true become_user: postgres community.postgresql.postgresql_user: - name: "{{ db_name }}" + name: ctsms password: "{{ db_password }}" - notify: Restart PostgreSQL + login: true - name: Create PostgreSQL database with correct owner become: true @@ -47,7 +47,6 @@ community.postgresql.postgresql_db: name: ctsms owner: ctsms - notify: Restart PostgreSQL - name: Grant all privileges on the database to the user become: true From ebf57e5f6628a1a3f6a57cedbc78d866748eb7e4 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 23:36:05 -0700 Subject: [PATCH 069/217] Update install-postgres.yml --- playbooks/install-postgres.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml index e00a3ab..222868d 100644 --- a/playbooks/install-postgres.yml +++ b/playbooks/install-postgres.yml @@ -71,7 +71,7 @@ - name: Run schema-create.sql as ctsms become: true - become_user: ctsms + become_user: postgres community.postgresql.postgresql_script: db: "{{ db_name }}" executable: psql @@ -80,7 +80,7 @@ - name: Run index-create.sql as ctsms become: true - become_user: ctsms + become_user: postgres community.postgresql.postgresql_script: db: "{{ db_name }}" executable: psql @@ -89,7 +89,7 @@ - name: Run schema-set-version.sql as ctsms become: true - become_user: ctsms + become_user: postgres community.postgresql.postgresql_script: db: "{{ db_name }}" executable: psql From 198f98da47fc634285bd28c883bfca85ebc96514 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 23:37:38 -0700 Subject: [PATCH 070/217] Update install-postgres.yml --- playbooks/install-postgres.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml index 222868d..05bc7bb 100644 --- a/playbooks/install-postgres.yml +++ b/playbooks/install-postgres.yml @@ -35,7 +35,7 @@ - name: Create PostgreSQL user become: true - become_user: postgres + community.postgresql.postgresql_user: name: ctsms password: "{{ db_password }}" @@ -43,14 +43,14 @@ - name: Create PostgreSQL database with correct owner become: true - become_user: postgres + community.postgresql.postgresql_db: name: ctsms owner: ctsms - name: Grant all privileges on the database to the user become: true - become_user: postgres + community.postgresql.postgresql_privs: db: ctsms roles: ctsms @@ -62,7 +62,7 @@ - name: Run dbtool.sql as postgres become: true - become_user: postgres + community.postgresql.postgresql_script: db: "{{ db_name }}" executable: psql @@ -71,7 +71,7 @@ - name: Run schema-create.sql as ctsms become: true - become_user: postgres + community.postgresql.postgresql_script: db: "{{ db_name }}" executable: psql @@ -80,7 +80,6 @@ - name: Run index-create.sql as ctsms become: true - become_user: postgres community.postgresql.postgresql_script: db: "{{ db_name }}" executable: psql @@ -89,7 +88,6 @@ - name: Run schema-set-version.sql as ctsms become: true - become_user: postgres community.postgresql.postgresql_script: db: "{{ db_name }}" executable: psql From 4a7ceaa83400fbf787ec0ea14fc0f250ff799fda Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 23:39:13 -0700 Subject: [PATCH 071/217] Update install-postgres.yml --- playbooks/install-postgres.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml index 05bc7bb..6377b2c 100644 --- a/playbooks/install-postgres.yml +++ b/playbooks/install-postgres.yml @@ -35,7 +35,6 @@ - name: Create PostgreSQL user become: true - community.postgresql.postgresql_user: name: ctsms password: "{{ db_password }}" @@ -43,11 +42,9 @@ - name: Create PostgreSQL database with correct owner become: true - community.postgresql.postgresql_db: name: ctsms owner: ctsms - - name: Grant all privileges on the database to the user become: true @@ -62,7 +59,6 @@ - name: Run dbtool.sql as postgres become: true - community.postgresql.postgresql_script: db: "{{ db_name }}" executable: psql @@ -71,7 +67,6 @@ - name: Run schema-create.sql as ctsms become: true - community.postgresql.postgresql_script: db: "{{ db_name }}" executable: psql From 385f7df92bced0a72cce0530e224cfa589c74b71 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 23:43:20 -0700 Subject: [PATCH 072/217] Update install-postgres.yml --- playbooks/install-postgres.yml | 86 +++++++++++++++++----------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml index 6377b2c..29039a4 100644 --- a/playbooks/install-postgres.yml +++ b/playbooks/install-postgres.yml @@ -33,61 +33,61 @@ state: present notify: Restart PostgreSQL - - name: Create PostgreSQL user - become: true +--- +- name: Set up PostgreSQL database for CTSMS + hosts: dbserver # Change to your target host group + become: true + vars: + db_user: ctsms + db_password: ctsms + db_name: ctsms + sql_dir: /ctsms/build/ctsms/core/db + + tasks: + - name: Ensure PostgreSQL user exists + become_user: postgres community.postgresql.postgresql_user: - name: ctsms + name: "{{ db_user }}" password: "{{ db_password }}" - login: true + role_attr_flags: LOGIN - - name: Create PostgreSQL database with correct owner - become: true + - name: Create the CTSMS database + become_user: postgres community.postgresql.postgresql_db: - name: ctsms - owner: ctsms - - name: Grant all privileges on the database to the user - become: true + name: "{{ db_name }}" + owner: "{{ db_user }}" + - name: Grant all privileges on the database + become_user: postgres community.postgresql.postgresql_privs: - db: ctsms - roles: ctsms + database: "{{ db_name }}" + roles: "{{ db_user }}" type: database privs: ALL - objs: ctsms - grant_option: no - notify: Restart PostgreSQL - - name: Run dbtool.sql as postgres - become: true - community.postgresql.postgresql_script: - db: "{{ db_name }}" - executable: psql - path: "{{ dbtool_sql_path }}" - notify: Restart PostgreSQL + - name: Import dbtool.sql as postgres + become_user: postgres + ansible.builtin.shell: psql {{ db_name }} < {{ sql_dir }}/dbtool.sql + args: + executable: /bin/bash - - name: Run schema-create.sql as ctsms - become: true - community.postgresql.postgresql_script: - db: "{{ db_name }}" - executable: psql - path: "{{ schema_create_sql_path }}" - notify: Restart PostgreSQL + - name: Import schema-create.sql as ctsms + become_user: "{{ db_user }}" + ansible.builtin.shell: psql -U {{ db_user }} {{ db_name }} < {{ sql_dir }}/schema-create.sql + args: + executable: /bin/bash - - name: Run index-create.sql as ctsms - become: true - community.postgresql.postgresql_script: - db: "{{ db_name }}" - executable: psql - path: "{{ index_create_sql_path }}" - notify: Restart PostgreSQL + - name: Import index-create.sql as ctsms + become_user: "{{ db_user }}" + ansible.builtin.shell: psql -U {{ db_user }} {{ db_name }} < {{ sql_dir }}/index-create.sql + args: + executable: /bin/bash - - name: Run schema-set-version.sql as ctsms - become: true - community.postgresql.postgresql_script: - db: "{{ db_name }}" - executable: psql - path: "{{ schema_set_version_sql_path }}" - notify: Restart PostgreSQL + - name: Import schema-set-version.sql as ctsms + become_user: "{{ db_user }}" + ansible.builtin.shell: psql -U {{ db_user }} {{ db_name }} < {{ sql_dir }}/schema-set-version.sql + args: + executable: /bin/bash ### ### Any custom scripts needing to add to the database should be invoked here. From 7224d05dca3e609e80081c9cb3f60f7e08ebca54 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 23:44:16 -0700 Subject: [PATCH 073/217] Update install-postgres.yml --- playbooks/install-postgres.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml index 29039a4..117fbbd 100644 --- a/playbooks/install-postgres.yml +++ b/playbooks/install-postgres.yml @@ -33,17 +33,6 @@ state: present notify: Restart PostgreSQL ---- -- name: Set up PostgreSQL database for CTSMS - hosts: dbserver # Change to your target host group - become: true - vars: - db_user: ctsms - db_password: ctsms - db_name: ctsms - sql_dir: /ctsms/build/ctsms/core/db - - tasks: - name: Ensure PostgreSQL user exists become_user: postgres community.postgresql.postgresql_user: From 0503607f065aab6730dc89dee48a62dd4b44dcd8 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 23:45:10 -0700 Subject: [PATCH 074/217] Update install-postgres.yml --- playbooks/install-postgres.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml index 117fbbd..3f30855 100644 --- a/playbooks/install-postgres.yml +++ b/playbooks/install-postgres.yml @@ -2,7 +2,7 @@ become: true hosts: all vars: - db_name: ctsms + 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 From 3393df88287ab8f0d598ed7d4626b71d7283f63a Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 23:47:10 -0700 Subject: [PATCH 075/217] Update install-postgres.yml --- playbooks/install-postgres.yml | 55 +++++++++++----------------------- 1 file changed, 17 insertions(+), 38 deletions(-) diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml index 3f30855..8152bc6 100644 --- a/playbooks/install-postgres.yml +++ b/playbooks/install-postgres.yml @@ -33,50 +33,29 @@ state: present notify: Restart PostgreSQL - - name: Ensure PostgreSQL user exists - become_user: postgres - community.postgresql.postgresql_user: - name: "{{ db_user }}" - password: "{{ db_password }}" - role_attr_flags: LOGIN + - name: Create PostgreSQL user ctsms + shell: sudo -u postgres psql postgres -c "CREATE USER ctsms WITH PASSWORD 'ctsms';" - - name: Create the CTSMS database - become_user: postgres - community.postgresql.postgresql_db: - name: "{{ db_name }}" - owner: "{{ db_user }}" + - name: Create database ctsms + shell: sudo -u postgres psql postgres -c "CREATE DATABASE ctsms;" - - name: Grant all privileges on the database - become_user: postgres - community.postgresql.postgresql_privs: - database: "{{ db_name }}" - roles: "{{ db_user }}" - type: database - privs: ALL + - 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: Import dbtool.sql as postgres - become_user: postgres - ansible.builtin.shell: psql {{ db_name }} < {{ sql_dir }}/dbtool.sql - args: - executable: /bin/bash + - name: Change owner of ctsms database to ctsms user + shell: sudo -u postgres psql postgres -c "ALTER DATABASE ctsms OWNER TO ctsms;" - - name: Import schema-create.sql as ctsms - become_user: "{{ db_user }}" - ansible.builtin.shell: psql -U {{ db_user }} {{ db_name }} < {{ sql_dir }}/schema-create.sql - args: - executable: /bin/bash + - name: Run dbtool.sql as postgres + shell: sudo -u postgres psql ctsms < /ctsms/build/ctsms/core/db/dbtool.sql - - name: Import index-create.sql as ctsms - become_user: "{{ db_user }}" - ansible.builtin.shell: psql -U {{ db_user }} {{ db_name }} < {{ sql_dir }}/index-create.sql - args: - executable: /bin/bash + - name: Run schema-create.sql as ctsms + shell: sudo -u ctsms psql -U ctsms ctsms < /ctsms/build/ctsms/core/db/schema-create.sql - - name: Import schema-set-version.sql as ctsms - become_user: "{{ db_user }}" - ansible.builtin.shell: psql -U {{ db_user }} {{ db_name }} < {{ sql_dir }}/schema-set-version.sql - args: - executable: /bin/bash + - 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 ### ### Any custom scripts needing to add to the database should be invoked here. From 934b1265855593557dfa16858947ba99b222f5e0 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 14 May 2025 23:48:50 -0700 Subject: [PATCH 076/217] Update install-postgres.yml --- playbooks/install-postgres.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml index 8152bc6..61ffa33 100644 --- a/playbooks/install-postgres.yml +++ b/playbooks/install-postgres.yml @@ -63,7 +63,7 @@ - name: Set join_collapse_limit to 1 in postgresql.conf ansible.builtin.replace: - path: /etc/postgresql/13/main/postgresql.conf + path: /etc/postgresql/15/main/postgresql.conf regexp: '^#?join_collapse_limit\s*=.*' replace: 'join_collapse_limit = 1' notify: Restart PostgreSQL From 31ac42a5a457620570aad97df5ddbb784cd85e8c Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 00:29:25 -0700 Subject: [PATCH 077/217] Update enable-remote-access.yml --- playbooks/enable-remote-access.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playbooks/enable-remote-access.yml b/playbooks/enable-remote-access.yml index d3b86da..9d7f302 100644 --- a/playbooks/enable-remote-access.yml +++ b/playbooks/enable-remote-access.yml @@ -9,7 +9,7 @@ - name: Set listen_addresses in postgresql.conf ansible.builtin.lineinfile: - path: /etc/postgresql/13/main/postgresql.conf + path: /etc/postgresql/15/main/postgresql.conf regexp: '^#?listen_addresses\s*=' line: "listen_addresses = '*'" backup: yes @@ -17,7 +17,7 @@ - name: Allow IPv4 remote connections in pg_hba.conf ansible.builtin.lineinfile: - path: /etc/postgresql/13/main/pg_hba.conf + path: /etc/postgresql/15/main/pg_hba.conf line: 'host all all 0.0.0.0/0 md5' state: present create: yes @@ -26,7 +26,7 @@ - name: Allow IPv6 remote connections in pg_hba.conf ansible.builtin.lineinfile: - path: /etc/postgresql/13/main/pg_hba.conf + path: /etc/postgresql/15/main/pg_hba.conf line: 'host all all ::/0 md5' state: present create: yes From a99b5dbd3c973cdce44ab19fd60bbafd39bea3af Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 00:49:27 -0700 Subject: [PATCH 078/217] update --- playbooks/deploy-war.yml | 2 ++ playbooks/render-workflow-diagrams.yml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/playbooks/deploy-war.yml b/playbooks/deploy-war.yml index eb9ac53..6fba6f9 100644 --- a/playbooks/deploy-war.yml +++ b/playbooks/deploy-war.yml @@ -1,6 +1,8 @@ - name: Deploy .war become: true hosts: all + vars: + version: 1.8.1 tasks: - name: Change file ownership, group and permissions ansible.builtin.file: diff --git a/playbooks/render-workflow-diagrams.yml b/playbooks/render-workflow-diagrams.yml index ef1cf2c..1cc31fb 100644 --- a/playbooks/render-workflow-diagrams.yml +++ b/playbooks/render-workflow-diagrams.yml @@ -17,7 +17,7 @@ - name: Stop Tomcat service ansible.builtin.service: - name: tomcat9 + name: tomcat state: stopped - name: Remove exploded ROOT webapp @@ -34,5 +34,5 @@ - name: Start Tomcat service ansible.builtin.service: - name: tomcat9 + name: tomcat state: started From 9ba6b10bf1225b91775755cbeebe8cd3e9c3c36c Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 11:36:17 -0700 Subject: [PATCH 079/217] Update deploy-war.yml --- playbooks/deploy-war.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/deploy-war.yml b/playbooks/deploy-war.yml index 6fba6f9..1f6fcd4 100644 --- a/playbooks/deploy-war.yml +++ b/playbooks/deploy-war.yml @@ -17,5 +17,5 @@ - name: Copy .war to Tomcat directory ansible.builtin.copy: src: /ctsms/build/ctsms/web/target/ctsms-{{ version }}.war - dest: /var/lib/tomcat9/webapps/ROOT.war + dest: /opt/tomcat9/webapps/ROOT.war mode: '0755' From 1ca97b3cdad5d81afeb22dab1c03bd6a432e6a84 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 11:40:40 -0700 Subject: [PATCH 080/217] Update deploy-war.yml --- playbooks/deploy-war.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/deploy-war.yml b/playbooks/deploy-war.yml index 1f6fcd4..6bc9c42 100644 --- a/playbooks/deploy-war.yml +++ b/playbooks/deploy-war.yml @@ -9,7 +9,7 @@ path: /ctsms/build/ctsms/web/target/ctsms-{{ version }}.war mode: '0755' - - name: Remove /ctsms/bulk_processor + - name: Remove /var/lib/tomcat9/webapps/ROOT/ ansible.builtin.file: path: /var/lib/tomcat9/webapps/ROOT/ state: absent From 3c95a8299694cd67505fb045ba91725c4d59cfad Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 12:00:46 -0700 Subject: [PATCH 081/217] minor updates --- playbooks/enable-remote-access.yml | 2 +- playbooks/install-bulk-processor.yml | 1 + playbooks/install-memcached.yml | 8 ++++---- playbooks/render-workflow-diagrams.yml | 3 +++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/playbooks/enable-remote-access.yml b/playbooks/enable-remote-access.yml index 9d7f302..980877b 100644 --- a/playbooks/enable-remote-access.yml +++ b/playbooks/enable-remote-access.yml @@ -1,4 +1,4 @@ -- name: Install Postgres 13 +- name: Enable Remote Access become: true hosts: all tasks: diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 32838a6..4ca4420 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -1,5 +1,6 @@ - name: Install bulk-processor become: true + hosts: all vars: tag: "master" base_url: "https://github.com/phoenixctms" diff --git a/playbooks/install-memcached.yml b/playbooks/install-memcached.yml index dc2ef09..1010a68 100644 --- a/playbooks/install-memcached.yml +++ b/playbooks/install-memcached.yml @@ -7,27 +7,27 @@ name: memcached state: present update_cache: true - notify: Restart Memcached + notify: Restart memcached - name: Ensure /var/run/memcached has correct permissions ansible.builtin.file: path: /var/run/memcached mode: '0777' - notify: Restart Memcached + 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 + 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 + notify: Restart memcached handlers: - name: Restart memcached diff --git a/playbooks/render-workflow-diagrams.yml b/playbooks/render-workflow-diagrams.yml index 1cc31fb..ff13529 100644 --- a/playbooks/render-workflow-diagrams.yml +++ b/playbooks/render-workflow-diagrams.yml @@ -1,4 +1,7 @@ - name: Final configuration + gather_facts: true + hosts: all + become: true tasks: - name: Run render.sh ansible.builtin.command: From 5fce229c657ed28a9d9b7ffda8a821556f2b3f45 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 12:33:27 -0700 Subject: [PATCH 082/217] Troubleshooting perl issues --- playbooks/install-bulk-processor.yml | 8 ++++---- playbooks/setup-apache2.yml | 14 +++++++------- playbooks/tomcat9.yml | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 4ca4420..4e70bdf 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -110,7 +110,7 @@ community.general.cpanm: name: - Dancer - - DateTime::Format::Excel + - DateTime - Spreadsheet::Reader::Format - Spreadsheet::Reader::ExcelXML mode: compatibility @@ -177,7 +177,7 @@ - name: Template ecrfdataexport.sh to /ctsms/ ansible.builtin.template: - src: ./templates/ecrfdataexport.j2 + src: ../templates/shell/ecrfdataexport.j2 dest: /ctsms/ecrfdataexport.sh owner: ctsms group: ctsms @@ -185,7 +185,7 @@ - name: Template ecrfdataeimport.sh to /ctsms/ ansible.builtin.template: - src: ./templates/ecrfdataimport.j2 + src: ../templates/shell/ecrfdataimport.j2 dest: /ctsms/ecrfdataimport.sh owner: ctsms group: ctsms @@ -193,7 +193,7 @@ - name: Template inquirydataexport.sh to /ctsms/ ansible.builtin.template: - src: ./templates/inquirydataexport.j2 + src: ../templates/shell/inquirydataexport.j2 dest: /ctsms/inquirydataexport.sh owner: ctsms group: ctsms diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index fe4ab89..2ccd976 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -26,27 +26,27 @@ - name: Template 00_ctsms_http.conf to /etc/apache2/sites-available/ ansible.builtin.template: - src: ./templates/apache/00_ctsms_http.conf.j2 + src: ../templates/apache/00_ctsms_http.conf.j2 dest: /etc/apache2/sites-available/00_ctsms_http.conf notify: Restart Apache2 - name: Template 00_ctsms_https.conf to /etc/apache2/sites-available/ ansible.builtin.template: - src: ./templates/apache/00_ctsms_https.conf.j2 + src: ../templates/apache/00_ctsms_https.conf.j2 dest: /etc/apache2/sites-available/00_ctsms_https.conf - notify: Restart Apache2 + notify: Reload Apache - name: Template blocklist.conf to /etc/apache2/ ansible.builtin.template: - src: ./templates/apache/blocklist.conf.j2 + src: ../templates/apache/blocklist.conf.j2 dest: /etc/apache2/blocklist.conf - notify: Restart Apache2 + notify: Reload Apache - name: Template jk.conf to /etc/apache2/mods-available/ ansible.builtin.template: - src: ./templates/apache/jk.conf.j2 + src: ../templates/apache/jk.conf.j2 dest: /etc/apache2/mods-available/ - notify: Restart Apache2 + notify: Reload Apache - name: Disable default Apache site ansible.builtin.command: a2dissite 000-default.conf diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index 9b96d31..b590167 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -146,7 +146,7 @@ groups: tomcat,adm append: yes - - name: Template workers.properties to /etc/tomcat9/workers.properties + - name: Template workers.properties to /opt/tomcat9/workers.properties ansible.builtin.template: src: ../templates/tomcat/workers.properties.j2 dest: /opt/tomcat9/workers.properties @@ -154,7 +154,7 @@ group: tomcat mode: '0640' - - name: Template server.xml to /etc/tomcat9/server.xml + - name: Template server.xml to /opt/tomcat9/server.xml ansible.builtin.template: src: ../templates/tomcat/server.xml.j2 dest: /opt/tomcat9/server.xml From 6bf6cbf14120eb3896789f3928f0bb98f499d603 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 12:58:39 -0700 Subject: [PATCH 083/217] de3bugging perl --- playbooks/install-bulk-processor.yml | 23 +++++++++++++++++------ playbooks/install-postgres.yml | 4 ---- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 4e70bdf..07b74ef 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -106,13 +106,24 @@ - threads when: ansible_os_family != "Debian" - - name: Install Perl modules from CPANM + - name: Install Dancer module from CPANM community.general.cpanm: - name: - - Dancer - - DateTime - - Spreadsheet::Reader::Format - - Spreadsheet::Reader::ExcelXML + name: Dancer + mode: compatibility + + - name: Install DateTime module from CPANM + community.general.cpanm: + name: DateTime + 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 diff --git a/playbooks/install-postgres.yml b/playbooks/install-postgres.yml index 61ffa33..7f27b07 100644 --- a/playbooks/install-postgres.yml +++ b/playbooks/install-postgres.yml @@ -57,10 +57,6 @@ - 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 -### -### Any custom scripts needing to add to the database should be invoked here. -### - - name: Set join_collapse_limit to 1 in postgresql.conf ansible.builtin.replace: path: /etc/postgresql/15/main/postgresql.conf From 08a67f1cd4d8bd71de156f89162a08cb4badb124 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:05:21 -0700 Subject: [PATCH 084/217] testing --- install.yml | 16 ++++++++-------- playbooks/install-bulk-processor.yml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/install.yml b/install.yml index 3f7da9d..b213c04 100644 --- a/install.yml +++ b/install.yml @@ -1,11 +1,11 @@ -- 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/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/install-cron.yml diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 07b74ef..7c0f0df 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -139,7 +139,7 @@ - name: Extract bulk-processor archive ansible.builtin.unarchive: src: /ctsms/bulk-processor.tar.gz - dest: /ctsms/bulk_processor + dest: /ctsms/ remote_src: true extra_opts: - --strip-components=1 From 28077f76d9075dda7a5a09eaaf7ba94e89cd90ff Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:07:12 -0700 Subject: [PATCH 085/217] Update install-bulk-processor.yml --- playbooks/install-bulk-processor.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 7c0f0df..11ee060 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -136,10 +136,15 @@ headers: Content-Disposition: "attachment" + - name: Create /ctsms/bulk_processor + ansible.builtin.file: + path: /ctsms/bulk_processor + state: present + - name: Extract bulk-processor archive ansible.builtin.unarchive: src: /ctsms/bulk-processor.tar.gz - dest: /ctsms/ + dest: /ctsms/bulk_processor remote_src: true extra_opts: - --strip-components=1 From 0b74d94f7ce8b96c7bb1d9289b3b68737356e9be Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:07:46 -0700 Subject: [PATCH 086/217] Update install-bulk-processor.yml --- playbooks/install-bulk-processor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 11ee060..9e45d00 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -139,7 +139,7 @@ - name: Create /ctsms/bulk_processor ansible.builtin.file: path: /ctsms/bulk_processor - state: present + state: directory - name: Extract bulk-processor archive ansible.builtin.unarchive: From 7bbd593b9309d9cb2fb7c774182b9cc5e879f983 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:08:46 -0700 Subject: [PATCH 087/217] Update install-bulk-processor.yml --- playbooks/install-bulk-processor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 9e45d00..3bfef30 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -113,7 +113,7 @@ - name: Install DateTime module from CPANM community.general.cpanm: - name: DateTime + name: DateTime::Format::Excel mode: compatibility - name: Install Spreadsheet::Reader::Format module from CPANM From 3aff5a79acfe48148efd417852023088574577d2 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:11:10 -0700 Subject: [PATCH 088/217] Update install-bulk-processor.yml --- playbooks/install-bulk-processor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 3bfef30..b24195c 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -151,7 +151,7 @@ - name: Run minify.pl on Signup folder ansible.builtin.command: - cmd: > + cmd: | perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup From d02f306bf0f1e03da5d2ae26655c8fb8d9331a18 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:12:01 -0700 Subject: [PATCH 089/217] Update install-bulk-processor.yml --- playbooks/install-bulk-processor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index b24195c..cbe6c23 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -152,7 +152,7 @@ - name: Run minify.pl on Signup folder ansible.builtin.command: cmd: | - perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl + perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl \ --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup - name: Create /ctsms/bulk_processor/output directory From 6368f87a4cc571ace6c83214492c580a679b1187 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:12:53 -0700 Subject: [PATCH 090/217] Update install-bulk-processor.yml --- playbooks/install-bulk-processor.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index cbe6c23..6ec3ad5 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -151,9 +151,7 @@ - name: Run minify.pl on Signup folder ansible.builtin.command: - cmd: | - perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl \ - --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup + cmd: perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup - name: Create /ctsms/bulk_processor/output directory ansible.builtin.file: From 3ff0823d496804fdc8ecdfdf9b3eb3b4012473c1 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:30:55 -0700 Subject: [PATCH 091/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 2ccd976..8f00b13 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -13,7 +13,7 @@ - libapache2-mod-fcgid state: present update_cache: true - notify: Restart Apache2 + notify: Reload Apache - name: Add www-data to tomcat and ctsms groups ansible.builtin.user: @@ -22,13 +22,13 @@ - tomcat - ctsms append: true - notify: Restart Apache2 + notify: Reload Apache - 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: Restart Apache2 + notify: Reload Apache - name: Template 00_ctsms_https.conf to /etc/apache2/sites-available/ ansible.builtin.template: From 8d14ddca22583e236d60299ba8d333b7f9fa1cc1 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:33:28 -0700 Subject: [PATCH 092/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 8f00b13..6b797af 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -90,7 +90,7 @@ notify: Reload Apache # Handler to reload Apache - - name: Reload Apache + - handler: Reload Apache ansible.builtin.service: name: apache2 state: reloaded From de1ba521d8052d62be538dbbac013abd5f792b1c Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:34:30 -0700 Subject: [PATCH 093/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 6b797af..4b6217f 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -89,8 +89,8 @@ ansible.builtin.command: a2ensite 00_ctsms_https.conf notify: Reload Apache - # Handler to reload Apache - - handler: Reload Apache + handlers: + - name: Reload Apache ansible.builtin.service: name: apache2 - state: reloaded + state: restarted From 5921d47da567a25e4e6e5ec7507c1b30fc44497f Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:37:04 -0700 Subject: [PATCH 094/217] adding raw to apache templates --- templates/apache/00_ctsms_http.conf.j2 | 3 +++ templates/apache/00_ctsms_https.conf.j2 | 3 +++ templates/apache/blocklist.conf.j2 | 3 +++ templates/apache/jk.conf.j2 | 4 +++- templates/apache/ports.conf.j2 | 2 ++ 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/templates/apache/00_ctsms_http.conf.j2 b/templates/apache/00_ctsms_http.conf.j2 index f08acba..48315d0 100644 --- a/templates/apache/00_ctsms_http.conf.j2 +++ b/templates/apache/00_ctsms_http.conf.j2 @@ -1,3 +1,5 @@ +{% raw -%} + ServerName localhost:80 @@ -9,3 +11,4 @@ UseCanonicalName Off ServerSignature On +{%- endraw %} diff --git a/templates/apache/00_ctsms_https.conf.j2 b/templates/apache/00_ctsms_https.conf.j2 index dc602b5..b5bf0b7 100644 --- a/templates/apache/00_ctsms_https.conf.j2 +++ b/templates/apache/00_ctsms_https.conf.j2 @@ -1,3 +1,5 @@ +{% raw -%} + # # @@ -79,3 +81,4 @@ # # +{%- endraw %} diff --git a/templates/apache/blocklist.conf.j2 b/templates/apache/blocklist.conf.j2 index 32ea3d5..a3774c9 100644 --- a/templates/apache/blocklist.conf.j2 +++ b/templates/apache/blocklist.conf.j2 @@ -1,3 +1,5 @@ +{% raw -%} + order deny,allow @@ -141,3 +143,4 @@ deny from 194.208.62.0/24 192.251.226.0/24 188.143.232.0/24 188.143.233.0/24 178 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/templates/apache/jk.conf.j2 b/templates/apache/jk.conf.j2 index 2ca7da2..3bc5bb0 100644 --- a/templates/apache/jk.conf.j2 +++ 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 index 240ceb1..fe5f0b6 100644 --- a/templates/apache/ports.conf.j2 +++ b/templates/apache/ports.conf.j2 @@ -1,3 +1,4 @@ +{% 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 @@ -21,3 +22,4 @@ Listen 80 # vim: syntax=apache ts=4 sw=4 sts=4 sr noet +{%- endraw %} From b744462ccf1d8e698ba4787ae5d4ee5c8d22f826 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:38:43 -0700 Subject: [PATCH 095/217] Update install-cron.yml --- playbooks/install-cron.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/install-cron.yml b/playbooks/install-cron.yml index 00656b7..c14c48e 100644 --- a/playbooks/install-cron.yml +++ b/playbooks/install-cron.yml @@ -4,7 +4,7 @@ tasks: - name: Setup /etc/cron.d/ctsms ansible.builtin.template: - src: templates/crontab/ctsms.j2 + src: ../templates/crontab/ctsms.j2 dest: /etc/crontab/ctsms owner: root group: root @@ -13,7 +13,7 @@ - name: Setup /etc/cron.d/my_department ansible.builtin.template: - src: templates/crontab/my_department.j2 + src: ../templates/crontab/my_department.j2 dest: /etc/crontab/my_department owner: root group: root From 562a259740d9bc1a799f67f2a7b95e0852295189 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:42:04 -0700 Subject: [PATCH 096/217] Update install-cron.yml --- playbooks/install-cron.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/install-cron.yml b/playbooks/install-cron.yml index c14c48e..e688f2b 100644 --- a/playbooks/install-cron.yml +++ b/playbooks/install-cron.yml @@ -5,7 +5,7 @@ - name: Setup /etc/cron.d/ctsms ansible.builtin.template: src: ../templates/crontab/ctsms.j2 - dest: /etc/crontab/ctsms + dest: /etc/cron.d/ctsms owner: root group: root mode: "0644" @@ -14,7 +14,7 @@ - name: Setup /etc/cron.d/my_department ansible.builtin.template: src: ../templates/crontab/my_department.j2 - dest: /etc/crontab/my_department + dest: /etc/cron.d/my_department owner: root group: root mode: "0644" From f15a3d7032e21cfa62d6410262ce7530f28261f2 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:44:23 -0700 Subject: [PATCH 097/217] testing --- install.yml | 1 + playbooks/setup-logrotate.yml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/install.yml b/install.yml index b213c04..cd76158 100644 --- a/install.yml +++ b/install.yml @@ -8,6 +8,7 @@ # - 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/playbooks/setup-logrotate.yml b/playbooks/setup-logrotate.yml index a4dbd30..431c276 100644 --- a/playbooks/setup-logrotate.yml +++ b/playbooks/setup-logrotate.yml @@ -1,4 +1,6 @@ - name: Setup logrotate + become: true + hosts: all tasks: - name: Setup logrotate ansible.builtin.template: From 365e432cd9a22d313b4f700c9286c4f1d8ef5119 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:45:35 -0700 Subject: [PATCH 098/217] Update install.yml --- install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.yml b/install.yml index cd76158..3cbd395 100644 --- a/install.yml +++ b/install.yml @@ -6,7 +6,7 @@ # - 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/install-bulk-processor.yml - import_playbook: playbooks/setup-apache2.yml - import_playbook: playbooks/init-database.yml - import_playbook: playbooks/install-cron.yml From 51beb005c93528f8d1d74d40d1269ba2b6bfd012 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:53:41 -0700 Subject: [PATCH 099/217] Update init-database.yml mitigating the user problem --- playbooks/init-database.yml | 218 +++++++++--------------------------- 1 file changed, 55 insertions(+), 163 deletions(-) diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index 29de582..28c12b0 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -25,135 +25,83 @@ tasks: - name: initialize db by inserting required setup records - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -i -f + shell: sudo -u ctsms /ctsms/dbtool.sh -i -f - name: import criterion properties tables - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -icp /ctsms/master_data/criterion_property_definitions.csv + shell: sudo -u ctsms /ctsms/dbtool.sh -icp /ctsms/master_data/criterion_property_definitions.csv - name: import permission definitions from csv/text file - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -ipd /ctsms/master_data/permission_definitions.csv + shell: sudo -u ctsms /ctsms/dbtool.sh -ipd /ctsms/master_data/permission_definitions.csv - name: import inventory file mime types from csv/text file - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -imi /ctsms/master_data/mime.types -e ISO-8859-1 + 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 - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -ims /ctsms/master_data/mime.types -e ISO-8859-1 + 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 - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -imc /ctsms/master_data/mime.types -e ISO-8859-1 + 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 - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -imt /ctsms/master_data/mime.types -e ISO-8859-1 + 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 - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -imp /ctsms/master_data/mime.types -e ISO-8859-1 + 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 - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -immm /ctsms/master_data/mime.types -e ISO-8859-1 + 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 - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -imifi /ctsms/master_data/mime.types -e ISO-8859-1 + 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 - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -imsi /ctsms/master_data/mime.types -e ISO-8859-1 + 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 - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -impi /ctsms/master_data/mime.types -e ISO-8859-1 + 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 - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -imjf /ctsms/master_data/mime.types -e ISO-8859-1 + 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 - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -imcc /ctsms/master_data/mime.types -e ISO-8859-1 + shell: sudo -u ctsms /ctsms/dbtool.sh -imcc /ctsms/master_data/mime.types -e ISO-8859-1 - name: import titles from csv/text file - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -it "{{ titles_file }}" -e ISO-8859-1 + shell: sudo -u ctsms /ctsms/dbtool.sh -it "{{ titles_file }}" -e ISO-8859-1 - name: import bank identifications from csv/text file - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -ib "{{ bank_identification_file }}" -e ISO-8859-1 + shell: sudo -u ctsms /ctsms/dbtool.sh -ib "{{ bank_identification_file }}" -e ISO-8859-1 - name: import country names from csv/text file - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -ic "{{ countries_file }}" -e ISO-8859-1 + shell: sudo -u ctsms /ctsms/dbtool.sh -ic "{{ countries_file }}" -e ISO-8859-1 - name: import zip codes from csv/text file - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -iz "{{ street_names_file }}" -e utf-8 + shell: sudo -u ctsms /ctsms/dbtool.sh -iz "{{ street_names_file }}" -e utf-8 - name: import street names from csv/text file - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -is "{{ street_names_file }}" -e utf-8 + shell: sudo -u ctsms /ctsms/dbtool.sh -is "{{ street_names_file }}" -e utf-8 - name: import icd systematics with language encoding - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -iis "{{ icd_systematics_file }}" -sl "{{ icd_systematics_lang }}" + shell: sudo -u ctsms /ctsms/dbtool.sh -iis "{{ icd_systematics_file }}" -sl "{{ icd_systematics_lang }}" - name: import alpha ids - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -iai "{{ alpha_id_file }}" -e "{{ alpha_id_file_encoding }}" -isr "{{ alpha_id_file_revision }}" + 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 - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -ios "{{ ops_systematics_file }}" -sl "{{ ops_systematics_file_lang }}" + shell: sudo -u ctsms /ctsms/dbtool.sh -ios "{{ ops_systematics_file }}" -sl "{{ ops_systematics_file_lang }}" - name: import ops codes - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -ioc "{{ ops_codes_file }}" -osr "{{ ops_codes_file_revisions }}" + shell: sudo -u ctsms /ctsms/dbtool.sh -ioc "{{ ops_codes_file }}" -osr "{{ ops_codes_file_revisions }}" - name: import asp and substances - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -ia "{{ asp_substances_file }}" -e "{{ asp_substances_file_encoding }}" + shell: sudo -u ctsms /ctsms/dbtool.sh -ia "{{ asp_substances_file }}" -e "{{ asp_substances_file_encoding }}" - name: create department 'my_department' - become: yes - become_user: ctsms - shell: /ctsms/dbtool.sh -cd -dlk my_department -dp "{{ department_password }}" + shell: sudo -u ctsms /ctsms/dbtool.sh -cd -dlk my_department -dp "{{ department_password }}" - name: create user 'phoenix' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "phoenix" -p "$USER_PASSWORD" @@ -163,10 +111,8 @@ TRIAL_MASTER_SEARCH,PROBAND_MASTER_SEARCH,USER_MASTER_SEARCH,INPUT_FIELD_MASTER_SEARCH,MASS_MAIL_MASTER_SEARCH" - name: create user 'my_department_signup_de' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_de" -p "my_department_signup_de" @@ -176,10 +122,8 @@ OURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_en' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_en" -p "my_department_signup_en" @@ -189,10 +133,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_da' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_da" -p "my_department_signup_da" @@ -202,10 +144,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_es' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_es" -p "my_department_signup_es" @@ -215,10 +155,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_fi' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_fi" -p "my_department_signup_fi" @@ -228,10 +166,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_fr' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_fr" -p "my_department_signup_fr" @@ -241,10 +177,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_hu' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_hu" -p "my_department_signup_hu" @@ -254,10 +188,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_it' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_it" -p "my_department_signup_it" @@ -267,10 +199,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_ja' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_ja" -p "my_department_signup_ja" @@ -280,10 +210,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_ko' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_ko" -p "my_department_signup_ko" @@ -293,10 +221,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_nl' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_nl" -p "my_department_signup_nl" @@ -306,10 +232,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_pt' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_pt" -p "my_department_signup_pt" @@ -319,10 +243,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_ro' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_ro" -p "my_department_signup_ro" @@ -332,10 +254,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_sk' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_sk" -p "my_department_signup_sk" @@ -345,10 +265,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_sl' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_sl" -p "my_department_signup_sl" @@ -358,10 +276,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_sv' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_sv" -p "my_department_signup_sv" @@ -371,10 +287,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_uk' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_uk" -p "my_department_signup_uk" @@ -384,10 +298,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_ru' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_ru" -p "my_department_signup_ru" @@ -397,10 +309,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_ln' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_ln" -p "my_department_signup_ln" @@ -410,10 +320,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_sw' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_sw" -p "my_department_signup_sw" @@ -423,10 +331,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_yo' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_yo" -p "my_department_signup_yo" @@ -436,10 +342,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_ig' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_ig" -p "my_department_signup_ig" @@ -449,10 +353,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_ff' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_ff" -p "my_department_signup_ff" @@ -462,10 +364,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_ar' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_ar" -p "my_department_signup_ar" @@ -475,10 +375,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_kg' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_kg" -p "my_department_signup_kg" @@ -488,10 +386,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_hi' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_hi" -p "my_department_signup_hi" @@ -501,10 +397,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_zh' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_signup_zh" -p "my_department_signup_zh" @@ -514,10 +408,8 @@ COURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_cron' - become: yes - become_user: ctsms shell: | - /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" -u "my_department_cron" -p "{{ cron_password }}" @@ -561,7 +453,7 @@ - name: Print department passphrase ansible.builtin.debug: - msg: "The department passphrase for 'my_department' when adding users with /ctsms/dbtool.sh is {{ department_password }}." + 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: From 363c196f2f1c5a45114a36c83f4cef0e2372e162 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:57:23 -0700 Subject: [PATCH 100/217] modifying templates --- install.yml | 18 +++++++++--------- playbooks/init-database.yml | 2 +- templates/shell/dbtool.sh.j2 | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/install.yml b/install.yml index 3cbd395..7af2eb7 100644 --- a/install.yml +++ b/install.yml @@ -1,12 +1,12 @@ -# - 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/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 diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index 28c12b0..50b1dd8 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -103,7 +103,7 @@ shell: | sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" - -u "phoenix" + -u "phoenix"nano -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, diff --git a/templates/shell/dbtool.sh.j2 b/templates/shell/dbtool.sh.j2 index 6fa5524..d238b6e 100644 --- a/templates/shell/dbtool.sh.j2 +++ b/templates/shell/dbtool.sh.j2 @@ -3,5 +3,5 @@ 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 -Xms{{ ansible_facts['xms'] }} -Xmx{{ ansible_facts['xmx'] }} -Xss{{ ansible_facts['xss'] }} -XX:+UseParallelGC -XX:MaxGCPauseMillis=1500 -XX:GCTimeRatio=9 -XX:+CMSClassUnloadingEnabled -XX:ReservedCodeCacheSize={{ ansible_facts['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 $* {%- endraw %} +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{{ ansible_facts['xms'] }} -Xmx{{ ansible_facts['xmx'] }} -Xss{{ ansible_facts['xss'] }} -XX:+UseParallelGC -XX:MaxGCPauseMillis=1500 -XX:GCTimeRatio=9 -XX:+CMSClassUnloadingEnabled -XX:ReservedCodeCacheSize={{ ansible_facts['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 $* From 6a36c6e0788bde65785b78c76602d5450a788572 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 13:58:26 -0700 Subject: [PATCH 101/217] Update install-bulk-processor.yml minify is broken so commenting it out for now --- playbooks/install-bulk-processor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 6ec3ad5..8dc68ba 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -149,9 +149,9 @@ extra_opts: - --strip-components=1 - - name: Run minify.pl on Signup folder - ansible.builtin.command: - cmd: perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup + # - name: Run minify.pl on Signup folder + # ansible.builtin.command: + # cmd: perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup - name: Create /ctsms/bulk_processor/output directory ansible.builtin.file: From 14fc599054b7f4a48ad286a8b08effccade7c80c Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 14:05:35 -0700 Subject: [PATCH 102/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index d93e907..1a6fd75 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -2,6 +2,11 @@ gather_facts: true hosts: all become: true + vars: + xms: "2048m" + xmx: "4096m" + xss: "512k" + perm: "256m" tasks: - name: Create /ctsms ansible.builtin.file: From 8a6a39a7012f4aeadbd6a93528d62cda68d51c0f Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 14:10:20 -0700 Subject: [PATCH 103/217] asdf --- playbooks/prepare-ctsms-directory.yml | 16 +++++++++------- templates/shell/dbtool.sh.j2 | 7 ------- 2 files changed, 9 insertions(+), 14 deletions(-) delete mode 100644 templates/shell/dbtool.sh.j2 diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 1a6fd75..f384692 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -19,13 +19,15 @@ path: /ctsms/bulk_processor/ state: absent - - name: Template dbtool to /ctsms/dbtool.sh - ansible.builtin.template: - src: ../templates/shell/dbtool.sh.j2 - dest: /ctsms/dbtool.sh - owner: ctsms - group: ctsms - mode: '0755' + - name: Write dbtool.sh + ansible.builtin.copy: + dest: /ctsms.dbtool.sh + content: | + #!/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 -Xms{{ ansible_facts['xms'] }} -Xmx{{ ansible_facts['xmx'] }} -Xss{{ ansible_facts['xss'] }} -XX:+UseParallelGC -XX:MaxGCPauseMillis=1500 -XX:GCTimeRatio=9 -XX:+CMSClassUnloadingEnabled -XX:ReservedCodeCacheSize={{ ansible_facts['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: Template clearcache to /ctsms/clearcache.sh ansible.builtin.template: diff --git a/templates/shell/dbtool.sh.j2 b/templates/shell/dbtool.sh.j2 deleted file mode 100644 index d238b6e..0000000 --- a/templates/shell/dbtool.sh.j2 +++ /dev/null @@ -1,7 +0,0 @@ -{% raw -%} -#!/bin/bash -CTSMS_PROPERTIES=${CTSMS_PROPERTIES:-/ctsms/properties} -CTSMS_JAVA=${CTSMS_JAVA:-/ctsms/java} -CATALINA_BASE=${CATALINA_BASE:-/var/lib/tomcat9} -{%- endraw %} -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{{ ansible_facts['xms'] }} -Xmx{{ ansible_facts['xmx'] }} -Xss{{ ansible_facts['xss'] }} -XX:+UseParallelGC -XX:MaxGCPauseMillis=1500 -XX:GCTimeRatio=9 -XX:+CMSClassUnloadingEnabled -XX:ReservedCodeCacheSize={{ ansible_facts['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 $* From 0b57cdbdf77ca0ec3acf40a1b85cd2b88df3f111 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 14:11:27 -0700 Subject: [PATCH 104/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index f384692..5928c64 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -27,7 +27,7 @@ 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 -Xms{{ ansible_facts['xms'] }} -Xmx{{ ansible_facts['xmx'] }} -Xss{{ ansible_facts['xss'] }} -XX:+UseParallelGC -XX:MaxGCPauseMillis=1500 -XX:GCTimeRatio=9 -XX:+CMSClassUnloadingEnabled -XX:ReservedCodeCacheSize={{ ansible_facts['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 $* + 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:+CMSClassUnloadingEnabled -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: Template clearcache to /ctsms/clearcache.sh ansible.builtin.template: From ef765c36b1c9f6af8985fc4f31ae0331d94c51fb Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 14:13:34 -0700 Subject: [PATCH 105/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 5928c64..19ad255 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -19,16 +19,6 @@ path: /ctsms/bulk_processor/ state: absent - - name: Write dbtool.sh - ansible.builtin.copy: - dest: /ctsms.dbtool.sh - content: | - #!/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 -Xms{{ xms }} -Xmx{{ xmx }} -Xss{{ xss }} -XX:+UseParallelGC -XX:MaxGCPauseMillis=1500 -XX:GCTimeRatio=9 -XX:+CMSClassUnloadingEnabled -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: Template clearcache to /ctsms/clearcache.sh ansible.builtin.template: src: ../templates/shell/clearcache.sh.j2 @@ -45,13 +35,18 @@ group: ctsms mode: '0755' - - name: Template dbtool to /ctsms/dbtool.sh - ansible.builtin.template: - src: ../templates/shell/dbtool.sh.j2 - dest: /ctsms/dbtool.sh + - 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:-/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 -Xms{{ xms }} -Xmx{{ xmx }} -Xss{{ xss }} -XX:+UseParallelGC -XX:MaxGCPauseMillis=1500 -XX:GCTimeRatio=9 -XX:+CMSClassUnloadingEnabled -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: Copy master-data to /ctsms/master_data/ ansible.builtin.copy: From 456396e83a781e73c4624b6539df92d55b5bc2a7 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 14:42:07 -0700 Subject: [PATCH 106/217] updating prepare directory and deploy war --- playbooks/deploy-war.yml | 2 +- playbooks/prepare-ctsms-directory.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/deploy-war.yml b/playbooks/deploy-war.yml index 6bc9c42..03cb4e0 100644 --- a/playbooks/deploy-war.yml +++ b/playbooks/deploy-war.yml @@ -11,7 +11,7 @@ - name: Remove /var/lib/tomcat9/webapps/ROOT/ ansible.builtin.file: - path: /var/lib/tomcat9/webapps/ROOT/ + path: /opt/tomcat9/webapps/ROOT/ state: absent - name: Copy .war to Tomcat directory diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 19ad255..5f401c3 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -37,7 +37,7 @@ - name: Write dbtool.sh ansible.builtin.copy: - dest: /ctsms.dbtool.sh + dest: /ctsms/dbtool.sh owner: ctsms group: ctsms mode: '0755' From b9fd65d593a701123543f38ecaae89eb3dab09b5 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 15:13:32 -0700 Subject: [PATCH 107/217] Update ctsms.conf.j2 --- templates/tomcat/ctsms.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/tomcat/ctsms.conf.j2 b/templates/tomcat/ctsms.conf.j2 index 0a7ab73..72572a2 100644 --- a/templates/tomcat/ctsms.conf.j2 +++ 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/ From 41f33376b2a9d707564537ec4903870c4611599e Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 15:46:36 -0700 Subject: [PATCH 108/217] updating for new tomcat directory --- playbooks/deploy-war.yml | 2 +- playbooks/prepare-ctsms-directory.yml | 2 +- playbooks/render-workflow-diagrams.yml | 4 ++-- templates/apache/00_ctsms_https.conf.j2 | 10 +++++----- upgrade.sh | 10 +++++----- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/playbooks/deploy-war.yml b/playbooks/deploy-war.yml index 03cb4e0..a44d562 100644 --- a/playbooks/deploy-war.yml +++ b/playbooks/deploy-war.yml @@ -9,7 +9,7 @@ path: /ctsms/build/ctsms/web/target/ctsms-{{ version }}.war mode: '0755' - - name: Remove /var/lib/tomcat9/webapps/ROOT/ + - name: Remove /opt/tomcat9/webapps/ROOT/ ansible.builtin.file: path: /opt/tomcat9/webapps/ROOT/ state: absent diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 5f401c3..ac97df3 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -45,7 +45,7 @@ #!/bin/bash CTSMS_PROPERTIES=${CTSMS_PROPERTIES:-/ctsms/properties} CTSMS_JAVA=${CTSMS_JAVA:-/ctsms/java} - CATALINA_BASE=${CATALINA_BASE:-/var/lib/tomcat9} + 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:+CMSClassUnloadingEnabled -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: Copy master-data to /ctsms/master_data/ diff --git a/playbooks/render-workflow-diagrams.yml b/playbooks/render-workflow-diagrams.yml index ff13529..7c7243b 100644 --- a/playbooks/render-workflow-diagrams.yml +++ b/playbooks/render-workflow-diagrams.yml @@ -25,13 +25,13 @@ - name: Remove exploded ROOT webapp ansible.builtin.file: - path: /var/lib/tomcat9/webapps/ROOT + 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: /var/lib/tomcat9/webapps/ROOT.war + dest: /opt/tomcat9/webapps/ROOT.war mode: '0644' remote_src: true diff --git a/templates/apache/00_ctsms_https.conf.j2 b/templates/apache/00_ctsms_https.conf.j2 index b5bf0b7..498c725 100644 --- a/templates/apache/00_ctsms_https.conf.j2 +++ b/templates/apache/00_ctsms_https.conf.j2 @@ -40,15 +40,15 @@ SetEnvIf Request_URI "/static/*" no-jk SetEnvIf Request_URI "/signup/*" no-jk - Alias /resources /var/lib/tomcat9/webapps/ROOT/resources - + Alias /resources /opt/tomcat9/webapps/ROOT/resources + #Options FollowSymLinks #allow from all AllowOverride None Require all granted - Alias / /var/lib/tomcat9/webapps/ROOT/ - + Alias / /opt/tomcat9/webapps/ROOT/ + #Options FollowSymLinks #allow from all AllowOverride None @@ -60,7 +60,7 @@ deny from all - DocumentRoot /var/lib/tomcat9/webapps/ROOT + DocumentRoot /opt/tomcat9/webapps/ROOT JkMount /*.jsf ajp13 JkMount /rest/* ajp13 JkMount /inputfieldimage ajp13 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." From 02d881769e9caa0f9730240beb8baf24e184e4a8 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 20:21:38 -0700 Subject: [PATCH 109/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 4b6217f..701a8b4 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -64,26 +64,15 @@ ansible.builtin.command: a2enmod rewrite notify: Reload Apache - - name: Create SSL directory - ansible.builtin.file: - path: /etc/apache2/ssl - state: directory - mode: '0755' + - name: Create private key (RSA, 4096 bits) + community.crypto.openssl_privatekey: + path: /etc/apache2/ssl/apache.key - - name: Generate self-signed SSL certificate (only if certificate == 'self-signed') - ansible.builtin.command: > - openssl req -x509 -nodes -days 365 -newkey rsa:2048 - -keyout /etc/apache2/ssl/apache.key - -subj "{{ cert_subject }}" - -out /etc/apache2/ssl/apache.crt - when: certificate == "self-signed" - notify: Reload Apache - - - name: Set permissions on SSL key and cert - ansible.builtin.file: - path: /etc/apache2/ssl - mode: '0600' - recurse: true + - name: Create simple self-signed certificate + community.crypto.x509_certificate: + path: /etc/apache2/ssl/certificate.pem + privatekey_path: /etc/apache2/ssl/apache.key + provider: selfsigned - name: Enable 00_ctsms_https.conf site ansible.builtin.command: a2ensite 00_ctsms_https.conf From b3df711130ce81c35e9ccf47b7a175efb8a398e2 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 20:53:29 -0700 Subject: [PATCH 110/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 701a8b4..1631de2 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -64,6 +64,12 @@ ansible.builtin.command: a2enmod rewrite notify: Reload Apache + - name: Create SSL directory + ansible.builtin.file: + path: /etc/apache2/ssl + state: directory + mode: '0755' + - name: Create private key (RSA, 4096 bits) community.crypto.openssl_privatekey: path: /etc/apache2/ssl/apache.key From fdb5dc447feb4db98b1fbecc9b4ab627bda37da8 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 21:31:57 -0700 Subject: [PATCH 111/217] adjusting apache playbook --- install.yml | 2 +- playbooks/setup-apache2.yml | 4 +++- templates/apache/00_ctsms_https.conf.j2 | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/install.yml b/install.yml index 7af2eb7..674c8ba 100644 --- a/install.yml +++ b/install.yml @@ -3,7 +3,7 @@ - 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/enable-remote-access.yml - import_playbook: playbooks/deploy-war.yml - import_playbook: playbooks/install-memcached.yml - import_playbook: playbooks/install-bulk-processor.yml diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 1631de2..c094c7c 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -68,7 +68,9 @@ ansible.builtin.file: path: /etc/apache2/ssl state: directory - mode: '0755' + mode: '0600' + owner: root + group: root - name: Create private key (RSA, 4096 bits) community.crypto.openssl_privatekey: diff --git a/templates/apache/00_ctsms_https.conf.j2 b/templates/apache/00_ctsms_https.conf.j2 index 498c725..5d4963f 100644 --- a/templates/apache/00_ctsms_https.conf.j2 +++ b/templates/apache/00_ctsms_https.conf.j2 @@ -74,9 +74,8 @@ #SSLProtocol -ALL +SSLv3 +TLSv1 #SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:!LOW:!SSLv2:!EXPORT - SSLCertificateFile /etc/apache2/ssl/apache.crt + SSLCertificateFile /etc/apache2/ssl/certificate.pem SSLCertificateKeyFile /etc/apache2/ssl/apache.key - #SSLCertificateChainFile /etc/apache2/ssl.crt/ComodoIntermediateCertificates.crt # From 3301a89c72a90e295c7fb50ca54918d3517a4638 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 21:32:14 -0700 Subject: [PATCH 112/217] Update install.yml --- install.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/install.yml b/install.yml index 674c8ba..910b095 100644 --- a/install.yml +++ b/install.yml @@ -1,12 +1,12 @@ -- 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/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 From 845ce239184e6227854f7fcc0a11084ec1c5e519 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 21:50:29 -0700 Subject: [PATCH 113/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index c094c7c..a14a46b 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -15,12 +15,17 @@ update_cache: true notify: Reload Apache - - name: Add www-data to tomcat and ctsms groups + - name: Append ctsms group to user tomcat ansible.builtin.user: - name: www-data - groups: - - tomcat - - ctsms + name: tomcat + groups: ctsms + append: true + notify: Reload Apache + + - name: Append ctsms group to user tomcat + ansible.builtin.user: + name: tomcat,adm + groups: ctsms append: true notify: Reload Apache From 902c1de594cb6b43be61dc7852d76ff7f5990796 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 22:01:56 -0700 Subject: [PATCH 114/217] fix --- install.yml | 18 +++++++++--------- playbooks/tomcat9.yml | 6 ++++++ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/install.yml b/install.yml index 910b095..674c8ba 100644 --- a/install.yml +++ b/install.yml @@ -1,12 +1,12 @@ -# - 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/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 diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index b590167..cb253f5 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -37,6 +37,12 @@ system: yes create_home: no + - name: Run usermod + command: usermod --append --groups ctsms tomcat + + - name: Run usermod + command: usermod --append --groups tomcat,adm ctsms + - name: Create Tomcat installation directory file: path: /opt/tomcat9 From 787a35d4f08660315682ceaeada7ad045aad1cde Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 22:30:54 -0700 Subject: [PATCH 115/217] update --- playbooks/install-bulk-processor.yml | 6 +++--- playbooks/setup-apache2.yml | 14 -------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 8dc68ba..fd1da3e 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -149,9 +149,9 @@ extra_opts: - --strip-components=1 - # - name: Run minify.pl on Signup folder - # ansible.builtin.command: - # cmd: perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup + - name: Run minify.pl on Signup folder + ansible.builtin.command: + cmd: perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup - name: Create /ctsms/bulk_processor/output directory ansible.builtin.file: diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index a14a46b..36c1a8b 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -15,20 +15,6 @@ update_cache: true notify: Reload Apache - - name: Append ctsms group to user tomcat - ansible.builtin.user: - name: tomcat - groups: ctsms - append: true - notify: Reload Apache - - - name: Append ctsms group to user tomcat - ansible.builtin.user: - name: tomcat,adm - groups: ctsms - append: true - notify: Reload Apache - - name: Template 00_ctsms_http.conf to /etc/apache2/sites-available/ ansible.builtin.template: src: ../templates/apache/00_ctsms_http.conf.j2 From afb17933f5e49e0a007d6019427502f733497179 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 22:37:35 -0700 Subject: [PATCH 116/217] update --- playbooks/install-bulk-processor.yml | 1 - playbooks/setup-apache2.yml | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index fd1da3e..9030ea7 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -150,7 +150,6 @@ - --strip-components=1 - name: Run minify.pl on Signup folder - ansible.builtin.command: cmd: perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup - name: Create /ctsms/bulk_processor/output directory diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 36c1a8b..a756c3b 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -15,6 +15,9 @@ update_cache: true notify: Reload Apache + - name: Run usermod + cmd: 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 From 3e5f5135e6fe205a5bcfb284b6572fcf52c3acd4 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 22:38:51 -0700 Subject: [PATCH 117/217] test test --- playbooks/install-bulk-processor.yml | 2 +- playbooks/setup-apache2.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 9030ea7..4ac51ba 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -150,7 +150,7 @@ - --strip-components=1 - name: Run minify.pl on Signup folder - cmd: perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup + ansible.builtin.command: perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup - name: Create /ctsms/bulk_processor/output directory ansible.builtin.file: diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index a756c3b..2a8f9df 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -16,7 +16,7 @@ notify: Reload Apache - name: Run usermod - cmd: usermod --append --groups tomcat,ctsms www-data + ansible.builtin.command: usermod --append --groups tomcat,ctsms www-data - name: Template 00_ctsms_http.conf to /etc/apache2/sites-available/ ansible.builtin.template: From 7d954334b681aa8f8ee6721ff4dec15553371f57 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 15 May 2025 23:12:56 -0700 Subject: [PATCH 118/217] Update install-bulk-processor.yml --- playbooks/install-bulk-processor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 4ac51ba..f4fd223 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -149,8 +149,8 @@ extra_opts: - --strip-components=1 - - name: Run minify.pl on Signup folder - ansible.builtin.command: perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup + # - name: Run minify.pl on Signup folder + # ansible.builtin.command: perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup - name: Create /ctsms/bulk_processor/output directory ansible.builtin.file: From e311def8e36bf37a4f5e781ad2d491c2bb84f456 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Fri, 16 May 2025 22:58:20 -0700 Subject: [PATCH 119/217] removing reflexive access commands --- .gitignore | 1 + playbooks/install-bulk-processor.yml | 1 - playbooks/prepare-ctsms-directory.yml | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 12ac79b..bb363d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.bak ./inventories/dev/* ./inventories/prod/* +repl.lisp-repl diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index f4fd223..d0c504b 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -9,7 +9,6 @@ dest_dir: "/ctsms/bulk_processor" output_dir: "{{ dest_dir }}/output" user_group: "ctsms" - hosts: all tasks: - name: Install Perl libraries and utilities ansible.builtin.apt: diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index ac97df3..58e6ddd 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -46,7 +46,7 @@ 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:+CMSClassUnloadingEnabled -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 $* + 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: Copy master-data to /ctsms/master_data/ ansible.builtin.copy: From 8c386f2901ed87f2d06cf601cf3685ecea76e050 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Fri, 16 May 2025 23:28:29 -0700 Subject: [PATCH 120/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 58e6ddd..60d1238 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -50,7 +50,7 @@ - name: Copy master-data to /ctsms/master_data/ ansible.builtin.copy: - src: ../master-data/ + src: ../master_data/ dest: /ctsms/master_data/ owner: ctsms group: ctsms From bdfb189c233406695e42a5883b5fb3d6d0cb4e8e Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Fri, 16 May 2025 23:35:57 -0700 Subject: [PATCH 121/217] Update init-database.yml --- playbooks/init-database.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index 50b1dd8..a7a800d 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -3,20 +3,20 @@ 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 + 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: "/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: "/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: "/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: "/ctsms/master_data/asp_register_20240316.xls" asp_substances_file_encoding: "Cp1252" department_password: "{{ lookup('password', '/dev/null length=32 chars=ascii_letters,digits') }}" user_password: "{{ lookup('password', '/dev/null length=3 chars=ascii_letters') }}" From 6f70d2d52f3685f56375537d2c923883720fc02c Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Fri, 16 May 2025 23:46:14 -0700 Subject: [PATCH 122/217] removing old file and fixing a path --- phoenix_install | 11 ----------- playbooks/prepare-ctsms-directory.yml | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 phoenix_install 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/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 60d1238..58e6ddd 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -50,7 +50,7 @@ - name: Copy master-data to /ctsms/master_data/ ansible.builtin.copy: - src: ../master_data/ + src: ../master-data/ dest: /ctsms/master_data/ owner: ctsms group: ctsms From bccaf28dadb854ac03ad735a0fd589c1179655fd Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Fri, 16 May 2025 23:58:51 -0700 Subject: [PATCH 123/217] Update prepare-ctsms-directory.yml issue with file paths --- playbooks/prepare-ctsms-directory.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 58e6ddd..4084e19 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -29,7 +29,7 @@ - name: Copy config-default to /ctsms/config-default/ ansible.builtin.copy: - src: ../config-default/ + src: "{{ playbook_dir }}/../config-default/" dest: /ctsms/config-default/ owner: ctsms group: ctsms @@ -50,7 +50,7 @@ - name: Copy master-data to /ctsms/master_data/ ansible.builtin.copy: - src: ../master-data/ + src: "{{ playbook_dir }}/../master-data/" dest: /ctsms/master_data/ owner: ctsms group: ctsms From 44a6bf0b05d7fb2b821fcdd687b55ed10d85f688 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 00:37:57 -0700 Subject: [PATCH 124/217] Update setup-apache2.yml troubleshooting apache --- playbooks/setup-apache2.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 2a8f9df..fec4b9d 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -75,7 +75,12 @@ path: /etc/apache2/ssl/certificate.pem privatekey_path: /etc/apache2/ssl/apache.key provider: selfsigned - + subject: + common_name: "{{ ansible_fqdn }}" + subject_alt_name: + - "DNS:{{ ansible_fqdn }}" + - "DNS:{{ ansible_hostname }}" + - name: Enable 00_ctsms_https.conf site ansible.builtin.command: a2ensite 00_ctsms_https.conf notify: Reload Apache From 4cf0add5928bd283d104c0573a0d79fe7fff6b81 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 00:41:18 -0700 Subject: [PATCH 125/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index fec4b9d..73fac01 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -76,11 +76,8 @@ privatekey_path: /etc/apache2/ssl/apache.key provider: selfsigned subject: - common_name: "{{ ansible_fqdn }}" - subject_alt_name: - - "DNS:{{ ansible_fqdn }}" - - "DNS:{{ ansible_hostname }}" - + common_name: "{{ ansible_hostname }}" + - name: Enable 00_ctsms_https.conf site ansible.builtin.command: a2ensite 00_ctsms_https.conf notify: Reload Apache From dfc8c3918ec64b73860a3fb4cd428c71064cb53e Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 00:43:36 -0700 Subject: [PATCH 126/217] Update 00_ctsms_https.conf.j2 --- templates/apache/00_ctsms_https.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/apache/00_ctsms_https.conf.j2 b/templates/apache/00_ctsms_https.conf.j2 index 5d4963f..4e72fd5 100644 --- a/templates/apache/00_ctsms_https.conf.j2 +++ b/templates/apache/00_ctsms_https.conf.j2 @@ -3,7 +3,7 @@ # # - ServerName localhost:443 + ServerName {{ ansible_fqdn }}:443 # date proto ipaddr status time req referer user-agent LogFormat "%{%F %T}t %p %a %>s %D %r %{Referer}i %{User-agent}i" From 1b92f512e0d8bed51f709490ddad09f218f4f8ee Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 00:46:53 -0700 Subject: [PATCH 127/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 73fac01..ae31bf8 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -75,8 +75,7 @@ path: /etc/apache2/ssl/certificate.pem privatekey_path: /etc/apache2/ssl/apache.key provider: selfsigned - subject: - common_name: "{{ ansible_hostname }}" + common_name: "{{ ansible_hostname }}" - name: Enable 00_ctsms_https.conf site ansible.builtin.command: a2ensite 00_ctsms_https.conf From f589a9bd376e29a4dc9d955b634bef9be2a71b27 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 00:50:27 -0700 Subject: [PATCH 128/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index ae31bf8..5c9f1f3 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -3,6 +3,7 @@ vars: certificate: "self-signed" cert_subject: "/C=AT/ST=Austria/L=Graz/O=phoenix/CN={{ ansible_hostname }}" + organization: none hosts: all tasks: - name: Install Apache and required modules @@ -70,6 +71,24 @@ community.crypto.openssl_privatekey: path: /etc/apache2/ssl/apache.key + - name: Create certificate signing request (CSR) for self-signed certificate + community.crypto.openssl_csr_pipe: + privatekey_path: /path/to/certificate.key + common_name: {{ ansible_hostname }} + organization_name: {{ organization }} + subject_alt_name: + - "DNS:ansible.com" + - "DNS:www.ansible.com" + - "DNS:docs.ansible.com" + register: csr + + - name: Create self-signed certificate from CSR + community.crypto.x509_certificate: + path: /path/to/certificate.pem + csr_content: "{{ csr.csr }}" + privatekey_path: /path/to/certificate.key + provider: selfsigned + - name: Create simple self-signed certificate community.crypto.x509_certificate: path: /etc/apache2/ssl/certificate.pem From 36f0265eb63671e1165d3466af71c78cd3a44d29 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 00:51:58 -0700 Subject: [PATCH 129/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 5c9f1f3..ff600de 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -73,7 +73,7 @@ - name: Create certificate signing request (CSR) for self-signed certificate community.crypto.openssl_csr_pipe: - privatekey_path: /path/to/certificate.key + privatekey_path: /etc/apache2/ssl/apache.key common_name: {{ ansible_hostname }} organization_name: {{ organization }} subject_alt_name: @@ -83,18 +83,11 @@ register: csr - name: Create self-signed certificate from CSR - community.crypto.x509_certificate: - path: /path/to/certificate.pem - csr_content: "{{ csr.csr }}" - privatekey_path: /path/to/certificate.key - provider: selfsigned - - - name: Create simple self-signed certificate community.crypto.x509_certificate: path: /etc/apache2/ssl/certificate.pem + csr_content: "{{ csr.csr }}" privatekey_path: /etc/apache2/ssl/apache.key provider: selfsigned - common_name: "{{ ansible_hostname }}" - name: Enable 00_ctsms_https.conf site ansible.builtin.command: a2ensite 00_ctsms_https.conf From 25f845fa12b645a0632c6e73978614c68d20b55c Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 00:54:16 -0700 Subject: [PATCH 130/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index ff600de..4370286 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -74,8 +74,8 @@ - name: Create certificate signing request (CSR) for self-signed certificate community.crypto.openssl_csr_pipe: privatekey_path: /etc/apache2/ssl/apache.key - common_name: {{ ansible_hostname }} - organization_name: {{ organization }} + common_name: "{{ ansible_hostname }}" + organization_name: "{{ organization }}" subject_alt_name: - "DNS:ansible.com" - "DNS:www.ansible.com" From 36b959cf89d90b5786be97a6b646e12394123cb8 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 00:55:12 -0700 Subject: [PATCH 131/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 4370286..2b2e7aa 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -2,8 +2,7 @@ become: true vars: certificate: "self-signed" - cert_subject: "/C=AT/ST=Austria/L=Graz/O=phoenix/CN={{ ansible_hostname }}" - organization: none + organization: "Phoenix CTMS" hosts: all tasks: - name: Install Apache and required modules From b780cf222954b2db7ea7b61300002ec25a972085 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 01:08:52 -0700 Subject: [PATCH 132/217] testing apache --- playbooks/setup-apache2.yml | 8 ++------ templates/apache/00_ctsms_https.conf.j2 | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 2b2e7aa..e71fb66 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -73,12 +73,8 @@ - name: Create certificate signing request (CSR) for self-signed certificate community.crypto.openssl_csr_pipe: privatekey_path: /etc/apache2/ssl/apache.key - common_name: "{{ ansible_hostname }}" - organization_name: "{{ organization }}" - subject_alt_name: - - "DNS:ansible.com" - - "DNS:www.ansible.com" - - "DNS:docs.ansible.com" + common_name: localhost + organization_name: localhost register: csr - name: Create self-signed certificate from CSR diff --git a/templates/apache/00_ctsms_https.conf.j2 b/templates/apache/00_ctsms_https.conf.j2 index 4e72fd5..5d4963f 100644 --- a/templates/apache/00_ctsms_https.conf.j2 +++ b/templates/apache/00_ctsms_https.conf.j2 @@ -3,7 +3,7 @@ # # - ServerName {{ ansible_fqdn }}:443 + ServerName localhost:443 # date proto ipaddr status time req referer user-agent LogFormat "%{%F %T}t %p %a %>s %D %r %{Referer}i %{User-agent}i" From 3fa38a234908907f231151cf5f9f71319b2c743b Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 11:32:46 -0700 Subject: [PATCH 133/217] update prepare --- playbooks/prepare-ctsms-directory.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 4084e19..de25118 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -28,12 +28,13 @@ mode: '0755' - name: Copy config-default to /ctsms/config-default/ - ansible.builtin.copy: + ansible.builtin.synchronize: src: "{{ playbook_dir }}/../config-default/" dest: /ctsms/config-default/ owner: ctsms group: ctsms mode: '0755' + delegate_to: "{{ inventory_hostname }}" - name: Write dbtool.sh ansible.builtin.copy: @@ -49,12 +50,13 @@ 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: Copy master-data to /ctsms/master_data/ - ansible.builtin.copy: + ansible.builtin.synchroize: src: "{{ playbook_dir }}/../master-data/" dest: /ctsms/master_data/ owner: ctsms group: ctsms mode: '0755' + delegate_to: "{{ inventory_hostname }}" - name: Recursively change ownership of /ctsms/ ansible.builtin.file: From e238c7eecd8dd7f4c049d8481207e6fc406d90a5 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 11:38:14 -0700 Subject: [PATCH 134/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index de25118..222e032 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -50,7 +50,7 @@ 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: Copy master-data to /ctsms/master_data/ - ansible.builtin.synchroize: + ansible.posix.synchroize: src: "{{ playbook_dir }}/../master-data/" dest: /ctsms/master_data/ owner: ctsms From 03b3150595461904ed1241b5fcbe50e84a19b2d7 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 11:38:52 -0700 Subject: [PATCH 135/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 222e032..bd12ffb 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -28,7 +28,7 @@ mode: '0755' - name: Copy config-default to /ctsms/config-default/ - ansible.builtin.synchronize: + ansible.posix.synchronize: src: "{{ playbook_dir }}/../config-default/" dest: /ctsms/config-default/ owner: ctsms @@ -50,7 +50,7 @@ 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: Copy master-data to /ctsms/master_data/ - ansible.posix.synchroize: + ansible.posix.synchronize: src: "{{ playbook_dir }}/../master-data/" dest: /ctsms/master_data/ owner: ctsms From afdd1af6ef98229a23be11471ed31890e88f940a Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 11:39:57 -0700 Subject: [PATCH 136/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index bd12ffb..399e869 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -31,9 +31,6 @@ ansible.posix.synchronize: src: "{{ playbook_dir }}/../config-default/" dest: /ctsms/config-default/ - owner: ctsms - group: ctsms - mode: '0755' delegate_to: "{{ inventory_hostname }}" - name: Write dbtool.sh @@ -53,9 +50,6 @@ ansible.posix.synchronize: src: "{{ playbook_dir }}/../master-data/" dest: /ctsms/master_data/ - owner: ctsms - group: ctsms - mode: '0755' delegate_to: "{{ inventory_hostname }}" - name: Recursively change ownership of /ctsms/ From 9ad975ad8b777b2fe626af0359e619136bc386ca Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 11:40:46 -0700 Subject: [PATCH 137/217] Update begin-installation.yml --- playbooks/begin-installation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/begin-installation.yml b/playbooks/begin-installation.yml index 4a736c4..ddd4d38 100644 --- a/playbooks/begin-installation.yml +++ b/playbooks/begin-installation.yml @@ -12,6 +12,7 @@ - lsb-release - gnupg - ntp + - rsync state: latest update_cache: true From 4c93ef7d12a073505cfa97de764373516afeda0c Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 11:43:03 -0700 Subject: [PATCH 138/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 399e869..3a4de01 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -31,6 +31,7 @@ ansible.posix.synchronize: src: "{{ playbook_dir }}/../config-default/" dest: /ctsms/config-default/ + recursive: true delegate_to: "{{ inventory_hostname }}" - name: Write dbtool.sh @@ -50,6 +51,7 @@ ansible.posix.synchronize: src: "{{ playbook_dir }}/../master-data/" dest: /ctsms/master_data/ + recursive: true delegate_to: "{{ inventory_hostname }}" - name: Recursively change ownership of /ctsms/ From 96bbcd987a4fe7933f595af9fdb326367a85e7c4 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 21:13:43 -0700 Subject: [PATCH 139/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 3a4de01..684aefc 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -27,12 +27,10 @@ group: ctsms mode: '0755' - - name: Copy config-default to /ctsms/config-default/ - ansible.posix.synchronize: - src: "{{ playbook_dir }}/../config-default/" - dest: /ctsms/config-default/ - recursive: true - delegate_to: "{{ inventory_hostname }}" + - name: Clone config-default repository to /ctsms/config-default + ansible.builtin.git: + repo: 'https://github.com/phoenixctms/config-default.git' + dest: /ctsms/config-default - name: Write dbtool.sh ansible.builtin.copy: @@ -47,12 +45,10 @@ 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: Copy master-data to /ctsms/master_data/ - ansible.posix.synchronize: - src: "{{ playbook_dir }}/../master-data/" - dest: /ctsms/master_data/ - recursive: true - delegate_to: "{{ inventory_hostname }}" + - 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: Recursively change ownership of /ctsms/ ansible.builtin.file: From d79689110abbacf18c97972d68aff815a66f7df9 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 21:51:34 -0700 Subject: [PATCH 140/217] removing submodule --- .gitmodules | 6 ------ config-default | 1 - master-data | 1 - 3 files changed, 8 deletions(-) delete mode 100644 .gitmodules delete mode 160000 config-default delete mode 160000 master-data diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 99b96ea..0000000 --- a/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "master-data"] - path = master-data - url = https://github.com/phoenixctms/master-data/ -[submodule "config-default"] - path = config-default - url = https://github.com/josharmenta/config-default diff --git a/config-default b/config-default deleted file mode 160000 index 9c1420f..0000000 --- a/config-default +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9c1420fe3e8177044328e7b2f1cccdf75fa80b58 diff --git a/master-data b/master-data deleted file mode 160000 index 7caf562..0000000 --- a/master-data +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7caf562273569854fee3a52ba6a38faca60abf1f From e34a30b22632c2d724b97d7735c7b0379bed3b9e Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 22:01:43 -0700 Subject: [PATCH 141/217] updating tomcat9.yml --- playbooks/begin-installation.yml | 1 - playbooks/tomcat9.yml | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/playbooks/begin-installation.yml b/playbooks/begin-installation.yml index ddd4d38..4a736c4 100644 --- a/playbooks/begin-installation.yml +++ b/playbooks/begin-installation.yml @@ -12,7 +12,6 @@ - lsb-release - gnupg - ntp - - rsync state: latest update_cache: true diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index cb253f5..d38a186 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -168,6 +168,24 @@ group: tomcat mode: '0640' + - name: Set permissions on /var/log/tomcat9 directory + ansible.builtin.file: + path: /var/log/tomcat9 + mode: '0770' + + - name: Add group write permission to files in /var/log/tomcat9 + ansible.builtin.file: + path: "{{ item }}" + mode: 'g+w' + with_fileglob: + - /var/log/tomcat9/* + when: item is file + + - name: Set permissions on webapps directory + ansible.builtin.file: + path: /var/lib/tomcat9/webapps + mode: '0775' + - name: Set JAVA_OPTS in /etc/default/tomcat9 lineinfile: path: /etc/default/tomcat9 From 2cf117c653b81b38c222bce382c70fe2f2098633 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 22:20:39 -0700 Subject: [PATCH 142/217] adding back minify --- playbooks/install-bulk-processor.yml | 4 ++-- playbooks/tomcat9.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index d0c504b..e5fe8bb 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -148,8 +148,8 @@ extra_opts: - --strip-components=1 - # - name: Run minify.pl on Signup folder - # ansible.builtin.command: perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup + - name: Run minify.pl on Signup folder + ansible.builtin.command: perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup - name: Create /ctsms/bulk_processor/output directory ansible.builtin.file: diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index d38a186..c009cbd 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -183,7 +183,7 @@ - name: Set permissions on webapps directory ansible.builtin.file: - path: /var/lib/tomcat9/webapps + path: /opt/tomcat9/webapps mode: '0775' - name: Set JAVA_OPTS in /etc/default/tomcat9 From 03bf85a26750d74dcc8487471aecef7996ced4a6 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 22:27:32 -0700 Subject: [PATCH 143/217] testing --- playbooks/install-bulk-processor.yml | 4 +++- playbooks/setup-apache2.yml | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index e5fe8bb..662cd1e 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -149,7 +149,9 @@ - --strip-components=1 - name: Run minify.pl on Signup folder - ansible.builtin.command: perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup + ansible.builtin.command: > + perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl \ + --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup - name: Create /ctsms/bulk_processor/output directory ansible.builtin.file: diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index e71fb66..f9f1e20 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -1,8 +1,5 @@ - name: Install Apache2 become: true - vars: - certificate: "self-signed" - organization: "Phoenix CTMS" hosts: all tasks: - name: Install Apache and required modules From bd39ec03fc35048d6ac64b98d886094ec00f0abd Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 22:55:20 -0700 Subject: [PATCH 144/217] fixing bug in user creation --- playbooks/init-database.yml | 4 ++-- playbooks/setup-logrotate.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index a7a800d..d2e5805 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -103,8 +103,8 @@ shell: | sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department -dp "{{ department_password }}" - -u "phoenix"nano - -p "$USER_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, diff --git a/playbooks/setup-logrotate.yml b/playbooks/setup-logrotate.yml index 431c276..7a02427 100644 --- a/playbooks/setup-logrotate.yml +++ b/playbooks/setup-logrotate.yml @@ -4,7 +4,7 @@ tasks: - name: Setup logrotate ansible.builtin.template: - src: ./templates/logrotate/ctsms.j2 + src: ../templates/logrotate/ctsms.j2 dest: /etc/logrotate.d/ctsms owner: root group: wheel From 0bc2c6fb6185d42beea59bbb1dd093a8dc010ebc Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 23:02:15 -0700 Subject: [PATCH 145/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 684aefc..c34c72d 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -32,6 +32,42 @@ repo: 'https://github.com/phoenixctms/config-default.git' dest: /ctsms/config-default + - name: Template ctsms-applicationcontext.properties to /ctsms/config-default/ctsms-applicationcontext.properties + ansible.builtin.template: + src: ../templates/properties/ctsms-applicationcontext.properties + dest: /ctsms/config-default/ctsms-applicationcontext.properties + notify: Reload Apache + + - name: Template ctsms-cv-pdf-settings.properties to /ctsms/config-default/ctsms-cv-pdf-settings.properties + ansible.builtin.template: + src: ../templates/properties/ctsms-cv-pdf-settings.properties + dest: /ctsms/config-default/ctsms-cv-pdf-settings.properties + notify: Reload Apache + + - name: Template ctsms-dbtool.properties to /ctsms/config-default/ctsms-dbtool.properties + ansible.builtin.template: + src: ../templates/properties/ctsms-dbtool.properties + dest: /ctsms/config-default/ctsms-dbtool.properties + notify: Reload Apache + + - name: Template ctsms-departments.properties to /ctsms/config-default/ctsms-departments.properties + ansible.builtin.template: + src: ../templates/properties/ctsms-departments.properties + dest: /ctsms/config-default/ctsms-departments.properties + notify: Reload Apache + + - name: Template ctsms-departments_de.properties to /ctsms/config-default/ctsms-departments_de.properties + ansible.builtin.template: + src: ../templates/properties/ctsms-departments_de.properties + dest: /ctsms/config-default/ctsms-departments_de.properties + notify: Reload Apache + + - name: Template ctsms-visitschedule-excel-settings.properties to /ctsms/config-default/ctsms-visitschedule-excel-settings.properties + ansible.builtin.template: + src: ../templates/properties/ctsms-visitschedule-excel-settings.properties + dest: /ctsms/config-default/ctsms-visitschedule-excel-settings.properties + notify: Reload Apache + - name: Write dbtool.sh ansible.builtin.copy: dest: /ctsms/dbtool.sh From 5ad5f257faba0fb5c0cc44ac591598c3f91a00e2 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 23:16:41 -0700 Subject: [PATCH 146/217] fixing paths --- debian_bootstrap.txt | 8 ++++---- playbooks/prepare-ctsms-directory.yml | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) 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/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index c34c72d..1043135 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -34,37 +34,37 @@ - name: Template ctsms-applicationcontext.properties to /ctsms/config-default/ctsms-applicationcontext.properties ansible.builtin.template: - src: ../templates/properties/ctsms-applicationcontext.properties + src: ../templates/properties/ctsms-applicationcontext.properties.j2 dest: /ctsms/config-default/ctsms-applicationcontext.properties notify: Reload Apache - name: Template ctsms-cv-pdf-settings.properties to /ctsms/config-default/ctsms-cv-pdf-settings.properties ansible.builtin.template: - src: ../templates/properties/ctsms-cv-pdf-settings.properties + src: ../templates/properties/ctsms-cv-pdf-settings.properties.j2 dest: /ctsms/config-default/ctsms-cv-pdf-settings.properties notify: Reload Apache - name: Template ctsms-dbtool.properties to /ctsms/config-default/ctsms-dbtool.properties ansible.builtin.template: - src: ../templates/properties/ctsms-dbtool.properties + src: ../templates/properties/ctsms-dbtool.properties.j2 dest: /ctsms/config-default/ctsms-dbtool.properties notify: Reload Apache - name: Template ctsms-departments.properties to /ctsms/config-default/ctsms-departments.properties ansible.builtin.template: - src: ../templates/properties/ctsms-departments.properties + src: ../templates/properties/ctsms-departments.properties.j2 dest: /ctsms/config-default/ctsms-departments.properties notify: Reload Apache - name: Template ctsms-departments_de.properties to /ctsms/config-default/ctsms-departments_de.properties ansible.builtin.template: - src: ../templates/properties/ctsms-departments_de.properties + src: ../templates/properties/ctsms-departments_de.properties.j2 dest: /ctsms/config-default/ctsms-departments_de.properties notify: Reload Apache - name: Template ctsms-visitschedule-excel-settings.properties to /ctsms/config-default/ctsms-visitschedule-excel-settings.properties ansible.builtin.template: - src: ../templates/properties/ctsms-visitschedule-excel-settings.properties + src: ../templates/properties/ctsms-visitschedule-excel-settings.properties.j2 dest: /ctsms/config-default/ctsms-visitschedule-excel-settings.properties notify: Reload Apache From 2d67bbc51543fdce942fe91c02dddff9a50c77aa Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 23:17:45 -0700 Subject: [PATCH 147/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 1043135..7cf3df3 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -36,37 +36,31 @@ ansible.builtin.template: src: ../templates/properties/ctsms-applicationcontext.properties.j2 dest: /ctsms/config-default/ctsms-applicationcontext.properties - notify: Reload Apache - name: Template ctsms-cv-pdf-settings.properties to /ctsms/config-default/ctsms-cv-pdf-settings.properties ansible.builtin.template: src: ../templates/properties/ctsms-cv-pdf-settings.properties.j2 dest: /ctsms/config-default/ctsms-cv-pdf-settings.properties - notify: Reload Apache - name: Template ctsms-dbtool.properties to /ctsms/config-default/ctsms-dbtool.properties ansible.builtin.template: src: ../templates/properties/ctsms-dbtool.properties.j2 dest: /ctsms/config-default/ctsms-dbtool.properties - notify: Reload Apache - name: Template ctsms-departments.properties to /ctsms/config-default/ctsms-departments.properties ansible.builtin.template: src: ../templates/properties/ctsms-departments.properties.j2 dest: /ctsms/config-default/ctsms-departments.properties - notify: Reload Apache - name: Template ctsms-departments_de.properties to /ctsms/config-default/ctsms-departments_de.properties ansible.builtin.template: src: ../templates/properties/ctsms-departments_de.properties.j2 dest: /ctsms/config-default/ctsms-departments_de.properties - notify: Reload Apache - name: Template ctsms-visitschedule-excel-settings.properties to /ctsms/config-default/ctsms-visitschedule-excel-settings.properties ansible.builtin.template: src: ../templates/properties/ctsms-visitschedule-excel-settings.properties.j2 dest: /ctsms/config-default/ctsms-visitschedule-excel-settings.properties - notify: Reload Apache - name: Write dbtool.sh ansible.builtin.copy: From c433b74a3a860968a28e39960710d8152e3a8f50 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 23:21:27 -0700 Subject: [PATCH 148/217] Create ctsms-departments.properties.j2 --- templates/properties/ctsms-departments.properties.j2 | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 templates/properties/ctsms-departments.properties.j2 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 %} From 263774d7dceb8280dfb68ff357e94bd8f6d4b2dc Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 23:22:54 -0700 Subject: [PATCH 149/217] Create ctsms-departments_de.properties.j2 --- templates/properties/ctsms-departments_de.properties.j2 | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 templates/properties/ctsms-departments_de.properties.j2 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 %} From 356a498f95d8a19e31f2c567181da8c543759ca0 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 23:29:15 -0700 Subject: [PATCH 150/217] Update tomcat9.yml --- playbooks/tomcat9.yml | 47 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index c009cbd..f5a809a 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -17,16 +17,19 @@ 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: @@ -36,12 +39,15 @@ 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: @@ -50,12 +56,14 @@ 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: @@ -63,6 +71,7 @@ dest: /opt/tomcat9 remote_src: yes extra_opts: [--strip-components=1] + notify: Start tomcat9 - name: Change ownership of Tomcat directories file: @@ -75,18 +84,22 @@ - 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 @@ -94,6 +107,8 @@ 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 @@ -124,33 +139,39 @@ [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: @@ -159,6 +180,7 @@ owner: root group: tomcat mode: '0640' + notify: Start tomcat9 - name: Template server.xml to /opt/tomcat9/server.xml ansible.builtin.template: @@ -167,11 +189,14 @@ owner: root group: tomcat mode: '0640' + notify: Start tomcat9 - - name: Set permissions on /var/log/tomcat9 directory - ansible.builtin.file: - path: /var/log/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.file: @@ -180,11 +205,13 @@ with_fileglob: - /var/log/tomcat9/* when: item is file + notify: Start 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: @@ -193,24 +220,28 @@ 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: @@ -219,8 +250,10 @@ owner: root group: tomcat mode: '0644' + notify: Start tomcat9 - - name: Start service tomcat - ansible.builtin.service: - name: tomcat - state: started + handlers: + - name: Start tomcat9 + ansible.builtin.service: + name: tomcat + state: started From 15ffba80baab299be610eaf90b20f0d519097b7c Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 17 May 2025 23:32:35 -0700 Subject: [PATCH 151/217] Update tomcat9.yml --- playbooks/tomcat9.yml | 50 +++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index f5a809a..153105f 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -17,19 +17,19 @@ ansible.builtin.apt: name: default-jdk state: present - notify: Start tomcat9 + notify: Start tomcat9 - name: install libservlet3.1-java ansible.builtin.apt: name: libservlet3.1-java state: present - notify: Start tomcat9 + notify: Start tomcat9 - name: Create tomcat group group: name: tomcat state: present - notify: Start tomcat9 + notify: Start tomcat9 - name: Create tomcat user user: @@ -39,7 +39,7 @@ shell: /bin/false system: yes create_home: no - notify: Start tomcat9 + notify: Start tomcat9 - name: Run usermod command: usermod --append --groups ctsms tomcat @@ -56,14 +56,14 @@ owner: tomcat group: tomcat mode: '0755' - notify: Start tomcat9 + 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 + notify: Start tomcat9 - name: Extract Tomcat archive unarchive: @@ -71,7 +71,7 @@ dest: /opt/tomcat9 remote_src: yes extra_opts: [--strip-components=1] - notify: Start tomcat9 + notify: Start tomcat9 - name: Change ownership of Tomcat directories file: @@ -91,14 +91,14 @@ path: /opt/tomcat9 group: tomcat recurse: yes - notify: Start tomcat9 + notify: Start tomcat9 - name: Assign read permissions to conf directory file: path: /opt/tomcat9/conf mode: '0750' recurse: yes - notify: Start tomcat9 + notify: Start tomcat9 - name: Set CATALINA_HOME environment variable copy: @@ -107,7 +107,7 @@ export CATALINA_HOME="/opt/tomcat9" export JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64" mode: '0755' - notify: Start tomcat9 + notify: Start tomcat9 - name: Create systemd service file for Tomcat copy: @@ -139,39 +139,39 @@ [Install] WantedBy=multi-user.target mode: '0644' - notify: Start tomcat9 + notify: Start tomcat9 - name: Reload systemd daemon systemd: daemon_reload: yes - notify: Start tomcat9 + notify: Start tomcat9 - name: Enable and start Tomcat service systemd: name: tomcat enabled: yes state: started - notify: Start tomcat9 + notify: Start tomcat9 - name: Stop service tomcat9, if started ansible.builtin.service: name: tomcat state: stopped - notify: Start tomcat9 + notify: Start tomcat9 - name: allow tomcat writing to /ctsms/external_files user: name: tomcat groups: ctsms append: yes - notify: Start tomcat9 + notify: Start tomcat9 - name: allow ctsms user to load jars from exploded .war user: name: ctsms groups: tomcat,adm append: yes - notify: Start tomcat9 + notify: Start tomcat9 - name: Template workers.properties to /opt/tomcat9/workers.properties ansible.builtin.template: @@ -180,7 +180,7 @@ owner: root group: tomcat mode: '0640' - notify: Start tomcat9 + notify: Start tomcat9 - name: Template server.xml to /opt/tomcat9/server.xml ansible.builtin.template: @@ -189,14 +189,14 @@ owner: root group: tomcat mode: '0640' - notify: Start tomcat9 + notify: Start tomcat9 - name: Ensure /var/log/tomcat9/ directory exists file: path: /var/log/tomcat9/ state: directory mode: '0770' - notify: Start tomcat9 + notify: Start tomcat9 - name: Add group write permission to files in /var/log/tomcat9 ansible.builtin.file: @@ -211,7 +211,7 @@ ansible.builtin.file: path: /opt/tomcat9/webapps mode: '0775' - notify: Start tomcat9 + notify: Start tomcat9 - name: Set JAVA_OPTS in /etc/default/tomcat9 lineinfile: @@ -220,28 +220,28 @@ 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 + 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 + 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 + 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 + notify: Start tomcat9 - name: Template ctsms.conf to /etc/tomcat9/server.xml ansible.builtin.template: @@ -250,7 +250,7 @@ owner: root group: tomcat mode: '0644' - notify: Start tomcat9 + notify: Start tomcat9 handlers: - name: Start tomcat9 From 044b634df76977b5767cf9b15b44f2554a1b3bb1 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sun, 18 May 2025 00:01:33 -0700 Subject: [PATCH 152/217] Update install-bulk-processor.yml --- playbooks/install-bulk-processor.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 662cd1e..c34f708 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -98,11 +98,16 @@ force: yes when: ansible_os_family == "Debian" - - name: Install sys, threads from CPANM + - name: Install sys from CPANM community.general.cpanm: - name: - - Sys - - threads + 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 @@ -148,10 +153,10 @@ extra_opts: - --strip-components=1 - - name: Run minify.pl on Signup folder - ansible.builtin.command: > - perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl \ - --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup + # - name: Run minify.pl on Signup folder + # ansible.builtin.command: > + # perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl \ + # --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup - name: Create /ctsms/bulk_processor/output directory ansible.builtin.file: From 800f4da7d0e52d1c0322a7edc5cacdf1880e58c3 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sun, 18 May 2025 00:11:54 -0700 Subject: [PATCH 153/217] Update install-bulk-processor.yml --- playbooks/install-bulk-processor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index c34f708..7f0b522 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -153,6 +153,8 @@ extra_opts: - --strip-components=1 + # This is broken as of 5/25 + # - name: Run minify.pl on Signup folder # ansible.builtin.command: > # perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl \ From cfecaae2fc8a6ef61470df5339ed6eb63afdb646 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sun, 18 May 2025 12:59:54 -0700 Subject: [PATCH 154/217] Update init-database.yml --- playbooks/init-database.yml | 238 ++++++++++++++++++------------------ 1 file changed, 119 insertions(+), 119 deletions(-) diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index d2e5805..597894d 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -101,57 +101,57 @@ - 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, + 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 user 'my_department_signup_de' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_de" - -p "my_department_signup_de" - -ul de - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_de" \ + -p "my_department_signup_de" \ + -ul de \ + -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, \ OURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - name: create user 'my_department_signup_en' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_en" - -p "my_department_signup_en" - -ul en - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_en" \ + -p "my_department_signup_en" \ + -ul en \ + -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" - name: create user 'my_department_signup_da' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_da" - -p "my_department_signup_da" - -ul da - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_da" \ + -p "my_department_signup_da" \ + -ul da \ + -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" - name: create user 'my_department_signup_es' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_es" - -p "my_department_signup_es" - -ul es - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_es" \ + -p "my_department_signup_es" \ + -ul es \ + -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" - name: create user 'my_department_signup_fi' @@ -167,112 +167,112 @@ - name: create user 'my_department_signup_fr' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_fr" - -p "my_department_signup_fr" - -ul fr - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_fr" \ + -p "my_department_signup_fr" \ + -ul fr \ + -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" - name: create user 'my_department_signup_hu' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_hu" - -p "my_department_signup_hu" - -ul hu - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_hu" \ + -p "my_department_signup_hu" \ + -ul hu \ + -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" - name: create user 'my_department_signup_it' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_it" - -p "my_department_signup_it" - -ul it - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_it" \ + -p "my_department_signup_it" \ + -ul it \ + -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" - name: create user 'my_department_signup_ja' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_ja" - -p "my_department_signup_ja" - -ul ja - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_ja" \ + -p "my_department_signup_ja" \ + -ul ja \ + -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" - name: create user 'my_department_signup_ko' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_ko" - -p "my_department_signup_ko" - -ul ko - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_ko" \ + -p "my_department_signup_ko" \ + -ul ko \ + -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" - name: create user 'my_department_signup_nl' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_nl" - -p "my_department_signup_nl" - -ul nl - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_nl" \ + -p "my_department_signup_nl" \ + -ul nl \ + -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" - name: create user 'my_department_signup_pt' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_pt" - -p "my_department_signup_pt" - -ul pt - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_pt" \ + -p "my_department_signup_pt" \ + -ul pt \ + -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" - name: create user 'my_department_signup_ro' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_ro" - -p "my_department_signup_ro" - -ul ro - -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" + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_ro" \ + -p "my_department_signup_ro" \ + -ul ro \ + -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" \ - name: create user 'my_department_signup_sk' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_sk" - -p "my_department_signup_sk" - -ul sk - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_sk" \ + -p "my_department_signup_sk" \ + -ul sk \ + -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" - name: create user 'my_department_signup_sl' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_sl" - -p "my_department_signup_sl" - -ul sl - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_sl" \ + -p "my_department_signup_sl" \ + -ul sl \ + -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" - name: create user 'my_department_signup_sv' @@ -398,24 +398,24 @@ - name: create user 'my_department_signup_zh' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ -dp "{{ department_password }}" - -u "my_department_signup_zh" - -p "my_department_signup_zh" - -ul yo - -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, + -u "my_department_signup_zh" \ + -p "my_department_signup_zh" \ + -ul zh \ + -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" - name: create user 'my_department_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, + 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: Update ctsms_base_uri in EcrfExporter settings From 6514d9b170038ffc10aaa71eba9f847dfcd59df4 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sun, 18 May 2025 14:42:59 -0700 Subject: [PATCH 155/217] testing issue with the commands --- install.yml | 20 +-- playbooks/init-database.yml | 269 ++++++++++++++++++------------------ 2 files changed, 141 insertions(+), 148 deletions(-) diff --git a/install.yml b/install.yml index 674c8ba..aa3c894 100644 --- a/install.yml +++ b/install.yml @@ -1,13 +1,13 @@ -- 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/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 diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index 597894d..b9313c7 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -24,91 +24,84 @@ IP: "{{ ansible_default_ipv4.address }}" tasks: - - 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: 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" + 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 user 'my_department_signup_de' shell: | @@ -277,79 +270,79 @@ - name: create user 'my_department_signup_sv' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_sv" - -p "my_department_signup_sv" - -ul sv - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_sv" \ + -p "my_department_signup_sv" \ + -ul sv \ + -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" - name: create user 'my_department_signup_uk' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_uk" - -p "my_department_signup_uk" - -ul uk - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_uk" \ + -p "my_department_signup_uk" \ + -ul uk \ + -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" - name: create user 'my_department_signup_ru' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_ru" - -p "my_department_signup_ru" - -ul ru - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_ru" \ + -p "my_department_signup_ru" \ + -ul ru \ + -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" - name: create user 'my_department_signup_ln' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_ln" - -p "my_department_signup_ln" - -ul ln - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_ln" \ + -p "my_department_signup_ln" \ + -ul ln \ + -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" - name: create user 'my_department_signup_sw' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_sw" - -p "my_department_signup_sw" - -ul sw - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_sw" \ + -p "my_department_signup_sw" \ + -ul sw \ + -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" - name: create user 'my_department_signup_yo' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_yo" - -p "my_department_signup_yo" - -ul yo - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_yo" \ + -p "my_department_signup_yo" \ + -ul yo \ + -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" - name: create user 'my_department_signup_ig' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_ig" - -p "my_department_signup_ig" - -ul ig - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_ig" \ + -p "my_department_signup_ig" \ + -ul ig \ + -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" - name: create user 'my_department_signup_ff' @@ -387,13 +380,13 @@ - name: create user 'my_department_signup_hi' shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_hi" - -p "my_department_signup_hi" - -ul hi - -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, + sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ + -dp "{{ department_password }}" \ + -u "my_department_signup_hi" \ + -p "my_department_signup_hi" \ + -ul hi \ + -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" - name: create user 'my_department_signup_zh' From 4c14b352cf276aef7a52b70369431894629b706a Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sun, 18 May 2025 14:51:52 -0700 Subject: [PATCH 156/217] updating init-database --- install.yml | 20 +- playbooks/init-database.yml | 480 ++++++++---------------------------- 2 files changed, 106 insertions(+), 394 deletions(-) diff --git a/install.yml b/install.yml index aa3c894..674c8ba 100644 --- a/install.yml +++ b/install.yml @@ -1,13 +1,13 @@ -# - 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/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 diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index b9313c7..aa3a48b 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -24,392 +24,104 @@ IP: "{{ ansible_default_ipv4.address }}" tasks: - # - 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: 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 user 'my_department_signup_de' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_de" \ - -p "my_department_signup_de" \ - -ul de \ - -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, \ - OURSE_NO_SEARCH,TRIAL_NO_SEARCH,PROBAND_NO_SEARCH,USER_NO_SEARCH,INPUT_FIELD_NO_SEARCH,MASS_MAIL_NO_SEARCH" - - - name: create user 'my_department_signup_en' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_en" \ - -p "my_department_signup_en" \ - -ul en \ - -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" - - - name: create user 'my_department_signup_da' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_da" \ - -p "my_department_signup_da" \ - -ul da \ - -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" - - - name: create user 'my_department_signup_es' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_es" \ - -p "my_department_signup_es" \ - -ul es \ - -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" - - - name: create user 'my_department_signup_fi' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_fi" - -p "my_department_signup_fi" - -ul fi - -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" - - - name: create user 'my_department_signup_fr' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_fr" \ - -p "my_department_signup_fr" \ - -ul fr \ - -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" - - - name: create user 'my_department_signup_hu' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_hu" \ - -p "my_department_signup_hu" \ - -ul hu \ - -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" - - - name: create user 'my_department_signup_it' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_it" \ - -p "my_department_signup_it" \ - -ul it \ - -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" - - - name: create user 'my_department_signup_ja' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_ja" \ - -p "my_department_signup_ja" \ - -ul ja \ - -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" - - - name: create user 'my_department_signup_ko' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_ko" \ - -p "my_department_signup_ko" \ - -ul ko \ - -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" - - - name: create user 'my_department_signup_nl' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_nl" \ - -p "my_department_signup_nl" \ - -ul nl \ - -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" - - - name: create user 'my_department_signup_pt' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_pt" \ - -p "my_department_signup_pt" \ - -ul pt \ - -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" - - - name: create user 'my_department_signup_ro' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_ro" \ - -p "my_department_signup_ro" \ - -ul ro \ - -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" \ - - - name: create user 'my_department_signup_sk' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_sk" \ - -p "my_department_signup_sk" \ - -ul sk \ - -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" - - - name: create user 'my_department_signup_sl' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_sl" \ - -p "my_department_signup_sl" \ - -ul sl \ - -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" - - - name: create user 'my_department_signup_sv' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_sv" \ - -p "my_department_signup_sv" \ - -ul sv \ - -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" - - - name: create user 'my_department_signup_uk' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_uk" \ - -p "my_department_signup_uk" \ - -ul uk \ - -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" - - - name: create user 'my_department_signup_ru' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_ru" \ - -p "my_department_signup_ru" \ - -ul ru \ - -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" - - - name: create user 'my_department_signup_ln' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_ln" \ - -p "my_department_signup_ln" \ - -ul ln \ - -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" - - - name: create user 'my_department_signup_sw' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_sw" \ - -p "my_department_signup_sw" \ - -ul sw \ - -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" - - - name: create user 'my_department_signup_yo' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_yo" \ - -p "my_department_signup_yo" \ - -ul yo \ - -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" - - - name: create user 'my_department_signup_ig' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_ig" \ - -p "my_department_signup_ig" \ - -ul ig \ - -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" - - - name: create user 'my_department_signup_ff' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_ff" - -p "my_department_signup_ff" - -ul ff - -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" - - - name: create user 'my_department_signup_ar' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_ar" - -p "my_department_signup_ar" - -ul ar - -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" - - - name: create user 'my_department_signup_kg' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department - -dp "{{ department_password }}" - -u "my_department_signup_kg" - -p "my_department_signup_kg" - -ul kg - -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" - - - name: create user 'my_department_signup_hi' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" \ - -u "my_department_signup_hi" \ - -p "my_department_signup_hi" \ - -ul hi \ - -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" - - - name: create user 'my_department_signup_zh' - shell: | - sudo -u ctsms /ctsms/dbtool.sh -cu -dlk my_department \ - -dp "{{ department_password }}" - -u "my_department_signup_zh" \ - -p "my_department_signup_zh" \ - -ul zh \ - -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" - - - name: create user 'my_department_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" + 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 all language-specific signup users + hosts: all + tasks: + - 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: Update ctsms_base_uri in EcrfExporter settings ansible.builtin.lineinfile: From 324a9aac96990fc37a04175912a0c2f356222469 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sun, 18 May 2025 14:53:22 -0700 Subject: [PATCH 157/217] Update init-database.yml --- playbooks/init-database.yml | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index aa3a48b..4b47165 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -102,26 +102,26 @@ - 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 all language-specific signup users - hosts: all - tasks: - - 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 all language-specific signup users + hosts: all + tasks: + - 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: Update ctsms_base_uri in EcrfExporter settings ansible.builtin.lineinfile: From 28c6733587d7c36eff2673393bc93a3bc369d247 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sun, 18 May 2025 14:56:43 -0700 Subject: [PATCH 158/217] Update init-database.yml --- playbooks/init-database.yml | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index 4b47165..a07f828 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -102,26 +102,23 @@ - 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 all language-specific signup users - hosts: all - tasks: - - 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 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: Update ctsms_base_uri in EcrfExporter settings ansible.builtin.lineinfile: From 91bb4d3dda3d99a94b668710f8b6be3a62e2b3df Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 19 May 2025 11:51:24 -0700 Subject: [PATCH 159/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 7cf3df3..1a2a6a4 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -73,7 +73,7 @@ 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 $* + 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:+CMSClassUnloadingEnabled -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: From 8508bf003e0f63527a6f3eea4d69a02f694d960b Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 19 May 2025 13:19:06 -0700 Subject: [PATCH 160/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 1a2a6a4..7cf3df3 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -73,7 +73,7 @@ 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:+CMSClassUnloadingEnabled -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 $* + 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: From e7d9319ea332f7576366233800db9e5ee2a4af81 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 19 May 2025 13:29:01 -0700 Subject: [PATCH 161/217] Update init-database.yml moved passwords to facts so they are not recalculated on every lookup --- playbooks/init-database.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index a07f828..de3cc87 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -18,12 +18,15 @@ ops_codes_file_revisions: "ops2012syst_claml_20111103" asp_substances_file: "/ctsms/master_data/asp_register_20240316.xls" asp_substances_file_encoding: "Cp1252" - 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') }}" IP: "{{ ansible_default_ipv4.address }}" tasks: + - name: Generate environment passwords + ansible.builtin.setfact: + 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 From dbda6a99bb7fdeaaca65153ffbabb944d4e34e24 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 19 May 2025 13:33:45 -0700 Subject: [PATCH 162/217] Update init-database.yml --- playbooks/init-database.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index de3cc87..8c75a8b 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -156,6 +156,10 @@ cmd: perl process.pl --task=create_criteria --force --skip-errors chdir: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/Criteria + - name: Installation complete + ansible.builtin.debug: + msg: "Installation complete" + - 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 }}." From 21a399042b8406adda9529bc798bb516dfab6268 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 19 May 2025 13:42:14 -0700 Subject: [PATCH 163/217] Update init-database.yml --- playbooks/init-database.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index 8c75a8b..1afcb4a 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -22,7 +22,7 @@ tasks: - name: Generate environment passwords - ansible.builtin.setfact: + 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') }}" From aca52f367f0fded8c36ea9fba510da24c054838a Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 19 May 2025 14:20:19 -0700 Subject: [PATCH 164/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 29 ++++++++++++++------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 7cf3df3..23f7edf 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -7,6 +7,7 @@ xmx: "4096m" xss: "512k" perm: "256m" + config_directory: "/ctsms/config/" tasks: - name: Create /ctsms ansible.builtin.file: @@ -27,40 +28,40 @@ group: ctsms mode: '0755' - - name: Clone config-default repository to /ctsms/config-default + - name: Clone config-default repository to "{{ config_directory }}" ansible.builtin.git: repo: 'https://github.com/phoenixctms/config-default.git' - dest: /ctsms/config-default + dest: "{{ config_directory }}" - - name: Template ctsms-applicationcontext.properties to /ctsms/config-default/ctsms-applicationcontext.properties + - name: Template ctsms-applicationcontext.properties to "{{ config_directory }}"/ctsms-applicationcontext.properties ansible.builtin.template: src: ../templates/properties/ctsms-applicationcontext.properties.j2 - dest: /ctsms/config-default/ctsms-applicationcontext.properties + dest: "'{{ config_directory }}'/ctsms-applicationcontext.properties" - - name: Template ctsms-cv-pdf-settings.properties to /ctsms/config-default/ctsms-cv-pdf-settings.properties + - name: Template ctsms-cv-pdf-settings.properties to "{{ config_directory }}"/ctsms-cv-pdf-settings.properties ansible.builtin.template: src: ../templates/properties/ctsms-cv-pdf-settings.properties.j2 - dest: /ctsms/config-default/ctsms-cv-pdf-settings.properties + dest: "'{{ config_directory }}'/ctsms-cv-pdf-settings.properties" - - name: Template ctsms-dbtool.properties to /ctsms/config-default/ctsms-dbtool.properties + - name: Template ctsms-dbtool.properties to "{{ config_directory }}"/ctsms-dbtool.properties ansible.builtin.template: src: ../templates/properties/ctsms-dbtool.properties.j2 - dest: /ctsms/config-default/ctsms-dbtool.properties + dest: "'{{ config_directory }}'/ctsms-dbtool.properties" - - name: Template ctsms-departments.properties to /ctsms/config-default/ctsms-departments.properties + - name: Template ctsms-departments.properties to "{{ config_directory }}"/ctsms-departments.properties ansible.builtin.template: src: ../templates/properties/ctsms-departments.properties.j2 - dest: /ctsms/config-default/ctsms-departments.properties + dest: "'{{ config_directory }}'/ctsms-departments.properties" - - name: Template ctsms-departments_de.properties to /ctsms/config-default/ctsms-departments_de.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: /ctsms/config-default/ctsms-departments_de.properties + dest: "'{{ config_directory }}'/ctsms-departments_de.properties" - - name: Template ctsms-visitschedule-excel-settings.properties to /ctsms/config-default/ctsms-visitschedule-excel-settings.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: /ctsms/config-default/ctsms-visitschedule-excel-settings.properties + dest: "'{{ config_directory }}'/ctsms-visitschedule-excel-settings.properties" - name: Write dbtool.sh ansible.builtin.copy: From c053257641a2bb6f49d4dc5e8c004902b2ba03d3 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 19 May 2025 15:26:05 -0700 Subject: [PATCH 165/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 23f7edf..1ebfaa3 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -36,32 +36,32 @@ - name: Template ctsms-applicationcontext.properties to "{{ config_directory }}"/ctsms-applicationcontext.properties ansible.builtin.template: src: ../templates/properties/ctsms-applicationcontext.properties.j2 - dest: "'{{ config_directory }}'/ctsms-applicationcontext.properties" + dest: "{{ config_directory }}/ctsms-applicationcontext.properties" - name: Template ctsms-cv-pdf-settings.properties to "{{ config_directory }}"/ctsms-cv-pdf-settings.properties ansible.builtin.template: src: ../templates/properties/ctsms-cv-pdf-settings.properties.j2 - dest: "'{{ config_directory }}'/ctsms-cv-pdf-settings.properties" + dest: "{{ config_directory }}/ctsms-cv-pdf-settings.properties" - name: Template ctsms-dbtool.properties to "{{ config_directory }}"/ctsms-dbtool.properties ansible.builtin.template: src: ../templates/properties/ctsms-dbtool.properties.j2 - dest: "'{{ config_directory }}'/ctsms-dbtool.properties" + dest: "{{ config_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: "'{{ config_directory }}'/ctsms-departments.properties" + dest: "{{ config_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: "'{{ config_directory }}'/ctsms-departments_de.properties" + dest: "{{ config_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: "'{{ config_directory }}'/ctsms-visitschedule-excel-settings.properties" + dest: "{{ config_directory }}/ctsms-visitschedule-excel-settings.properties" - name: Write dbtool.sh ansible.builtin.copy: From 8021e4876d14b9203fc25dcce6eb3c7909e73f4a Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 19 May 2025 16:57:43 -0700 Subject: [PATCH 166/217] fixing issue with properties directory --- playbooks/init-database.yml | 4 --- playbooks/install-bulk-processor.yml | 30 ++++++++++++--------- playbooks/prepare-ctsms-directory.yml | 39 ++++++++++++++++----------- templates/shell/ecrfdataexport.j2 | 8 ------ templates/shell/ecrfdataimport.j2 | 8 ------ templates/shell/inquirydataexport.j2 | 8 ------ 6 files changed, 42 insertions(+), 55 deletions(-) delete mode 100644 templates/shell/ecrfdataexport.j2 delete mode 100644 templates/shell/ecrfdataimport.j2 delete mode 100644 templates/shell/inquirydataexport.j2 diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index 1afcb4a..8869efd 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -156,10 +156,6 @@ cmd: perl process.pl --task=create_criteria --force --skip-errors chdir: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/Criteria - - name: Installation complete - ansible.builtin.debug: - msg: "Installation complete" - - 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 }}." diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 7f0b522..910c997 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -154,7 +154,7 @@ - --strip-components=1 # This is broken as of 5/25 - + # - name: Run minify.pl on Signup folder # ansible.builtin.command: > # perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl \ @@ -196,26 +196,32 @@ path: /ctsms/bulk-processor.tar.gz state: absent - - name: Template ecrfdataexport.sh to /ctsms/ - ansible.builtin.template: - src: ../templates/shell/ecrfdataexport.j2 + - name: Write ecrfdataexport.sh + ansible.builtin.copy: dest: /ctsms/ecrfdataexport.sh owner: ctsms group: ctsms mode: '0755' + content: | + #!/bin/bash + perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/process.pl $* - - name: Template ecrfdataeimport.sh to /ctsms/ - ansible.builtin.template: - src: ../templates/shell/ecrfdataimport.j2 - dest: /ctsms/ecrfdataimport.sh + - name: Write ecrfdataeimport.sh + ansible.builtin.copy: + dest: /ctsms/ecrfdataeimport.sh owner: ctsms group: ctsms mode: '0755' + content: | + #!/bin/bash + perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/process.pl $* - - name: Template inquirydataexport.sh to /ctsms/ - ansible.builtin.template: - src: ../templates/shell/inquirydataexport.j2 - dest: /ctsms/inquirydataexport.sh + - name: Write inquirydataexport.sh + ansible.builtin.copy: + dest: /ctsms/dbtool.sh owner: ctsms group: ctsms mode: '0755' + content: | + #!/bin/bash + perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/process.pl $* diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 1ebfaa3..a6dc44d 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -1,4 +1,4 @@ -- name: Prepare CTMS directory +/ctsms- name: Prepare CTMS directory gather_facts: true hosts: all become: true @@ -7,7 +7,6 @@ xmx: "4096m" xss: "512k" perm: "256m" - config_directory: "/ctsms/config/" tasks: - name: Create /ctsms ansible.builtin.file: @@ -31,37 +30,47 @@ - name: Clone config-default repository to "{{ config_directory }}" ansible.builtin.git: repo: 'https://github.com/phoenixctms/config-default.git' - dest: "{{ config_directory }}" + dest: "/ctsms/config-default" - - name: Template ctsms-applicationcontext.properties to "{{ config_directory }}"/ctsms-applicationcontext.properties + - name: Move contents of /ctsms/config-default to /foo + command: mv /ctsms/config-default/* /ctsms/ + args: + removes: /ctsms/config-default/* + + - name: Remove /config/default directory + file: + path: /config/default + state: absent + + - name: Template ctsms-applicationcontext.properties to "/ctsms/properties/ctsms-applicationcontext.properties ansible.builtin.template: src: ../templates/properties/ctsms-applicationcontext.properties.j2 - dest: "{{ config_directory }}/ctsms-applicationcontext.properties" + dest: "/ctsms/properties/ctsms-applicationcontext.properties" - - name: Template ctsms-cv-pdf-settings.properties to "{{ config_directory }}"/ctsms-cv-pdf-settings.properties + - name: Template ctsms-cv-pdf-settings.properties to "/ctsms/properties/ctsms-cv-pdf-settings.properties ansible.builtin.template: src: ../templates/properties/ctsms-cv-pdf-settings.properties.j2 - dest: "{{ config_directory }}/ctsms-cv-pdf-settings.properties" + dest: "/ctsms/properties/ctsms-cv-pdf-settings.properties" - - name: Template ctsms-dbtool.properties to "{{ config_directory }}"/ctsms-dbtool.properties + - name: Template ctsms-dbtool.properties to "/ctsms/properties/ctsms-dbtool.properties ansible.builtin.template: src: ../templates/properties/ctsms-dbtool.properties.j2 - dest: "{{ config_directory }}/ctsms-dbtool.properties" + dest: "/ctsms/properties/ctsms-dbtool.properties" - - name: Template ctsms-departments.properties to "{{ config_directory }}"/ctsms-departments.properties + - name: Template ctsms-departments.properties to "/ctsms/properties/ctsms-departments.properties ansible.builtin.template: src: ../templates/properties/ctsms-departments.properties.j2 - dest: "{{ config_directory }}/ctsms-departments.properties" + dest: "/ctsms/properties/ctsms-departments.properties" - - name: Template ctsms-departments_de.properties to "{{ config_directory }}"/ctsms-departments_de.properties + - name: Template ctsms-departments_de.properties to "/ctsms/properties/ctsms-departments_de.properties ansible.builtin.template: src: ../templates/properties/ctsms-departments_de.properties.j2 - dest: "{{ config_directory }}/ctsms-departments_de.properties" + dest: "/ctsms/properties/ctsms-departments_de.properties" - - name: Template ctsms-visitschedule-excel-settings.properties to "{{ config_directory }}"/ctsms-visitschedule-excel-settings.properties + - name: Template ctsms-visitschedule-excel-settings.properties to "/ctsms/properties/ctsms-visitschedule-excel-settings.properties ansible.builtin.template: src: ../templates/properties/ctsms-visitschedule-excel-settings.properties.j2 - dest: "{{ config_directory }}/ctsms-visitschedule-excel-settings.properties" + dest: "/ctsms/properties/ctsms-visitschedule-excel-settings.properties" - name: Write dbtool.sh ansible.builtin.copy: diff --git a/templates/shell/ecrfdataexport.j2 b/templates/shell/ecrfdataexport.j2 deleted file mode 100644 index 7e293ed..0000000 --- a/templates/shell/ecrfdataexport.j2 +++ /dev/null @@ -1,8 +0,0 @@ - -{% 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 deleted file mode 100644 index 2db1c20..0000000 --- a/templates/shell/ecrfdataimport.j2 +++ /dev/null @@ -1,8 +0,0 @@ - -{% 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 deleted file mode 100644 index 07f480e..0000000 --- a/templates/shell/inquirydataexport.j2 +++ /dev/null @@ -1,8 +0,0 @@ - -{% 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 %} From e7fd696f6db50d5669dd6bf74dc0e0e4ce508011 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 19 May 2025 17:07:38 -0700 Subject: [PATCH 167/217] testing minify --- playbooks/prepare-ctsms-directory.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index a6dc44d..5743762 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -27,7 +27,7 @@ group: ctsms mode: '0755' - - name: Clone config-default repository to "{{ config_directory }}" + - name: Clone config-default repository to "/ctsms/config-default" ansible.builtin.git: repo: 'https://github.com/phoenixctms/config-default.git' dest: "/ctsms/config-default" From 862be1e03a56b9bc292824f6b310532700a31ecc Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 19 May 2025 17:26:19 -0700 Subject: [PATCH 168/217] Update init-database.yml --- playbooks/init-database.yml | 56 +++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index 8869efd..8257511 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -123,33 +123,35 @@ - ro - sk - - name: Update ctsms_base_uri in EcrfExporter settings - ansible.builtin.lineinfile: - path: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/settings.yml - regexp: '^ctsms_base_uri:.*' - line: "ctsms_base_uri: 'https://{{ IP }}'" - backrefs: yes - - - name: Update ctsms_base_uri in EcrfImporter settings - ansible.builtin.lineinfile: - path: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/settings.yml - regexp: '^ctsms_base_uri:.*' - line: "ctsms_base_uri: 'https://{{ IP }}'" - backrefs: yes - - - name: Update ctsms_base_uri in InquiryExporter settings - ansible.builtin.lineinfile: - path: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/settings.yml - regexp: '^ctsms_base_uri:.*' - line: "ctsms_base_uri: 'https://{{ IP }}'" - backrefs: yes - - - name: Update ctsms_base_uri in Signup settings - ansible.builtin.lineinfile: - path: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/settings.yml - regexp: '^ctsms_base_uri:.*' - line: "ctsms_base_uri: 'https://{{ IP }}'" - backrefs: yes + - 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: Update Criteria config.cfg + shell: sed -r -i "s|ctsmsrestapi_password.*|ctsmsrestapi_password = {{ cron_password }}|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/Criteria/config.cfg + + - name: Update Duplicates config.cfg + shell: sed -r -i "s|ctsmsrestapi_password.*|ctsmsrestapi_password = {{ cron_password }}|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/Duplicates/config.cfg + + - name: Update EcrfExporter config.cfg + shell: sed -r -i "s|ctsmsrestapi_password.*|ctsmsrestapi_password = {{ cron_password }}|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/config.cfg + + - name: Update Criteria config.cfg + shell: sed -r -i "s|ctsmsrestapi_password.*|ctsmsrestapi_password = {{ cron_password }}|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/config.cfg + + - name: Update Criteria config.cfg + shell: sed -r -i "s|ctsmsrestapi_password.*|ctsmsrestapi_password = {{ cron_password }}|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/config.cfg + + - name: Update Criteria config.cfg + shell: sed -r -i "s|ctsms_base_uri.*|ctsms_base_uri: 'https://${IP}'|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/settings.yml + + - name: Update Criteria config.cfg + shell: sed -r -i "s|ctsms_base_uri.*|ctsms_base_uri: 'https://${IP}'|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/settings.yml + + - name: Update Criteria config.cfg + shell: sed -r -i "s|ctsms_base_uri.*|ctsms_base_uri: 'https://${IP}'|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/settings.yml + + - name: Update Criteria config.cfg + shell: sed -r -i "s|ctsms_base_uri.*|ctsms_base_uri: 'https://${IP}'|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/settings.yml - name: Run default criteria creation ansible.builtin.command: From cf431925f02bfd845e8811c9fa5fe1465ec23817 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 19 May 2025 17:30:35 -0700 Subject: [PATCH 169/217] Update init-database.yml --- playbooks/init-database.yml | 45 ++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index 8257511..8ba0408 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -126,32 +126,25 @@ - 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: Update Criteria config.cfg - shell: sed -r -i "s|ctsmsrestapi_password.*|ctsmsrestapi_password = {{ cron_password }}|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/Criteria/config.cfg - - - name: Update Duplicates config.cfg - shell: sed -r -i "s|ctsmsrestapi_password.*|ctsmsrestapi_password = {{ cron_password }}|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/Duplicates/config.cfg - - - name: Update EcrfExporter config.cfg - shell: sed -r -i "s|ctsmsrestapi_password.*|ctsmsrestapi_password = {{ cron_password }}|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/config.cfg - - - name: Update Criteria config.cfg - shell: sed -r -i "s|ctsmsrestapi_password.*|ctsmsrestapi_password = {{ cron_password }}|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/config.cfg - - - name: Update Criteria config.cfg - shell: sed -r -i "s|ctsmsrestapi_password.*|ctsmsrestapi_password = {{ cron_password }}|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/config.cfg - - - name: Update Criteria config.cfg - shell: sed -r -i "s|ctsms_base_uri.*|ctsms_base_uri: 'https://${IP}'|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/settings.yml - - - name: Update Criteria config.cfg - shell: sed -r -i "s|ctsms_base_uri.*|ctsms_base_uri: 'https://${IP}'|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/settings.yml - - - name: Update Criteria config.cfg - shell: sed -r -i "s|ctsms_base_uri.*|ctsms_base_uri: 'https://${IP}'|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/settings.yml - - - name: Update Criteria config.cfg - shell: sed -r -i "s|ctsms_base_uri.*|ctsms_base_uri: 'https://${IP}'|" /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/settings.yml + - name: Update ctsmsrestapi_password in config.cfg files + shell: sed -r -i "s|ctsmsrestapi_password.*|ctsmsrestapi_password = {{ cron_password }}|" {{ item }} + loop: + - /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/EcrfImporter/config.cfg + - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/config.cfg + tags: update_password + + - name: Update ctsms_base_uri in settings.yml files + shell: | + sed -r -i "s|ctsms_base_uri.*|ctsms_base_uri: 'https://{{ ansible_default_ipv4.address }}'|" {{ item }} + loop: + - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/settings.yml + - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/settings.yml + - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/settings.yml + - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/settings.yml + tags: update_base_uri - name: Run default criteria creation ansible.builtin.command: From fb834c1dfce2c7e9324749e2b4e474671b5ce074 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 19 May 2025 17:33:47 -0700 Subject: [PATCH 170/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 5743762..3abb027 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -1,4 +1,4 @@ -/ctsms- name: Prepare CTMS directory +- name: Prepare CTMS directory gather_facts: true hosts: all become: true From ff56d4bf0eae1c3305d40f0df1365af776b6b1ae Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 19 May 2025 17:36:15 -0700 Subject: [PATCH 171/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 3abb027..2471f15 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -30,7 +30,7 @@ - name: Clone config-default repository to "/ctsms/config-default" ansible.builtin.git: repo: 'https://github.com/phoenixctms/config-default.git' - dest: "/ctsms/config-default" + dest: "/ctsms/config-default/" - name: Move contents of /ctsms/config-default to /foo command: mv /ctsms/config-default/* /ctsms/ @@ -39,7 +39,7 @@ - name: Remove /config/default directory file: - path: /config/default + path: /ctsms/config-default state: absent - name: Template ctsms-applicationcontext.properties to "/ctsms/properties/ctsms-applicationcontext.properties From 6675b6774b50e6b21167d355e3e26ab801590782 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 19 May 2025 17:40:52 -0700 Subject: [PATCH 172/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 36 ++++++++++++++++++--------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 2471f15..11c17ec 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -3,10 +3,15 @@ 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" + dest_dir: "/ctsms" + archive_path: "/ctsms/config.tar.gz" + download_url: "https://github.com/phoenixctms/config-default/archive/{{ tag }}.tar.gz" + tasks: - name: Create /ctsms ansible.builtin.file: @@ -27,19 +32,26 @@ group: ctsms mode: '0755' - - name: Clone config-default repository to "/ctsms/config-default" - ansible.builtin.git: - repo: 'https://github.com/phoenixctms/config-default.git' - dest: "/ctsms/config-default/" - - - name: Move contents of /ctsms/config-default to /foo - command: mv /ctsms/config-default/* /ctsms/ - args: - removes: /ctsms/config-default/* - - - name: Remove /config/default directory + - name: Download config tarball + get_url: + url: "{{ download_url }}" + dest: "{{ archive_path }}" + validate_certs: no + headers: + Accept: "application/octet-stream" + force: yes + + - name: Extract config tarball + unarchive: + src: "{{ archive_path }}" + dest: "{{ dest_dir }}" + remote_src: yes + extra_opts: + - "--strip-components=1" + + - name: Remove config tarball file: - path: /ctsms/config-default + path: "{{ archive_path }}" state: absent - name: Template ctsms-applicationcontext.properties to "/ctsms/properties/ctsms-applicationcontext.properties From 37c41cbed3d5814e80251060421190c57885aafa Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Mon, 19 May 2025 18:21:22 -0700 Subject: [PATCH 173/217] removing servername directive --- templates/apache/00_ctsms_http.conf.j2 | 2 +- templates/apache/00_ctsms_https.conf.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/apache/00_ctsms_http.conf.j2 b/templates/apache/00_ctsms_http.conf.j2 index 48315d0..7f22c79 100644 --- a/templates/apache/00_ctsms_http.conf.j2 +++ b/templates/apache/00_ctsms_http.conf.j2 @@ -1,7 +1,7 @@ {% raw -%} - ServerName localhost:80 + #ServerName localhost:80 RewriteEngine On RewriteCond %{HTTPS} off diff --git a/templates/apache/00_ctsms_https.conf.j2 b/templates/apache/00_ctsms_https.conf.j2 index 5d4963f..fd1d242 100644 --- a/templates/apache/00_ctsms_https.conf.j2 +++ b/templates/apache/00_ctsms_https.conf.j2 @@ -3,7 +3,7 @@ # # - ServerName localhost:443 + #ServerName localhost:443 # date proto ipaddr status time req referer user-agent LogFormat "%{%F %T}t %p %a %>s %D %r %{Referer}i %{User-agent}i" From efa966dbac548305df1c2a18e9b984cc9e37d615 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 27 May 2025 11:06:25 -0700 Subject: [PATCH 174/217] reverting changes to fix issue --- playbooks/init-database.yml | 4 ++ playbooks/install-bulk-processor.yml | 30 ++++++--------- playbooks/prepare-ctsms-directory.yml | 55 +++++++++------------------ templates/shell/ecrfdataexport.j2 | 8 ++++ templates/shell/ecrfdataimport.j2 | 8 ++++ templates/shell/inquirydataexport.j2 | 8 ++++ 6 files changed, 57 insertions(+), 56 deletions(-) create mode 100644 templates/shell/ecrfdataexport.j2 create mode 100644 templates/shell/ecrfdataimport.j2 create mode 100644 templates/shell/inquirydataexport.j2 diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index 8ba0408..0d7a6c4 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -151,6 +151,10 @@ cmd: perl process.pl --task=create_criteria --force --skip-errors chdir: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/Criteria + - name: Installation complete + ansible.builtin.debug: + msg: "Installation complete" + - 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 }}." diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 910c997..7f0b522 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -154,7 +154,7 @@ - --strip-components=1 # This is broken as of 5/25 - + # - name: Run minify.pl on Signup folder # ansible.builtin.command: > # perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl \ @@ -196,32 +196,26 @@ path: /ctsms/bulk-processor.tar.gz state: absent - - name: Write ecrfdataexport.sh - ansible.builtin.copy: + - name: Template ecrfdataexport.sh to /ctsms/ + ansible.builtin.template: + src: ../templates/shell/ecrfdataexport.j2 dest: /ctsms/ecrfdataexport.sh owner: ctsms group: ctsms mode: '0755' - content: | - #!/bin/bash - perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/process.pl $* - - name: Write ecrfdataeimport.sh - ansible.builtin.copy: - dest: /ctsms/ecrfdataeimport.sh + - name: Template ecrfdataeimport.sh to /ctsms/ + ansible.builtin.template: + src: ../templates/shell/ecrfdataimport.j2 + dest: /ctsms/ecrfdataimport.sh owner: ctsms group: ctsms mode: '0755' - content: | - #!/bin/bash - perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/process.pl $* - - name: Write inquirydataexport.sh - ansible.builtin.copy: - dest: /ctsms/dbtool.sh + - name: Template inquirydataexport.sh to /ctsms/ + ansible.builtin.template: + src: ../templates/shell/inquirydataexport.j2 + dest: /ctsms/inquirydataexport.sh owner: ctsms group: ctsms mode: '0755' - content: | - #!/bin/bash - perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/process.pl $* diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 11c17ec..f125839 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -8,10 +8,7 @@ xmx: "4096m" xss: "512k" perm: "256m" - dest_dir: "/ctsms" - archive_path: "/ctsms/config.tar.gz" - download_url: "https://github.com/phoenixctms/config-default/archive/{{ tag }}.tar.gz" - + config_directory: "/ctsms/config/" tasks: - name: Create /ctsms ansible.builtin.file: @@ -31,58 +28,40 @@ 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: Download config tarball - get_url: - url: "{{ download_url }}" - dest: "{{ archive_path }}" - validate_certs: no - headers: - Accept: "application/octet-stream" - force: yes - - - name: Extract config tarball - unarchive: - src: "{{ archive_path }}" - dest: "{{ dest_dir }}" - remote_src: yes - extra_opts: - - "--strip-components=1" - - - name: Remove config tarball - file: - path: "{{ archive_path }}" - state: absent - - - name: Template ctsms-applicationcontext.properties to "/ctsms/properties/ctsms-applicationcontext.properties + - name: Template ctsms-applicationcontext.properties to "{{ config_directory }}"/ctsms-applicationcontext.properties ansible.builtin.template: src: ../templates/properties/ctsms-applicationcontext.properties.j2 - dest: "/ctsms/properties/ctsms-applicationcontext.properties" + dest: "{{ config_directory }}/ctsms-applicationcontext.properties" - - name: Template ctsms-cv-pdf-settings.properties to "/ctsms/properties/ctsms-cv-pdf-settings.properties + - name: Template ctsms-cv-pdf-settings.properties to "{{ config_directory }}"/ctsms-cv-pdf-settings.properties ansible.builtin.template: src: ../templates/properties/ctsms-cv-pdf-settings.properties.j2 - dest: "/ctsms/properties/ctsms-cv-pdf-settings.properties" + dest: "{{ config_directory }}/ctsms-cv-pdf-settings.properties" - - name: Template ctsms-dbtool.properties to "/ctsms/properties/ctsms-dbtool.properties + - name: Template ctsms-dbtool.properties to "{{ config_directory }}"/ctsms-dbtool.properties ansible.builtin.template: src: ../templates/properties/ctsms-dbtool.properties.j2 - dest: "/ctsms/properties/ctsms-dbtool.properties" + dest: "{{ config_directory }}/ctsms-dbtool.properties" - - name: Template ctsms-departments.properties to "/ctsms/properties/ctsms-departments.properties + - name: Template ctsms-departments.properties to "{{ config_directory }}"/ctsms-departments.properties ansible.builtin.template: src: ../templates/properties/ctsms-departments.properties.j2 - dest: "/ctsms/properties/ctsms-departments.properties" + dest: "{{ config_directory }}/ctsms-departments.properties" - - name: Template ctsms-departments_de.properties to "/ctsms/properties/ctsms-departments_de.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: "/ctsms/properties/ctsms-departments_de.properties" + dest: "{{ config_directory }}/ctsms-departments_de.properties" - - name: Template ctsms-visitschedule-excel-settings.properties to "/ctsms/properties/ctsms-visitschedule-excel-settings.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: "/ctsms/properties/ctsms-visitschedule-excel-settings.properties" + dest: "{{ config_directory }}/ctsms-visitschedule-excel-settings.properties" - name: Write dbtool.sh ansible.builtin.copy: 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 %} From 804822811dba81ee1a32de2d1047e4bad4e044da Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 27 May 2025 13:46:00 -0700 Subject: [PATCH 175/217] adding settings.yml files to install-bulk-processor --- playbooks/init-database.yml | 51 +++-- playbooks/install-bulk-processor.yml | 309 ++++++++++++++++++++++++++- 2 files changed, 346 insertions(+), 14 deletions(-) diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index 0d7a6c4..f5cf472 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -126,25 +126,50 @@ - 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: Update ctsmsrestapi_password in config.cfg files - shell: sed -r -i "s|ctsmsrestapi_password.*|ctsmsrestapi_password = {{ cron_password }}|" {{ item }} + - 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/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/EcrfImporter/config.cfg - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/config.cfg - tags: update_password - - - name: Update ctsms_base_uri in settings.yml files - shell: | - sed -r -i "s|ctsms_base_uri.*|ctsms_base_uri: 'https://{{ ansible_default_ipv4.address }}'|" {{ item }} - loop: - - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfExporter/settings.yml - - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/settings.yml - - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/InquiryExporter/settings.yml - - /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup/settings.yml - tags: update_base_uri - name: Run default criteria creation ansible.builtin.command: diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 7f0b522..d0a0005 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -154,7 +154,7 @@ - --strip-components=1 # This is broken as of 5/25 - + # - name: Run minify.pl on Signup folder # ansible.builtin.command: > # perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl \ @@ -219,3 +219,310 @@ 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/ErfImporter/settings.yml + copy: + dest: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/ErfImporter/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 From 16a08103e061a92e4ed4d990ae2b5d82224f5913 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 27 May 2025 14:20:12 -0700 Subject: [PATCH 176/217] minor bugfix --- playbooks/init-database.yml | 2 ++ playbooks/install-bulk-processor.yml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index f5cf472..4182776 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -165,6 +165,8 @@ 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 diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index d0a0005..3c06d87 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -407,9 +407,9 @@ # word_abbreviation_length: 5 # word_limit: 7 - - name: Write /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/ErfImporter/settings.yml + - name: Write /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/settings.yml copy: - dest: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/ErfImporter/settings.yml + dest: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/ETL/EcrfImporter/settings.yml content: | ctsms_base_uri: 'https://127.0.0.1' From 4b3d53de42b1aebcfc0297007dbc8678022547c4 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 27 May 2025 16:27:23 -0700 Subject: [PATCH 177/217] adding missing config files to bulk-processor installation --- playbooks/init-database.yml | 9 +- playbooks/install-bulk-processor.yml | 148 +++++++++++++++++++++++-- playbooks/render-workflow-diagrams.yml | 4 + playbooks/setup-logrotate.yml | 2 +- 4 files changed, 150 insertions(+), 13 deletions(-) diff --git a/playbooks/init-database.yml b/playbooks/init-database.yml index 4182776..35ae9f5 100644 --- a/playbooks/init-database.yml +++ b/playbooks/init-database.yml @@ -170,22 +170,21 @@ - /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: Installation complete - ansible.builtin.debug: - msg: "Installation complete" - - 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://${IP} with username 'phoenix' password {{ user_password }}." + 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 index 3c06d87..66c5682 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -153,13 +153,6 @@ extra_opts: - --strip-components=1 - # This is broken as of 5/25 - - # - name: Run minify.pl on Signup folder - # ansible.builtin.command: > - # perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl \ - # --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup - - name: Create /ctsms/bulk_processor/output directory ansible.builtin.file: path: /ctsms/bulk_processor/output @@ -526,3 +519,144 @@ 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: Run minify.pl on Signup folder + ansible.builtin.command: > + perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl \ + --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup diff --git a/playbooks/render-workflow-diagrams.yml b/playbooks/render-workflow-diagrams.yml index 7c7243b..81d53e4 100644 --- a/playbooks/render-workflow-diagrams.yml +++ b/playbooks/render-workflow-diagrams.yml @@ -39,3 +39,7 @@ ansible.builtin.service: name: tomcat state: started + + - name: Print 'Installation complete.' + ansible.builtin.debug: + msg: "Installation complete." diff --git a/playbooks/setup-logrotate.yml b/playbooks/setup-logrotate.yml index 7a02427..eb2f0df 100644 --- a/playbooks/setup-logrotate.yml +++ b/playbooks/setup-logrotate.yml @@ -7,5 +7,5 @@ src: ../templates/logrotate/ctsms.j2 dest: /etc/logrotate.d/ctsms owner: root - group: wheel + group: root mode: "0644" From 06d2550c6ed1fe05a90e12fe1d94a87fb415a5c9 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 27 May 2025 17:03:03 -0700 Subject: [PATCH 178/217] Update install-bulk-processor.yml --- playbooks/install-bulk-processor.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 66c5682..efd8398 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -656,7 +656,7 @@ emailloglevel = OFF #OFF - - name: Run minify.pl on Signup folder - ansible.builtin.command: > - perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl \ - --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup + # - name: Run minify.pl on Signup folder + # ansible.builtin.command: > + # perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl \ + # --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup From e801afa7869067cc855642eb7598424a7854f81a Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Tue, 27 May 2025 22:20:06 -0700 Subject: [PATCH 179/217] Update render-workflow-diagrams.yml --- playbooks/render-workflow-diagrams.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/render-workflow-diagrams.yml b/playbooks/render-workflow-diagrams.yml index 81d53e4..f9a7328 100644 --- a/playbooks/render-workflow-diagrams.yml +++ b/playbooks/render-workflow-diagrams.yml @@ -5,7 +5,7 @@ tasks: - name: Run render.sh ansible.builtin.command: - cmd: ./render.sh + cmd: render.sh chdir: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render - name: Rebuild .war From f45a45d64eae170075945474a9cd2d62b874ef44 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 28 May 2025 14:32:29 -0700 Subject: [PATCH 180/217] Update render-workflow-diagrams.yml --- playbooks/render-workflow-diagrams.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/playbooks/render-workflow-diagrams.yml b/playbooks/render-workflow-diagrams.yml index f9a7328..392e66c 100644 --- a/playbooks/render-workflow-diagrams.yml +++ b/playbooks/render-workflow-diagrams.yml @@ -5,9 +5,8 @@ tasks: - name: Run render.sh ansible.builtin.command: - cmd: render.sh - chdir: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render - + cmd: cd /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render && render.sh + - name: Rebuild .war ansible.builtin.command: cmd: mvn -f web/pom.xml -Dmaven.test.skip=true From c3b1ceec8f94aa838051cb6cdaecc00cc4752006 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 28 May 2025 15:17:12 -0700 Subject: [PATCH 181/217] Update install-bulk-processor.yml --- playbooks/install-bulk-processor.yml | 383 +++++++++++++++++++++++++++ 1 file changed, 383 insertions(+) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index efd8398..0628fb8 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -9,6 +9,147 @@ 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.yml + i18n_code: ar + - path: settings_bt.yml + i18n_code: bt + - path: settings_da.yml + i18n_code: da + - path: settings_de.yml + i18n_code: de + - path: settings_es.yml + i18n_code: es + - path: settings_ff.yml + i18n_code: ff + - path: settings_fi.yml + i18n_code: fi + - path: settings_fr.yml + i18n_code: fr + - path: settings_hi.yml + i18n_code: hi + - path: settings_hr.yml + i18n_code: hr + - path: settings_hu.yml + i18n_code: hu + - path: settings_ig.yml + i18n_code: ig + - path: settings_it.yml + i18n_code: it + - path: settings_ja.yml + i18n_code: ja + - path: settings_kg.yml + i18n_code: kg + - path: settings_ko.yml + i18n_code: ko + - path: settings_ln.yml + i18n_code: ln + - path: settings_ro.yml + i18n_code: ro + - path: settings_ru.yml + i18n_code: ru + - path: settings_sk.yml + i18n_code: sk + - path: settings_sl.yml + i18n_code: sl + - path: settings_sv.yml + i18n_code: sv + - path: settings_sw.yml + i18n_code: sw + - path: settings_tr.yml + i18n_code: tr + - path: settings_uk.yml + i18n_code: uk + - path: settings_yo.yml + i18n_code: yo + - path: settings_zh.yml + i18n_code: zh + tasks: - name: Install Perl libraries and utilities ansible.builtin.apt: @@ -656,6 +797,248 @@ 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.yml + copy: + dest: "/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render/{{ item.path }}" + 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: > # perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl \ From d3f9abe843e016a63669251008f1f6dd1938424c Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 28 May 2025 16:50:12 -0700 Subject: [PATCH 182/217] Update install-bulk-processor.yml --- playbooks/install-bulk-processor.yml | 59 ++++++++++++++-------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 0628fb8..94aac50 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -95,59 +95,59 @@ username: my_department_signup_zh password: my_department_signup_zh render_i18n_settings: - - path: settings_ar.yml + - path: settings_ar i18n_code: ar - - path: settings_bt.yml + - path: settings_bt i18n_code: bt - - path: settings_da.yml + - path: settings_da i18n_code: da - - path: settings_de.yml + - path: settings_de i18n_code: de - - path: settings_es.yml + - path: settings_es i18n_code: es - - path: settings_ff.yml + - path: settings_ff i18n_code: ff - - path: settings_fi.yml + - path: settings_fi i18n_code: fi - - path: settings_fr.yml + - path: settings_fr i18n_code: fr - - path: settings_hi.yml + - path: settings_hi i18n_code: hi - - path: settings_hr.yml + - path: settings_hr i18n_code: hr - - path: settings_hu.yml + - path: settings_hu i18n_code: hu - - path: settings_ig.yml + - path: settings_ig i18n_code: ig - - path: settings_it.yml + - path: settings_it i18n_code: it - - path: settings_ja.yml + - path: settings_ja i18n_code: ja - - path: settings_kg.yml + - path: settings_kg i18n_code: kg - - path: settings_ko.yml + - path: settings_ko i18n_code: ko - - path: settings_ln.yml + - path: settings_ln i18n_code: ln - - path: settings_ro.yml + - path: settings_ro i18n_code: ro - - path: settings_ru.yml + - path: settings_ru i18n_code: ru - - path: settings_sk.yml + - path: settings_sk i18n_code: sk - - path: settings_sl.yml + - path: settings_sl i18n_code: sl - - path: settings_sv.yml + - path: settings_sv i18n_code: sv - - path: settings_sw.yml + - path: settings_sw i18n_code: sw - - path: settings_tr.yml + - path: settings_tr i18n_code: tr - - path: settings_uk.yml + - path: settings_uk i18n_code: uk - - path: settings_yo.yml + - path: settings_yo i18n_code: yo - - path: settings_zh.yml + - path: settings_zh i18n_code: zh tasks: @@ -838,9 +838,9 @@ emailloglevel = OFF loop: "{{ render_i18n_configs }}" - - name: Write i18n Render settings.yml + - name: Write i18n Render settings.cfg copy: - dest: "/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render/{{ item.path }}" + dest: "/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render/{{ item.path }}.cfg" content: | #magick = magick magick = convert @@ -1041,5 +1041,4 @@ # - name: Run minify.pl on Signup folder # ansible.builtin.command: > - # perl /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/minify.pl \ # --folder=/ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/WebApps/Signup From 7f3b2d88748f04d7818a56f5d6db78a5db6083e0 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 28 May 2025 16:52:53 -0700 Subject: [PATCH 183/217] Update render-workflow-diagrams.yml --- playbooks/render-workflow-diagrams.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/playbooks/render-workflow-diagrams.yml b/playbooks/render-workflow-diagrams.yml index 392e66c..81d53e4 100644 --- a/playbooks/render-workflow-diagrams.yml +++ b/playbooks/render-workflow-diagrams.yml @@ -5,8 +5,9 @@ tasks: - name: Run render.sh ansible.builtin.command: - cmd: cd /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render && render.sh - + cmd: ./render.sh + chdir: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render + - name: Rebuild .war ansible.builtin.command: cmd: mvn -f web/pom.xml -Dmaven.test.skip=true From 5b0cf8597fdb482ba85c15271a79a286c7550f42 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 28 May 2025 21:06:07 -0700 Subject: [PATCH 184/217] test --- install.yml | 26 +++++++++++++------------- playbooks/render-workflow-diagrams.yml | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/install.yml b/install.yml index 674c8ba..727bfdb 100644 --- a/install.yml +++ b/install.yml @@ -1,14 +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/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/playbooks/render-workflow-diagrams.yml b/playbooks/render-workflow-diagrams.yml index 81d53e4..f9a7328 100644 --- a/playbooks/render-workflow-diagrams.yml +++ b/playbooks/render-workflow-diagrams.yml @@ -5,7 +5,7 @@ tasks: - name: Run render.sh ansible.builtin.command: - cmd: ./render.sh + cmd: render.sh chdir: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render - name: Rebuild .war From 6ed9b7b7b9b4ba85d5f5495d73e65a55f679a8b0 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 28 May 2025 21:09:08 -0700 Subject: [PATCH 185/217] Update render-workflow-diagrams.yml --- playbooks/render-workflow-diagrams.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/render-workflow-diagrams.yml b/playbooks/render-workflow-diagrams.yml index f9a7328..d202df8 100644 --- a/playbooks/render-workflow-diagrams.yml +++ b/playbooks/render-workflow-diagrams.yml @@ -4,8 +4,8 @@ become: true tasks: - name: Run render.sh - ansible.builtin.command: - cmd: render.sh + ansible.builtin.shell: render.sh + args: chdir: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render - name: Rebuild .war From 5cafbcdae62ba8a9199f558c683d5e4a3ba03416 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 28 May 2025 21:13:20 -0700 Subject: [PATCH 186/217] Update render-workflow-diagrams.yml --- playbooks/render-workflow-diagrams.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/render-workflow-diagrams.yml b/playbooks/render-workflow-diagrams.yml index d202df8..906765e 100644 --- a/playbooks/render-workflow-diagrams.yml +++ b/playbooks/render-workflow-diagrams.yml @@ -4,7 +4,7 @@ become: true tasks: - name: Run render.sh - ansible.builtin.shell: render.sh + ansible.builtin.shell: ./render.sh args: chdir: /ctsms/bulk_processor/CTSMS/BulkProcessor/Projects/Render From 6eeb87aca7888fbe784f332c158506d75768076d Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 28 May 2025 21:20:14 -0700 Subject: [PATCH 187/217] Update render-workflow-diagrams.yml --- playbooks/render-workflow-diagrams.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/playbooks/render-workflow-diagrams.yml b/playbooks/render-workflow-diagrams.yml index 906765e..fbceadd 100644 --- a/playbooks/render-workflow-diagrams.yml +++ b/playbooks/render-workflow-diagrams.yml @@ -2,6 +2,8 @@ gather_facts: true hosts: all become: true + vars: + version: 1.8.1 tasks: - name: Run render.sh ansible.builtin.shell: ./render.sh From 2ef2586d2972f3c06a536b9398787bfdfdb26d8d Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 28 May 2025 21:31:09 -0700 Subject: [PATCH 188/217] minor changes --- playbooks/setup-apache2.yml | 3 +-- templates/apache/00_ctsms_http.conf.j2 | 2 +- templates/apache/00_ctsms_https.conf.j2 | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index f9f1e20..918c03f 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -70,8 +70,7 @@ - name: Create certificate signing request (CSR) for self-signed certificate community.crypto.openssl_csr_pipe: privatekey_path: /etc/apache2/ssl/apache.key - common_name: localhost - organization_name: localhost + common_name: {{ ansible_hostname }} register: csr - name: Create self-signed certificate from CSR diff --git a/templates/apache/00_ctsms_http.conf.j2 b/templates/apache/00_ctsms_http.conf.j2 index 7f22c79..0bb9241 100644 --- a/templates/apache/00_ctsms_http.conf.j2 +++ b/templates/apache/00_ctsms_http.conf.j2 @@ -1,7 +1,7 @@ {% raw -%} - #ServerName localhost:80 + #ServerName {%- endraw %}{{ ansible_hostname }}{% raw -%}:80 RewriteEngine On RewriteCond %{HTTPS} off diff --git a/templates/apache/00_ctsms_https.conf.j2 b/templates/apache/00_ctsms_https.conf.j2 index fd1d242..9726190 100644 --- a/templates/apache/00_ctsms_https.conf.j2 +++ b/templates/apache/00_ctsms_https.conf.j2 @@ -3,7 +3,7 @@ # # - #ServerName localhost:443 + #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" From c7d19812f184e5f1a2c1b775f8ee7a0d8ada493d Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 28 May 2025 21:37:50 -0700 Subject: [PATCH 189/217] uncommenting full run --- install.yml | 26 +++++++++++++------------- playbooks/setup-apache2.yml | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/install.yml b/install.yml index 727bfdb..674c8ba 100644 --- a/install.yml +++ b/install.yml @@ -1,14 +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/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/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 918c03f..93767bb 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -70,7 +70,7 @@ - name: Create certificate signing request (CSR) for self-signed certificate community.crypto.openssl_csr_pipe: privatekey_path: /etc/apache2/ssl/apache.key - common_name: {{ ansible_hostname }} + common_name: "{{ ansible_hostname }}" register: csr - name: Create self-signed certificate from CSR From 4b43f527e16a501208b609f7842492c00e74d9bd Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 28 May 2025 22:59:58 -0700 Subject: [PATCH 190/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index f125839..745ac94 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -81,6 +81,9 @@ repo: 'https://github.com/phoenixctms/master-data.git' dest: /ctsms/master_data + - name: Move /ctsms/config/java to /ctsms/java + ansible.builtin.cmd: mv /ctsms/config/java /ctsms/java + - name: Recursively change ownership of /ctsms/ ansible.builtin.file: path: /ctsms/ From 526366c8ce86aa0ad7f5ec5c63cdd61235f5e791 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 28 May 2025 23:06:05 -0700 Subject: [PATCH 191/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 745ac94..bd9366d 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -82,7 +82,7 @@ dest: /ctsms/master_data - name: Move /ctsms/config/java to /ctsms/java - ansible.builtin.cmd: mv /ctsms/config/java /ctsms/java + ansible.builtin.shell: mv /ctsms/config/java /ctsms/java - name: Recursively change ownership of /ctsms/ ansible.builtin.file: From dd21e422eb12417f06c29e4dfe2b6dc054f4bf9e Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 28 May 2025 23:43:18 -0700 Subject: [PATCH 192/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index bd9366d..61d24ea 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -84,23 +84,20 @@ - 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.file: - path: /ctsms/ - state: directory - recurse: yes - owner: ctsms - group: ctsms - mode: '0755' + ansible.builtin.shell: chown ctsms:ctsms /ctsms -R - - 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: Recursively change ownership of /ctsms/ + ansible.builtin.shell: chmod 775 /ctsms + + - name: Recursively change ownership of /ctsms/ + ansible.builtin.shell: chmod 775 /ctsms/external_files -R - name: Template update to /ctsms/update ansible.builtin.template: From d07c8a371e909cf1580eb28f9d55eab0272244e4 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 28 May 2025 23:48:29 -0700 Subject: [PATCH 193/217] Update tomcat9.yml --- playbooks/tomcat9.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index 153105f..f93b2ca 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -199,13 +199,7 @@ notify: Start tomcat9 - name: Add group write permission to files in /var/log/tomcat9 - ansible.builtin.file: - path: "{{ item }}" - mode: 'g+w' - with_fileglob: - - /var/log/tomcat9/* - when: item is file - notify: Start tomcat9 + ansible.builtin.shell: chmod g+w /var/log/tomcat9/* - name: Set permissions on webapps directory ansible.builtin.file: From 70140ba312d2da7100dc1b3483d0f4b3db9d11b9 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 28 May 2025 23:51:03 -0700 Subject: [PATCH 194/217] Update install-bulk-processor.yml --- playbooks/install-bulk-processor.yml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/playbooks/install-bulk-processor.yml b/playbooks/install-bulk-processor.yml index 94aac50..6063f0f 100644 --- a/playbooks/install-bulk-processor.yml +++ b/playbooks/install-bulk-processor.yml @@ -304,26 +304,13 @@ group: ctsms - name: Ensure ownership of /ctsms/bulk_processor - ansible.builtin.file: - path: /ctsms/bulk_processor - state: directory - recurse: true - owner: ctsms - group: ctsms + ansible.builtin.shell: chown ctsms:ctsms /ctsms/bulk_processor -R - name: Set permissions 0755 on /ctsms/bulk_processor - ansible.builtin.file: - path: /ctsms/bulk_processor - state: directory - recurse: true - mode: '0755' + ansible.builtin.shell: chmod 755 /ctsms/bulk_processor -R - name: Set permissions 0777 on /ctsms/bulk_processor/output - ansible.builtin.file: - path: /ctsms/bulk_processor/output - state: directory - recurse: true - mode: '0777' + ansible.builtin.shell: chmod 777 /ctsms/bulk_processor/output -R - name: Remove archive file /ctsms/bulk-processor.tar.gz ansible.builtin.file: From 7e663f207b5b65d5369ce57799518973fa7903ec Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 28 May 2025 23:53:36 -0700 Subject: [PATCH 195/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 61d24ea..824b7ad 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -96,8 +96,14 @@ - name: Recursively change ownership of /ctsms/ ansible.builtin.shell: chmod 775 /ctsms - - name: Recursively change ownership of /ctsms/ - ansible.builtin.shell: chmod 775 /ctsms/external_files -R + - 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: From 77be094b861b6458a34b1b43836cf188a401640b Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Wed, 28 May 2025 23:58:24 -0700 Subject: [PATCH 196/217] Update tomcat9.yml --- playbooks/tomcat9.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/tomcat9.yml b/playbooks/tomcat9.yml index f93b2ca..4699c8e 100644 --- a/playbooks/tomcat9.yml +++ b/playbooks/tomcat9.yml @@ -199,7 +199,7 @@ notify: Start tomcat9 - name: Add group write permission to files in /var/log/tomcat9 - ansible.builtin.shell: chmod g+w /var/log/tomcat9/* + ansible.builtin.shell: chmod g+w /var/log/tomcat9/ - name: Set permissions on webapps directory ansible.builtin.file: From c2b484af25f69c19f798de9a181678663bd7779c Mon Sep 17 00:00:00 2001 From: Josh Armenta Date: Sat, 31 May 2025 00:33:06 -0700 Subject: [PATCH 197/217] Update render-workflow-diagrams.yml --- playbooks/render-workflow-diagrams.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/playbooks/render-workflow-diagrams.yml b/playbooks/render-workflow-diagrams.yml index fbceadd..76b5789 100644 --- a/playbooks/render-workflow-diagrams.yml +++ b/playbooks/render-workflow-diagrams.yml @@ -35,6 +35,8 @@ src: "/ctsms/build/ctsms/web/target/ctsms-{{ version }}.war" dest: /opt/tomcat9/webapps/ROOT.war mode: '0644' + owner: ctsms + group: ctsms remote_src: true - name: Start Tomcat service From ceb3888b62bef962ace2e6de5c0f4e8969944104 Mon Sep 17 00:00:00 2001 From: Josh Armenta Date: Sat, 31 May 2025 00:37:45 -0700 Subject: [PATCH 198/217] Update render-workflow-diagrams.yml --- playbooks/render-workflow-diagrams.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/render-workflow-diagrams.yml b/playbooks/render-workflow-diagrams.yml index 76b5789..6145e52 100644 --- a/playbooks/render-workflow-diagrams.yml +++ b/playbooks/render-workflow-diagrams.yml @@ -34,7 +34,7 @@ ansible.builtin.copy: src: "/ctsms/build/ctsms/web/target/ctsms-{{ version }}.war" dest: /opt/tomcat9/webapps/ROOT.war - mode: '0644' + mode: '2755' owner: ctsms group: ctsms remote_src: true From 20e2db73e61d6f81cb13b2f402c0cba4d947d32c Mon Sep 17 00:00:00 2001 From: Josh Armenta Date: Sat, 31 May 2025 00:38:38 -0700 Subject: [PATCH 199/217] Update deploy-war.yml --- playbooks/deploy-war.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/playbooks/deploy-war.yml b/playbooks/deploy-war.yml index a44d562..684195d 100644 --- a/playbooks/deploy-war.yml +++ b/playbooks/deploy-war.yml @@ -18,4 +18,6 @@ ansible.builtin.copy: src: /ctsms/build/ctsms/web/target/ctsms-{{ version }}.war dest: /opt/tomcat9/webapps/ROOT.war + owner: ctsms + group: ctsms mode: '0755' From 6564bc5fe2a6a89ca81f2e11c1469bea4baf1e7d Mon Sep 17 00:00:00 2001 From: Josh Armenta Date: Sat, 31 May 2025 00:40:44 -0700 Subject: [PATCH 200/217] Update deploy-war.yml --- playbooks/deploy-war.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/playbooks/deploy-war.yml b/playbooks/deploy-war.yml index 684195d..3adfeaf 100644 --- a/playbooks/deploy-war.yml +++ b/playbooks/deploy-war.yml @@ -7,7 +7,9 @@ - name: Change file ownership, group and permissions ansible.builtin.file: path: /ctsms/build/ctsms/web/target/ctsms-{{ version }}.war - mode: '0755' + mode: '2755' + owner: ctsms + group: ctsms - name: Remove /opt/tomcat9/webapps/ROOT/ ansible.builtin.file: @@ -20,4 +22,4 @@ dest: /opt/tomcat9/webapps/ROOT.war owner: ctsms group: ctsms - mode: '0755' + mode: '2755' From 4e379cbec927e758f0203d50d69fa136f76dd00e Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 31 May 2025 02:01:46 -0700 Subject: [PATCH 201/217] update prepare-ctsms-directory --- playbooks/prepare-ctsms-directory.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index 824b7ad..f9e3db7 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -9,6 +9,7 @@ xss: "512k" perm: "256m" config_directory: "/ctsms/config/" + properties_directory: "/ctsms/properties" tasks: - name: Create /ctsms ansible.builtin.file: @@ -28,40 +29,47 @@ 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: Template ctsms-applicationcontext.properties to "{{ config_directory }}"/ctsms-applicationcontext.properties + - name: Ensure properties directory exists + 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: "{{ config_directory }}/ctsms-applicationcontext.properties" + dest: "{{ properties_directory }}/ctsms-applicationcontext.properties" - - name: Template ctsms-cv-pdf-settings.properties to "{{ config_directory }}"/ctsms-cv-pdf-settings.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: "{{ config_directory }}/ctsms-cv-pdf-settings.properties" + dest: "{{ properties_directory }}/ctsms-cv-pdf-settings.properties" - - name: Template ctsms-dbtool.properties to "{{ config_directory }}"/ctsms-dbtool.properties + - name: Template ctsms-dbtool.properties to "'{{ properties_directory }}'/ctsms-dbtool.properties ansible.builtin.template: src: ../templates/properties/ctsms-dbtool.properties.j2 - dest: "{{ config_directory }}/ctsms-dbtool.properties" + 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: "{{ config_directory }}/ctsms-departments.properties" + 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: "{{ config_directory }}/ctsms-departments_de.properties" + 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: "{{ config_directory }}/ctsms-visitschedule-excel-settings.properties" + dest: "{{ properties_directory }}/ctsms-visitschedule-excel-settings.properties" - name: Write dbtool.sh ansible.builtin.copy: From 789df7fa348ef09476efd4e7891b5f544ac7271d Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 31 May 2025 02:16:59 -0700 Subject: [PATCH 202/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index f9e3db7..c85b177 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -35,11 +35,11 @@ repo: 'https://github.com/phoenixctms/config-default.git' dest: "{{ config_directory }}" - - name: Ensure properties directory exists + - name: Ensure properties directory exists with sticky bit ansible.builtin.file: - path: {{ properties_directory }} + path: "{{ properties_directory }}" state: directory - mode: '0755' + mode: '2755' - name: Template ctsms-applicationcontext.properties to "'{{ properties_directory }}'/ctsms-applicationcontext.properties ansible.builtin.template: @@ -71,6 +71,18 @@ src: ../templates/properties/ctsms-visitschedule-excel-settings.properties.j2 dest: "{{ properties_directory }}/ctsms-visitschedule-excel-settings.properties" + - name: Remove sticky bit + ansible.builtin.file: + path: {{ properties_directory }} + state: directory + mode: '0755' + + - 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 From 0b456bc95968630137450c1b521ff37f254cd66d Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 31 May 2025 02:18:20 -0700 Subject: [PATCH 203/217] Update prepare-ctsms-directory.yml --- playbooks/prepare-ctsms-directory.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/playbooks/prepare-ctsms-directory.yml b/playbooks/prepare-ctsms-directory.yml index c85b177..cc3336f 100644 --- a/playbooks/prepare-ctsms-directory.yml +++ b/playbooks/prepare-ctsms-directory.yml @@ -39,7 +39,7 @@ ansible.builtin.file: path: "{{ properties_directory }}" state: directory - mode: '2755' + mode: '0755' - name: Template ctsms-applicationcontext.properties to "'{{ properties_directory }}'/ctsms-applicationcontext.properties ansible.builtin.template: @@ -71,12 +71,6 @@ src: ../templates/properties/ctsms-visitschedule-excel-settings.properties.j2 dest: "{{ properties_directory }}/ctsms-visitschedule-excel-settings.properties" - - name: Remove sticky bit - ansible.builtin.file: - path: {{ properties_directory }} - state: directory - mode: '0755' - - name: Wrote /ctsms/crowdin.yml ansible.builtin.template: src: ../templates/ctsms/crowdin.yml.j2 From 4c947e2d0388fef7b84643506539fece07385ec9 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Sat, 31 May 2025 02:19:25 -0700 Subject: [PATCH 204/217] Create crowdin.yml.j2 --- templates/ctsms/crowdin.yml.j2 | 327 +++++++++++++++++++++++++++++++++ 1 file changed, 327 insertions(+) create mode 100644 templates/ctsms/crowdin.yml.j2 diff --git a/templates/ctsms/crowdin.yml.j2 b/templates/ctsms/crowdin.yml.j2 new file mode 100644 index 0000000..9969d07 --- /dev/null +++ b/templates/ctsms/crowdin.yml.j2 @@ -0,0 +1,327 @@ +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 From c137e90fa1d8851a3975314cc475e13634a82dc9 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 5 Jun 2025 11:38:05 -0700 Subject: [PATCH 205/217] testing --- playbooks/setup-apache2.yml | 4 ++-- templates/apache/00_ctsms_https.conf.j2 | 2 +- templates/ctsms/pom.xml.j2 | 0 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 templates/ctsms/pom.xml.j2 diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 93767bb..5377cc8 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -59,7 +59,7 @@ ansible.builtin.file: path: /etc/apache2/ssl state: directory - mode: '0600' + mode: '0755' owner: root group: root @@ -75,7 +75,7 @@ - name: Create self-signed certificate from CSR community.crypto.x509_certificate: - path: /etc/apache2/ssl/certificate.pem + path: /etc/apache2/ssl/apache.crt csr_content: "{{ csr.csr }}" privatekey_path: /etc/apache2/ssl/apache.key provider: selfsigned diff --git a/templates/apache/00_ctsms_https.conf.j2 b/templates/apache/00_ctsms_https.conf.j2 index 9726190..1e71d81 100644 --- a/templates/apache/00_ctsms_https.conf.j2 +++ b/templates/apache/00_ctsms_https.conf.j2 @@ -74,7 +74,7 @@ #SSLProtocol -ALL +SSLv3 +TLSv1 #SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:!LOW:!SSLv2:!EXPORT - SSLCertificateFile /etc/apache2/ssl/certificate.pem + SSLCertificateFile /etc/apache2/ssl/apache.crt SSLCertificateKeyFile /etc/apache2/ssl/apache.key diff --git a/templates/ctsms/pom.xml.j2 b/templates/ctsms/pom.xml.j2 new file mode 100644 index 0000000..e69de29 From 0064c2bc4311b62b6e73a01b5e4d3a0f7eb8756a Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 5 Jun 2025 12:28:04 -0700 Subject: [PATCH 206/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 5377cc8..aea916b 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -77,8 +77,13 @@ community.crypto.x509_certificate: path: /etc/apache2/ssl/apache.crt csr_content: "{{ csr.csr }}" - privatekey_path: /etc/apache2/ssl/apache.key + privatekey_path: /etc/apache2/ssl/apache.key" provider: selfsigned + attributes: + basic_constraints: "CA:FALSE" + subject_alt_name: + - "DNS:{{ ansible_hostname }}" + - "DNS:localhost" - name: Enable 00_ctsms_https.conf site ansible.builtin.command: a2ensite 00_ctsms_https.conf From 9c447e05e029de039a6565f61dc8f3ca8852ac76 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 5 Jun 2025 13:03:19 -0700 Subject: [PATCH 207/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index aea916b..46388f9 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -71,6 +71,10 @@ community.crypto.openssl_csr_pipe: privatekey_path: /etc/apache2/ssl/apache.key common_name: "{{ ansible_hostname }}" + organization_name: Organization, Inc. + subject_alt_name: + - "{{ ansible_hostname }}" + - "DNS:localhost" register: csr - name: Create self-signed certificate from CSR @@ -81,9 +85,6 @@ provider: selfsigned attributes: basic_constraints: "CA:FALSE" - subject_alt_name: - - "DNS:{{ ansible_hostname }}" - - "DNS:localhost" - name: Enable 00_ctsms_https.conf site ansible.builtin.command: a2ensite 00_ctsms_https.conf From 7ee439df1c7983803791341e1365b04ac0f05416 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 5 Jun 2025 13:53:04 -0700 Subject: [PATCH 208/217] testing a fix --- install.yml | 18 +++++++++--------- playbooks/setup-apache2.yml | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/install.yml b/install.yml index 674c8ba..910b095 100644 --- a/install.yml +++ b/install.yml @@ -1,12 +1,12 @@ -- 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/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 diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 46388f9..79a600f 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -73,7 +73,7 @@ common_name: "{{ ansible_hostname }}" organization_name: Organization, Inc. subject_alt_name: - - "{{ ansible_hostname }}" + - "DNS:{{ ansible_hostname }}" - "DNS:localhost" register: csr From a8be5e0a5b291860b92a45bc3fea5570d9990e62 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 5 Jun 2025 13:56:17 -0700 Subject: [PATCH 209/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 79a600f..a129322 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -81,7 +81,7 @@ community.crypto.x509_certificate: path: /etc/apache2/ssl/apache.crt csr_content: "{{ csr.csr }}" - privatekey_path: /etc/apache2/ssl/apache.key" + privatekey_path: /etc/apache2/ssl/apache.key provider: selfsigned attributes: basic_constraints: "CA:FALSE" From 1b4d1d6d995772a31eaa2e5289dbbd555820b68e Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 5 Jun 2025 14:02:38 -0700 Subject: [PATCH 210/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index a129322..c7e0195 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -59,7 +59,6 @@ ansible.builtin.file: path: /etc/apache2/ssl state: directory - mode: '0755' owner: root group: root From d215b822f79d2fb9dd7930e69c8e38ff320e122a Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 5 Jun 2025 14:06:19 -0700 Subject: [PATCH 211/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index c7e0195..93fb9c9 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -82,8 +82,8 @@ csr_content: "{{ csr.csr }}" privatekey_path: /etc/apache2/ssl/apache.key provider: selfsigned - attributes: - basic_constraints: "CA:FALSE" + basic_constraints: + ca: false - name: Enable 00_ctsms_https.conf site ansible.builtin.command: a2ensite 00_ctsms_https.conf From f65b67e9ebe797cedc69e78d0c2c0f043fe8ae62 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 5 Jun 2025 14:07:58 -0700 Subject: [PATCH 212/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 93fb9c9..f0607d2 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -82,8 +82,6 @@ csr_content: "{{ csr.csr }}" privatekey_path: /etc/apache2/ssl/apache.key provider: selfsigned - basic_constraints: - ca: false - name: Enable 00_ctsms_https.conf site ansible.builtin.command: a2ensite 00_ctsms_https.conf From 4e15a787f311e7d0cd828c5a49bb281b3f95e6e7 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 5 Jun 2025 14:15:06 -0700 Subject: [PATCH 213/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index f0607d2..4a19d90 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -62,27 +62,38 @@ owner: root group: root - - name: Create private key (RSA, 4096 bits) + - name: Generate private key community.crypto.openssl_privatekey: path: /etc/apache2/ssl/apache.key - - name: Create certificate signing request (CSR) for self-signed certificate - community.crypto.openssl_csr_pipe: + - 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 - common_name: "{{ ansible_hostname }}" - organization_name: Organization, Inc. + subject: + common_name: "{{ system_fqdn }}" subject_alt_name: - - "DNS:{{ ansible_hostname }}" - - "DNS:localhost" - register: csr + - "{{ system_fqdn }}" - - name: Create self-signed certificate from CSR + - name: Create self-signed certificate with SAN community.crypto.x509_certificate: path: /etc/apache2/ssl/apache.crt - csr_content: "{{ csr.csr }}" + 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 From 07822e7de765ab83f1a2ac90b1a4c24c03fa55b8 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 5 Jun 2025 14:17:26 -0700 Subject: [PATCH 214/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 4a19d90..1b68c8a 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -84,7 +84,7 @@ subject: common_name: "{{ system_fqdn }}" subject_alt_name: - - "{{ system_fqdn }}" + - "DNS:{{ system_fqdn }}" - name: Create self-signed certificate with SAN community.crypto.x509_certificate: From 883a217c19533461afa3c8002758673480c460b9 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 5 Jun 2025 14:23:27 -0700 Subject: [PATCH 215/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 1b68c8a..54c3e9d 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -81,10 +81,11 @@ community.crypto.openssl_csr: path: /etc/apache2/ssl/apache.csr privatekey_path: /etc/apache2/ssl/apache.key - subject: - common_name: "{{ system_fqdn }}" - subject_alt_name: - - "DNS:{{ system_fqdn }}" + 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: @@ -93,7 +94,6 @@ 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 From bd779409bada03c81e99bd76cc6bd1829f4ed369 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 5 Jun 2025 14:24:00 -0700 Subject: [PATCH 216/217] Update setup-apache2.yml --- playbooks/setup-apache2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/setup-apache2.yml b/playbooks/setup-apache2.yml index 54c3e9d..e844577 100644 --- a/playbooks/setup-apache2.yml +++ b/playbooks/setup-apache2.yml @@ -84,7 +84,7 @@ country_name: US organization_name: Organization Name email_address: email@example.org - common_name: {{ system_fqdn }} + common_name: '{{ system_fqdn }}' subject_alt_name: 'DNS:{{ system_fqdn }}' - name: Create self-signed certificate with SAN From f966104fa836a73cdd8ce9bcf6248d9f35e3a1c6 Mon Sep 17 00:00:00 2001 From: Joshua Armenta Date: Thu, 5 Jun 2025 14:39:56 -0700 Subject: [PATCH 217/217] minor updates --- install.yml | 18 +++++++++--------- templates/ctsms/crowdin.yml.j2 | 3 +++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/install.yml b/install.yml index 910b095..674c8ba 100644 --- a/install.yml +++ b/install.yml @@ -1,12 +1,12 @@ -# - 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/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 diff --git a/templates/ctsms/crowdin.yml.j2 b/templates/ctsms/crowdin.yml.j2 index 9969d07..83adedc 100644 --- a/templates/ctsms/crowdin.yml.j2 +++ b/templates/ctsms/crowdin.yml.j2 @@ -1,3 +1,5 @@ +{% raw -%} + files: - source: /core/src/main/resources/*.properties ignore: @@ -325,3 +327,4 @@ files: - /core/src/main/resources/*-hi.vsl - /core/src/main/resources/*-zh.vsl translation: /core/src/main/resources/%file_name%-%two_letters_code%.vsl +{%- endraw %}