From 9ff56d8b21e899e26ac4ba016831c0fc94aadfef Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 10:26:15 +0100 Subject: [PATCH 001/142] Move to v3, add custom install --- .github/workflows/molecule.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index ed5a7b62..a587dc11 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -12,7 +12,7 @@ jobs: outputs: matrix: ${{ steps.listscenarios.outputs.scenarios }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - id: listscenarios uses: ome/action-ansible-molecule-list-scenarios@main @@ -27,7 +27,12 @@ jobs: matrix: scenario: ${{fromJson(needs.list-scenarios.outputs.matrix)}} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: ome/action-ome-ansible-molecule@main with: - scenario: ${{ matrix.scenario }} + python-version: '3.9' + - name: Install Ansible & Molecule + run: pip install "ansible<8" ansible-lint flake8 \ + "molecule<5" molecule-plugins[docker] pytest-testinfra + - name: Run molecule + run: molecule test -s "${{ matrix.scenario }}" From bec3b02c82cbd7536a040d2ddaf15f583a330267 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 10:31:15 +0100 Subject: [PATCH 002/142] Use ubuntu-latest --- .github/workflows/molecule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index a587dc11..bbaa5f74 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -20,7 +20,7 @@ jobs: name: Test needs: - list-scenarios - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest strategy: # Keep running so we can see if other tests pass fail-fast: false From 9d08272b951c1e122e650b903ede200404f23bdf Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 10:39:09 +0100 Subject: [PATCH 003/142] Do not use the action-ome-ansible-molecule --- .github/workflows/molecule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index bbaa5f74..cd08e7ca 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -28,7 +28,7 @@ jobs: scenario: ${{fromJson(needs.list-scenarios.outputs.matrix)}} steps: - uses: actions/checkout@v3 - - uses: ome/action-ome-ansible-molecule@main + - uses: actions/setup-python@v4 with: python-version: '3.9' - name: Install Ansible & Molecule From a2084b175155f7a09b6afa9d6b475e61723ec28c Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 10:53:03 +0100 Subject: [PATCH 004/142] Fix yamllint and other lints --- molecule/bootstrap/molecule.yml | 6 ++++-- molecule/docker-prod/molecule.yml | 6 ++++-- molecule/nightshade-webclients/molecule.yml | 4 +++- molecule/ome-demoserver/molecule.yml | 4 +++- molecule/ome-dundeeomero/molecule.yml | 4 +++- molecule/ome-pg-prod/molecule_disabled.yml | 4 +++- molecule/omero-training-server/molecule.yml | 4 +++- molecule/release/molecule.yml | 4 +++- molecule/web-proxy/molecule.yml | 4 +++- molecule/www/molecule.yml | 4 +++- 10 files changed, 32 insertions(+), 12 deletions(-) diff --git a/molecule/bootstrap/molecule.yml b/molecule/bootstrap/molecule.yml index 918cb0c5..056f6f54 100644 --- a/molecule/bootstrap/molecule.yml +++ b/molecule/bootstrap/molecule.yml @@ -5,8 +5,10 @@ dependency: role-file: requirements.yml driver: name: docker -lint: - name: yamllint +lint: | + yamllint . + ansible-lint + flake8 # TODO: enable enabled: False platforms: diff --git a/molecule/docker-prod/molecule.yml b/molecule/docker-prod/molecule.yml index 4434834c..6d4cbcbd 100644 --- a/molecule/docker-prod/molecule.yml +++ b/molecule/docker-prod/molecule.yml @@ -5,8 +5,10 @@ dependency: role-file: requirements.yml driver: name: docker -lint: - name: yamllint +lint: | + yamllint . + ansible-lint + flake8 # TODO: enable enabled: False platforms: diff --git a/molecule/nightshade-webclients/molecule.yml b/molecule/nightshade-webclients/molecule.yml index 87112b6a..b7eae1e4 100644 --- a/molecule/nightshade-webclients/molecule.yml +++ b/molecule/nightshade-webclients/molecule.yml @@ -6,7 +6,9 @@ dependency: driver: name: docker lint: - name: yamllint + yamllint . + ansible-lint + flake8 # TODO: enable enabled: False platforms: diff --git a/molecule/ome-demoserver/molecule.yml b/molecule/ome-demoserver/molecule.yml index 3c926349..1442d8e0 100644 --- a/molecule/ome-demoserver/molecule.yml +++ b/molecule/ome-demoserver/molecule.yml @@ -6,7 +6,9 @@ dependency: driver: name: docker lint: - name: yamllint + yamllint . + ansible-lint + flake8 # TODO: enable enabled: False platforms: diff --git a/molecule/ome-dundeeomero/molecule.yml b/molecule/ome-dundeeomero/molecule.yml index 1f4289f1..fb30a981 100644 --- a/molecule/ome-dundeeomero/molecule.yml +++ b/molecule/ome-dundeeomero/molecule.yml @@ -6,7 +6,9 @@ dependency: driver: name: docker lint: - name: yamllint + yamllint . + ansible-lint + flake8 # TODO: enable enabled: False platforms: diff --git a/molecule/ome-pg-prod/molecule_disabled.yml b/molecule/ome-pg-prod/molecule_disabled.yml index 3788bbb9..9fb499a0 100644 --- a/molecule/ome-pg-prod/molecule_disabled.yml +++ b/molecule/ome-pg-prod/molecule_disabled.yml @@ -6,7 +6,9 @@ dependency: driver: name: docker lint: - name: yamllint + yamllint . + ansible-lint + flake8 # TODO: enable enabled: False platforms: diff --git a/molecule/omero-training-server/molecule.yml b/molecule/omero-training-server/molecule.yml index be7d2fee..e04ebc1c 100644 --- a/molecule/omero-training-server/molecule.yml +++ b/molecule/omero-training-server/molecule.yml @@ -6,7 +6,9 @@ dependency: driver: name: docker lint: - name: yamllint + yamllint . + ansible-lint + flake8 # TODO: enable enabled: False platforms: diff --git a/molecule/release/molecule.yml b/molecule/release/molecule.yml index 2fd3f560..f49ecdcd 100644 --- a/molecule/release/molecule.yml +++ b/molecule/release/molecule.yml @@ -4,7 +4,9 @@ dependency: driver: name: docker lint: - name: yamllint + yamllint . + ansible-lint + flake8 # TODO: enable enabled: False platforms: diff --git a/molecule/web-proxy/molecule.yml b/molecule/web-proxy/molecule.yml index 07b70dea..d236582f 100644 --- a/molecule/web-proxy/molecule.yml +++ b/molecule/web-proxy/molecule.yml @@ -6,7 +6,9 @@ dependency: driver: name: docker lint: - name: yamllint + yamllint . + ansible-lint + flake8 # TODO: enable enabled: False platforms: diff --git a/molecule/www/molecule.yml b/molecule/www/molecule.yml index 1d310045..ca56a54c 100644 --- a/molecule/www/molecule.yml +++ b/molecule/www/molecule.yml @@ -6,7 +6,9 @@ dependency: driver: name: docker lint: - name: yamllint + yamllint . + ansible-lint + flake8 # TODO: enable enabled: False platforms: From da59a500dd37128935476a4d9cb2af2a380f0d64 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 10:56:37 +0100 Subject: [PATCH 005/142] Add pipes next to lint: motive --- molecule/docker-prod/molecule.yml | 2 +- molecule/nightshade-webclients/molecule.yml | 2 +- molecule/ome-demoserver/molecule.yml | 2 +- molecule/ome-dundeeomero/molecule.yml | 2 +- molecule/ome-pg-prod/molecule_disabled.yml | 2 +- molecule/omero-training-server/molecule.yml | 2 +- molecule/release/molecule.yml | 2 +- molecule/web-proxy/molecule.yml | 2 +- molecule/www/molecule.yml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/molecule/docker-prod/molecule.yml b/molecule/docker-prod/molecule.yml index 6d4cbcbd..10a0fab5 100644 --- a/molecule/docker-prod/molecule.yml +++ b/molecule/docker-prod/molecule.yml @@ -5,7 +5,7 @@ dependency: role-file: requirements.yml driver: name: docker -lint: | +lint: | yamllint . ansible-lint flake8 diff --git a/molecule/nightshade-webclients/molecule.yml b/molecule/nightshade-webclients/molecule.yml index b7eae1e4..9d4e0e46 100644 --- a/molecule/nightshade-webclients/molecule.yml +++ b/molecule/nightshade-webclients/molecule.yml @@ -5,7 +5,7 @@ dependency: role-file: requirements.yml driver: name: docker -lint: +lint: | yamllint . ansible-lint flake8 diff --git a/molecule/ome-demoserver/molecule.yml b/molecule/ome-demoserver/molecule.yml index 1442d8e0..5c63f0dd 100644 --- a/molecule/ome-demoserver/molecule.yml +++ b/molecule/ome-demoserver/molecule.yml @@ -5,7 +5,7 @@ dependency: role-file: requirements.yml driver: name: docker -lint: +lint: | yamllint . ansible-lint flake8 diff --git a/molecule/ome-dundeeomero/molecule.yml b/molecule/ome-dundeeomero/molecule.yml index fb30a981..9370cb5c 100644 --- a/molecule/ome-dundeeomero/molecule.yml +++ b/molecule/ome-dundeeomero/molecule.yml @@ -5,7 +5,7 @@ dependency: role-file: requirements.yml driver: name: docker -lint: +lint: | yamllint . ansible-lint flake8 diff --git a/molecule/ome-pg-prod/molecule_disabled.yml b/molecule/ome-pg-prod/molecule_disabled.yml index 9fb499a0..4c790314 100644 --- a/molecule/ome-pg-prod/molecule_disabled.yml +++ b/molecule/ome-pg-prod/molecule_disabled.yml @@ -5,7 +5,7 @@ dependency: role-file: requirements.yml driver: name: docker -lint: +lint: | yamllint . ansible-lint flake8 diff --git a/molecule/omero-training-server/molecule.yml b/molecule/omero-training-server/molecule.yml index e04ebc1c..2d9a01b3 100644 --- a/molecule/omero-training-server/molecule.yml +++ b/molecule/omero-training-server/molecule.yml @@ -5,7 +5,7 @@ dependency: role-file: requirements.yml driver: name: docker -lint: +lint: | yamllint . ansible-lint flake8 diff --git a/molecule/release/molecule.yml b/molecule/release/molecule.yml index f49ecdcd..cf0b97b0 100644 --- a/molecule/release/molecule.yml +++ b/molecule/release/molecule.yml @@ -3,7 +3,7 @@ dependency: name: galaxy driver: name: docker -lint: +lint: | yamllint . ansible-lint flake8 diff --git a/molecule/web-proxy/molecule.yml b/molecule/web-proxy/molecule.yml index d236582f..5732ab60 100644 --- a/molecule/web-proxy/molecule.yml +++ b/molecule/web-proxy/molecule.yml @@ -5,7 +5,7 @@ dependency: role-file: requirements.yml driver: name: docker -lint: +lint: | yamllint . ansible-lint flake8 diff --git a/molecule/www/molecule.yml b/molecule/www/molecule.yml index ca56a54c..01479bff 100644 --- a/molecule/www/molecule.yml +++ b/molecule/www/molecule.yml @@ -5,7 +5,7 @@ dependency: role-file: requirements.yml driver: name: docker -lint: +lint: | yamllint . ansible-lint flake8 From e5ee86f899bfa2edc901d508063ff6aad92d7a08 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 11:02:14 +0100 Subject: [PATCH 006/142] Remove enabled:false --- molecule/bootstrap/molecule.yml | 2 -- molecule/docker-prod/molecule.yml | 2 -- molecule/nightshade-webclients/molecule.yml | 2 -- molecule/ome-demoserver/molecule.yml | 2 -- molecule/ome-dundeeomero/molecule.yml | 2 -- molecule/ome-pg-prod/molecule_disabled.yml | 2 -- molecule/omero-training-server/molecule.yml | 2 -- molecule/release/molecule.yml | 2 -- molecule/web-proxy/molecule.yml | 2 -- molecule/www/molecule.yml | 2 -- 10 files changed, 20 deletions(-) diff --git a/molecule/bootstrap/molecule.yml b/molecule/bootstrap/molecule.yml index 056f6f54..e79a086c 100644 --- a/molecule/bootstrap/molecule.yml +++ b/molecule/bootstrap/molecule.yml @@ -9,8 +9,6 @@ lint: | yamllint . ansible-lint flake8 - # TODO: enable - enabled: False platforms: - name: omedev image: centos:7 diff --git a/molecule/docker-prod/molecule.yml b/molecule/docker-prod/molecule.yml index 10a0fab5..d6accc5d 100644 --- a/molecule/docker-prod/molecule.yml +++ b/molecule/docker-prod/molecule.yml @@ -9,8 +9,6 @@ lint: | yamllint . ansible-lint flake8 - # TODO: enable - enabled: False platforms: - name: ome-dockr-prod1.openmicroscopy.org image: centos/systemd:latest diff --git a/molecule/nightshade-webclients/molecule.yml b/molecule/nightshade-webclients/molecule.yml index 9d4e0e46..c0c1cc34 100644 --- a/molecule/nightshade-webclients/molecule.yml +++ b/molecule/nightshade-webclients/molecule.yml @@ -9,8 +9,6 @@ lint: | yamllint . ansible-lint flake8 - # TODO: enable - enabled: False platforms: - name: ns-webclients image: centos/systemd diff --git a/molecule/ome-demoserver/molecule.yml b/molecule/ome-demoserver/molecule.yml index 5c63f0dd..0837b653 100644 --- a/molecule/ome-demoserver/molecule.yml +++ b/molecule/ome-demoserver/molecule.yml @@ -9,8 +9,6 @@ lint: | yamllint . ansible-lint flake8 - # TODO: enable - enabled: False platforms: - name: ome-demoserver image: centos:7 diff --git a/molecule/ome-dundeeomero/molecule.yml b/molecule/ome-dundeeomero/molecule.yml index 9370cb5c..3f92e930 100644 --- a/molecule/ome-dundeeomero/molecule.yml +++ b/molecule/ome-dundeeomero/molecule.yml @@ -9,8 +9,6 @@ lint: | yamllint . ansible-lint flake8 - # TODO: enable - enabled: False platforms: - name: ome-dundeeomero.openmicroscopy.org image: centos/systemd diff --git a/molecule/ome-pg-prod/molecule_disabled.yml b/molecule/ome-pg-prod/molecule_disabled.yml index 4c790314..638ee7a0 100644 --- a/molecule/ome-pg-prod/molecule_disabled.yml +++ b/molecule/ome-pg-prod/molecule_disabled.yml @@ -9,8 +9,6 @@ lint: | yamllint . ansible-lint flake8 - # TODO: enable - enabled: False platforms: - name: ome-pg-prod1.openmicroscopy.org image: centos/systemd diff --git a/molecule/omero-training-server/molecule.yml b/molecule/omero-training-server/molecule.yml index 2d9a01b3..d66ea0d9 100644 --- a/molecule/omero-training-server/molecule.yml +++ b/molecule/omero-training-server/molecule.yml @@ -9,8 +9,6 @@ lint: | yamllint . ansible-lint flake8 - # TODO: enable - enabled: False platforms: - name: ome-outreach image: centos/systemd diff --git a/molecule/release/molecule.yml b/molecule/release/molecule.yml index cf0b97b0..dc446410 100644 --- a/molecule/release/molecule.yml +++ b/molecule/release/molecule.yml @@ -7,8 +7,6 @@ lint: | yamllint . ansible-lint flake8 - # TODO: enable - enabled: False platforms: - name: release image: centos:7 diff --git a/molecule/web-proxy/molecule.yml b/molecule/web-proxy/molecule.yml index 5732ab60..49b7c556 100644 --- a/molecule/web-proxy/molecule.yml +++ b/molecule/web-proxy/molecule.yml @@ -9,8 +9,6 @@ lint: | yamllint . ansible-lint flake8 - # TODO: enable - enabled: False platforms: - name: web-proxy image: centos:7 diff --git a/molecule/www/molecule.yml b/molecule/www/molecule.yml index 01479bff..4a585be0 100644 --- a/molecule/www/molecule.yml +++ b/molecule/www/molecule.yml @@ -9,8 +9,6 @@ lint: | yamllint . ansible-lint flake8 - # TODO: enable - enabled: False platforms: - name: www image: centos/systemd From 5032d9dda21d005381defb6a88bcf2dffa8aa73e Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 11:11:10 +0100 Subject: [PATCH 007/142] Try ubuntu 20.04 --- .github/workflows/molecule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index cd08e7ca..c92925d7 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -20,7 +20,7 @@ jobs: name: Test needs: - list-scenarios - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: # Keep running so we can see if other tests pass fail-fast: false From 41819df38a457edd8ada3f8f110ee936b37afe02 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 11:17:50 +0100 Subject: [PATCH 008/142] Try to remove the pipe --- molecule/bootstrap/molecule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/molecule/bootstrap/molecule.yml b/molecule/bootstrap/molecule.yml index e79a086c..1e21626a 100644 --- a/molecule/bootstrap/molecule.yml +++ b/molecule/bootstrap/molecule.yml @@ -5,7 +5,7 @@ dependency: role-file: requirements.yml driver: name: docker -lint: | +lint: yamllint . ansible-lint flake8 From b23a4fdcdbe212dbbfba03a66465c61af2a2b192 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 11:21:37 +0100 Subject: [PATCH 009/142] Revert "Try to remove the pipe" This reverts commit 41819df38a457edd8ada3f8f110ee936b37afe02. --- molecule/bootstrap/molecule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/molecule/bootstrap/molecule.yml b/molecule/bootstrap/molecule.yml index 1e21626a..e79a086c 100644 --- a/molecule/bootstrap/molecule.yml +++ b/molecule/bootstrap/molecule.yml @@ -5,7 +5,7 @@ dependency: role-file: requirements.yml driver: name: docker -lint: +lint: | yamllint . ansible-lint flake8 From 2adaada9cb9c740451e8753feaccd65f4229fdc8 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 11:24:47 +0100 Subject: [PATCH 010/142] Try to comment-out one lint --- molecule/bootstrap/molecule.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/molecule/bootstrap/molecule.yml b/molecule/bootstrap/molecule.yml index e79a086c..0e4f2c7f 100644 --- a/molecule/bootstrap/molecule.yml +++ b/molecule/bootstrap/molecule.yml @@ -5,10 +5,10 @@ dependency: role-file: requirements.yml driver: name: docker -lint: | - yamllint . - ansible-lint - flake8 +#lint: | +# yamllint . +# ansible-lint +# flake8 platforms: - name: omedev image: centos:7 From fadb3ba93d9eed91a99908a53d61546d88605ffb Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 11:29:17 +0100 Subject: [PATCH 011/142] Revert "Try to comment-out one lint" This reverts commit 2adaada9cb9c740451e8753feaccd65f4229fdc8. --- molecule/bootstrap/molecule.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/molecule/bootstrap/molecule.yml b/molecule/bootstrap/molecule.yml index 0e4f2c7f..e79a086c 100644 --- a/molecule/bootstrap/molecule.yml +++ b/molecule/bootstrap/molecule.yml @@ -5,10 +5,10 @@ dependency: role-file: requirements.yml driver: name: docker -#lint: | -# yamllint . -# ansible-lint -# flake8 +lint: | + yamllint . + ansible-lint + flake8 platforms: - name: omedev image: centos:7 From ce51ec6d613ff97ba5217fb421feeb181cd02ea5 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 11:34:22 +0100 Subject: [PATCH 012/142] Delete Dockerfiles --- molecule/docker-prod/Dockerfile.j2 | 1 - molecule/nightshade-webclients/Dockerfile.j2 | 1 - molecule/ome-dundeeomero/Dockerfile.j2 | 1 - molecule/ome-pg-prod/Dockerfile.j2 | 1 - molecule/omero-training-server/Dockerfile.j2 | 1 - molecule/release/Dockerfile.j2 | 1 - molecule/resources/Dockerfile.j2 | 22 -------------------- 7 files changed, 28 deletions(-) delete mode 120000 molecule/docker-prod/Dockerfile.j2 delete mode 120000 molecule/nightshade-webclients/Dockerfile.j2 delete mode 120000 molecule/ome-dundeeomero/Dockerfile.j2 delete mode 120000 molecule/ome-pg-prod/Dockerfile.j2 delete mode 120000 molecule/omero-training-server/Dockerfile.j2 delete mode 120000 molecule/release/Dockerfile.j2 delete mode 100644 molecule/resources/Dockerfile.j2 diff --git a/molecule/docker-prod/Dockerfile.j2 b/molecule/docker-prod/Dockerfile.j2 deleted file mode 120000 index 0e9184b4..00000000 --- a/molecule/docker-prod/Dockerfile.j2 +++ /dev/null @@ -1 +0,0 @@ -../resources/Dockerfile.j2 \ No newline at end of file diff --git a/molecule/nightshade-webclients/Dockerfile.j2 b/molecule/nightshade-webclients/Dockerfile.j2 deleted file mode 120000 index 0e9184b4..00000000 --- a/molecule/nightshade-webclients/Dockerfile.j2 +++ /dev/null @@ -1 +0,0 @@ -../resources/Dockerfile.j2 \ No newline at end of file diff --git a/molecule/ome-dundeeomero/Dockerfile.j2 b/molecule/ome-dundeeomero/Dockerfile.j2 deleted file mode 120000 index 0e9184b4..00000000 --- a/molecule/ome-dundeeomero/Dockerfile.j2 +++ /dev/null @@ -1 +0,0 @@ -../resources/Dockerfile.j2 \ No newline at end of file diff --git a/molecule/ome-pg-prod/Dockerfile.j2 b/molecule/ome-pg-prod/Dockerfile.j2 deleted file mode 120000 index 0e9184b4..00000000 --- a/molecule/ome-pg-prod/Dockerfile.j2 +++ /dev/null @@ -1 +0,0 @@ -../resources/Dockerfile.j2 \ No newline at end of file diff --git a/molecule/omero-training-server/Dockerfile.j2 b/molecule/omero-training-server/Dockerfile.j2 deleted file mode 120000 index 0e9184b4..00000000 --- a/molecule/omero-training-server/Dockerfile.j2 +++ /dev/null @@ -1 +0,0 @@ -../resources/Dockerfile.j2 \ No newline at end of file diff --git a/molecule/release/Dockerfile.j2 b/molecule/release/Dockerfile.j2 deleted file mode 120000 index 0e9184b4..00000000 --- a/molecule/release/Dockerfile.j2 +++ /dev/null @@ -1 +0,0 @@ -../resources/Dockerfile.j2 \ No newline at end of file diff --git a/molecule/resources/Dockerfile.j2 b/molecule/resources/Dockerfile.j2 deleted file mode 100644 index 00b7fd61..00000000 --- a/molecule/resources/Dockerfile.j2 +++ /dev/null @@ -1,22 +0,0 @@ -# Molecule managed - -{% if item.registry is defined %} -FROM {{ item.registry.url }}/{{ item.image }} -{% else %} -FROM {{ item.image }} -{% endif %} - -{% if item.env is defined %} -{% for var, value in item.env.items() %} -{% if value %} -ENV {{ var }} {{ value }} -{% endif %} -{% endfor %} -{% endif %} - -RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates iproute2 && apt-get clean; \ - elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash iproute && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash iproute ca-certificates && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ - elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml iproute2 && zypper clean -a; \ - elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \ - elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates iproute2 && xbps-remove -O; fi From 45d511811ee57037c0dac1a15753e8b4678b9372 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 11:44:25 +0100 Subject: [PATCH 013/142] Try to come back to name: yamllint --- molecule/bootstrap/molecule.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/molecule/bootstrap/molecule.yml b/molecule/bootstrap/molecule.yml index e79a086c..1cc03f39 100644 --- a/molecule/bootstrap/molecule.yml +++ b/molecule/bootstrap/molecule.yml @@ -5,10 +5,10 @@ dependency: role-file: requirements.yml driver: name: docker -lint: | - yamllint . - ansible-lint - flake8 +lint: + name: yamllint . +# ansible-lint +# flake8 platforms: - name: omedev image: centos:7 From f85191acb5d96d99c3e43a28e5240903604fc092 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 11:49:09 +0100 Subject: [PATCH 014/142] try this https://github.com/ansible-community/molecule/issues/2781#issuecomment-675597145 --- molecule/bootstrap/molecule.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/molecule/bootstrap/molecule.yml b/molecule/bootstrap/molecule.yml index 1cc03f39..59c80fa1 100644 --- a/molecule/bootstrap/molecule.yml +++ b/molecule/bootstrap/molecule.yml @@ -6,7 +6,8 @@ dependency: driver: name: docker lint: - name: yamllint . + PATH=${PATH} + yamllint . # ansible-lint # flake8 platforms: From 890ecfca1d29c4b232ab0b24b3238add2b4b5fda Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 11:51:42 +0100 Subject: [PATCH 015/142] Go back to original state of lint --- molecule/bootstrap/molecule.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/molecule/bootstrap/molecule.yml b/molecule/bootstrap/molecule.yml index 59c80fa1..918cb0c5 100644 --- a/molecule/bootstrap/molecule.yml +++ b/molecule/bootstrap/molecule.yml @@ -6,10 +6,9 @@ dependency: driver: name: docker lint: - PATH=${PATH} - yamllint . -# ansible-lint -# flake8 + name: yamllint + # TODO: enable + enabled: False platforms: - name: omedev image: centos:7 From 4f7ca7a6ba58c48e51ae76a93030f55e8be0279f Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 11:56:52 +0100 Subject: [PATCH 016/142] Go for https://github.com/sbesson/ansible-role-ssl-certificate/blob/b7858ced9de2cd39d3c27d96ea06fda593d414b7/molecule/default/molecule.yml#LL6C1-L7C17 --- molecule/bootstrap/molecule.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/molecule/bootstrap/molecule.yml b/molecule/bootstrap/molecule.yml index 918cb0c5..0d1a9ed5 100644 --- a/molecule/bootstrap/molecule.yml +++ b/molecule/bootstrap/molecule.yml @@ -7,8 +7,6 @@ driver: name: docker lint: name: yamllint - # TODO: enable - enabled: False platforms: - name: omedev image: centos:7 From cfbb237f4cebf98b16cc6772c4fad01319177f48 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 11:59:11 +0100 Subject: [PATCH 017/142] Completely comment out the lint line --- molecule/bootstrap/molecule.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/molecule/bootstrap/molecule.yml b/molecule/bootstrap/molecule.yml index 0d1a9ed5..d3303bed 100644 --- a/molecule/bootstrap/molecule.yml +++ b/molecule/bootstrap/molecule.yml @@ -5,8 +5,8 @@ dependency: role-file: requirements.yml driver: name: docker -lint: - name: yamllint +#lint: +# name: yamllint platforms: - name: omedev image: centos:7 From 4c42c27a9b210cd2665cc0310484376c39ccf2b9 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 12:19:30 +0100 Subject: [PATCH 018/142] Remove flake8 lint cf. Seb's comment --- molecule/bootstrap/molecule.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/molecule/bootstrap/molecule.yml b/molecule/bootstrap/molecule.yml index d3303bed..359f74fe 100644 --- a/molecule/bootstrap/molecule.yml +++ b/molecule/bootstrap/molecule.yml @@ -5,8 +5,10 @@ dependency: role-file: requirements.yml driver: name: docker -#lint: -# name: yamllint +lint: | + yamllint . + ansible-lint + flake8 platforms: - name: omedev image: centos:7 @@ -24,5 +26,3 @@ scenario: - syntax verifier: name: testinfra - lint: - name: flake8 From 0c0e494d660703925f0f8a9568b4b69f0f284762 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 12:28:57 +0100 Subject: [PATCH 019/142] Remove the lint flake8 in all molecule yml --- molecule/docker-prod/molecule.yml | 2 -- molecule/nightshade-webclients/molecule.yml | 2 -- molecule/ome-demoserver/molecule.yml | 2 -- molecule/www/molecule.yml | 2 -- 4 files changed, 8 deletions(-) diff --git a/molecule/docker-prod/molecule.yml b/molecule/docker-prod/molecule.yml index d6accc5d..ddb33301 100644 --- a/molecule/docker-prod/molecule.yml +++ b/molecule/docker-prod/molecule.yml @@ -54,5 +54,3 @@ scenario: name: docker-prod verifier: name: testinfra - lint: - name: flake8 diff --git a/molecule/nightshade-webclients/molecule.yml b/molecule/nightshade-webclients/molecule.yml index c0c1cc34..c9e65123 100644 --- a/molecule/nightshade-webclients/molecule.yml +++ b/molecule/nightshade-webclients/molecule.yml @@ -56,5 +56,3 @@ scenario: - destroy verifier: name: testinfra - lint: - name: flake8 diff --git a/molecule/ome-demoserver/molecule.yml b/molecule/ome-demoserver/molecule.yml index 0837b653..3e399874 100644 --- a/molecule/ome-demoserver/molecule.yml +++ b/molecule/ome-demoserver/molecule.yml @@ -31,5 +31,3 @@ scenario: - syntax verifier: name: testinfra - lint: - name: flake8 diff --git a/molecule/www/molecule.yml b/molecule/www/molecule.yml index 4a585be0..e6b232df 100644 --- a/molecule/www/molecule.yml +++ b/molecule/www/molecule.yml @@ -25,5 +25,3 @@ scenario: name: www verifier: name: testinfra - lint: - name: flake8 From cfa05a39b0b013e5262b52920aabd57e05283201 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 2 Jun 2023 12:47:56 +0100 Subject: [PATCH 020/142] Fix according to https://github.com/ome/ansible-role-ssl-certificate/commit/92e5050beb61349ade69dbcf8632b662182f6e6b --- .github/workflows/molecule.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index c92925d7..d5073094 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -30,9 +30,10 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: '3.8' - name: Install Ansible & Molecule - run: pip install "ansible<8" ansible-lint flake8 \ - "molecule<5" molecule-plugins[docker] pytest-testinfra + run: | + pip install wheel "ome-ansible-molecule==0.7.0a1" + pip install -U molecule molecule-plugins[docker] - name: Run molecule run: molecule test -s "${{ matrix.scenario }}" From e7d3822974f759fa634a9dee46107b404ddc3eee Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Tue, 6 Jun 2023 12:14:19 +0100 Subject: [PATCH 021/142] Try to fix syntax --- molecule/release/prepare.yml | 122 +++++++++++++++++------------------ 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/molecule/release/prepare.yml b/molecule/release/prepare.yml index d7575466..18a9b65e 100644 --- a/molecule/release/prepare.yml +++ b/molecule/release/prepare.yml @@ -8,64 +8,64 @@ - 3.2.0 - 3.2.0-rc1 tasks: - - name: Create existing released components - file: - path: "{{ item }}/component/3.1.8" - state: directory - owner: root - group: root - mode: 01555 - with_items: "{{ www_folders }}" - - name: Create minor version directory - file: - path: "{{ item }}/component/3.1" - state: directory - with_items: "{{ www_folders }}" - - name: Create minor version redirects - copy: - dest: "{{ item }}/component/3.1/.htaccess" - content: "Redirect 301 /component/3.1 /component/3.1.8" - with_items: "{{ www_folders }}" - - name: Create major version directory - file: - path: "{{ item }}/component/3" - state: directory - with_items: "{{ www_folders }}" - - name: Create major version redirects - copy: - dest: "{{ item }}/component/3/.htaccess" - content: "Redirect 301 /component/3 /component/3.1.8" - with_items: "{{ www_folders }}" - - name: Create latest version directory - file: - path: "{{ item }}/component/latest" - state: directory - with_items: "{{ www_folders }}" - - name: Create latest version redirects - copy: - dest: "{{ item }}/component/latest/.htaccess" - content: "Redirect 301 /component/latest /component/3.1.8" - with_items: "{{ www_folders }}" - - name: Create new release components - file: - path: "{{ item[0] }}/component/{{ item[1] }}" - state: directory - mode: 01777 - with_nested: - - "{{ www_folders }}" - - "{{ releases }}" - - name: Create .htaccess file - file: - path: "{{ item[0] }}/component/{{ item[1] }}/.htaccess" - state: touch - with_nested: - - "{{ www_folders }}" - - "{{ releases }}" - - name: Create mock content - file: - path: "{{ item[0] }}/component/{{ item[1] }}/test" - state: touch - mode: 01777 - with_nested: - - "{{ www_folders }}" - - "{{ releases }}" + - name: Create existing released components + file: + path: "{{ item }}/component/3.1.8" + state: directory + owner: root + group: root + mode: 01555 + with_items: "{{ www_folders }}" + - name: Create minor version directory + file: + path: "{{ item }}/component/3.1" + state: directory + with_items: "{{ www_folders }}" + - name: Create minor version redirects + copy: + dest: "{{ item }}/component/3.1/.htaccess" + content: "Redirect 301 /component/3.1 /component/3.1.8" + with_items: "{{ www_folders }}" + - name: Create major version directory + file: + path: "{{ item }}/component/3" + state: directory + with_items: "{{ www_folders }}" + - name: Create major version redirects + copy: + dest: "{{ item }}/component/3/.htaccess" + content: "Redirect 301 /component/3 /component/3.1.8" + with_items: "{{ www_folders }}" + - name: Create latest version directory + file: + path: "{{ item }}/component/latest" + state: directory + with_items: "{{ www_folders }}" + - name: Create latest version redirects + copy: + dest: "{{ item }}/component/latest/.htaccess" + content: "Redirect 301 /component/latest /component/3.1.8" + with_items: "{{ www_folders }}" + - name: Create new release components + file: + path: "{{ item[0] }}/component/{{ item[1] }}" + state: directory + mode: 01777 + with_nested: + - "{{ www_folders }}" + - "{{ releases }}" + - name: Create .htaccess file + file: + path: "{{ item[0] }}/component/{{ item[1] }}/.htaccess" + state: touch + with_nested: + - "{{ www_folders }}" + - "{{ releases }}" + - name: Create mock content + file: + path: "{{ item[0] }}/component/{{ item[1] }}/test" + state: touch + mode: 01777 + with_nested: + - "{{ www_folders }}" + - "{{ releases }}" From 4a4c61ef53d87910cf5942007123845303b7cb43 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Tue, 6 Jun 2023 15:18:28 +0100 Subject: [PATCH 022/142] Try to fix indentation --- molecule/release/prepare.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/molecule/release/prepare.yml b/molecule/release/prepare.yml index 18a9b65e..b7b3cfa1 100644 --- a/molecule/release/prepare.yml +++ b/molecule/release/prepare.yml @@ -10,11 +10,11 @@ tasks: - name: Create existing released components file: - path: "{{ item }}/component/3.1.8" - state: directory - owner: root - group: root - mode: 01555 + path: "{{ item }}/component/3.1.8" + state: directory + owner: root + group: root + mode: 01555 with_items: "{{ www_folders }}" - name: Create minor version directory file: From 85c62078e7a5e1ae0690fa57ef871d96aad916fb Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Tue, 6 Jun 2023 15:23:27 +0100 Subject: [PATCH 023/142] Remove lingering flake8 lint --- molecule/release/molecule.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/molecule/release/molecule.yml b/molecule/release/molecule.yml index dc446410..add768eb 100644 --- a/molecule/release/molecule.yml +++ b/molecule/release/molecule.yml @@ -35,5 +35,3 @@ scenario: name: release verifier: name: testinfra - lint: - name: flake8 From 7983b73eca34af14eb122312501ddb0a58ad2165 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Tue, 6 Jun 2023 15:32:07 +0100 Subject: [PATCH 024/142] Try to install the packages as per https://github.com/IDR/deployment/pull/397/files --- .github/workflows/molecule.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index d5073094..5b814c96 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -33,7 +33,7 @@ jobs: python-version: '3.8' - name: Install Ansible & Molecule run: | - pip install wheel "ome-ansible-molecule==0.7.0a1" - pip install -U molecule molecule-plugins[docker] + pip install "ansible<8" ansible-lint flake8 + pip install "molecule<5" molecule-plugins[docker] pytest-testinfra - name: Run molecule run: molecule test -s "${{ matrix.scenario }}" From 902b7975946fe6364a67bbb05aec8b90812c9f27 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Tue, 6 Jun 2023 15:36:17 +0100 Subject: [PATCH 025/142] Add ansible-compat --- .github/workflows/molecule.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 5b814c96..66a790ab 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -34,6 +34,7 @@ jobs: - name: Install Ansible & Molecule run: | pip install "ansible<8" ansible-lint flake8 - pip install "molecule<5" molecule-plugins[docker] pytest-testinfra + pip install "molecule<5" "ansible-compat<4" + pip install molecule-plugins[docker] pytest-testinfra - name: Run molecule run: molecule test -s "${{ matrix.scenario }}" From d6447288d7e058d6bcbb40eb354de200ea736bf8 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Tue, 6 Jun 2023 15:51:18 +0100 Subject: [PATCH 026/142] further fixes --- .github/workflows/molecule.yml | 2 +- molecule/ome-dundeeomero/molecule.yml | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 66a790ab..fbd88966 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -33,7 +33,7 @@ jobs: python-version: '3.8' - name: Install Ansible & Molecule run: | - pip install "ansible<8" ansible-lint flake8 + pip install "ansible<8" "ansible-lint<6.13" flake8 pip install "molecule<5" "ansible-compat<4" pip install molecule-plugins[docker] pytest-testinfra - name: Run molecule diff --git a/molecule/ome-dundeeomero/molecule.yml b/molecule/ome-dundeeomero/molecule.yml index 3f92e930..2d4b350a 100644 --- a/molecule/ome-dundeeomero/molecule.yml +++ b/molecule/ome-dundeeomero/molecule.yml @@ -57,5 +57,3 @@ scenario: - destroy verifier: name: testinfra - lint: - name: flake8 From 1f9e06b7f8ab97644a36d8459c5fbb3094377013 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Tue, 6 Jun 2023 15:53:35 +0100 Subject: [PATCH 027/142] Add 2 more redundant lint removals --- molecule/omero-training-server/molecule.yml | 2 -- molecule/web-proxy/molecule.yml | 2 -- 2 files changed, 4 deletions(-) diff --git a/molecule/omero-training-server/molecule.yml b/molecule/omero-training-server/molecule.yml index d66ea0d9..6a01bd9f 100644 --- a/molecule/omero-training-server/molecule.yml +++ b/molecule/omero-training-server/molecule.yml @@ -57,5 +57,3 @@ scenario: - destroy verifier: name: testinfra - lint: - name: flake8 diff --git a/molecule/web-proxy/molecule.yml b/molecule/web-proxy/molecule.yml index 49b7c556..8bdf86d9 100644 --- a/molecule/web-proxy/molecule.yml +++ b/molecule/web-proxy/molecule.yml @@ -28,5 +28,3 @@ scenario: - syntax verifier: name: testinfra - lint: - name: flake8 From 1bb46dd3333322d2ca9937e26c2946985c9b37af Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Tue, 6 Jun 2023 16:19:28 +0100 Subject: [PATCH 028/142] First batch of syntax fixes --- k8s/bootstrap/playbook.yml | 2 +- k8s/prerequisites/playbook.yml | 2 +- molecule/ome-pg-prod/prepare.yml | 10 +-- molecule/resources/prepare-iproute.yml | 20 +++--- omedev/docker-prod-apps.yml | 95 +++++++++++++++----------- omedev/playbook.yml | 3 +- postgres/ome-pg-prod.yml | 38 +++++------ release/permissions.yml | 20 +++--- release/public-images.yml | 12 +++- 9 files changed, 111 insertions(+), 91 deletions(-) diff --git a/k8s/bootstrap/playbook.yml b/k8s/bootstrap/playbook.yml index 37c415b8..b14f28d2 100644 --- a/k8s/bootstrap/playbook.yml +++ b/k8s/bootstrap/playbook.yml @@ -1,4 +1,4 @@ --- - hosts: vlan-10ge-servers roles: - - role: ome.network + - role: ome.network diff --git a/k8s/prerequisites/playbook.yml b/k8s/prerequisites/playbook.yml index 972b0747..e9fc9217 100644 --- a/k8s/prerequisites/playbook.yml +++ b/k8s/prerequisites/playbook.yml @@ -2,4 +2,4 @@ - hosts: kubernetes-lochy-k8s roles: # No mounts are configured, this just installs required packages - - role: ome.nfs_mount + - role: ome.nfs_mount diff --git a/molecule/ome-pg-prod/prepare.yml b/molecule/ome-pg-prod/prepare.yml index ddd75f7d..1cf4e32e 100644 --- a/molecule/ome-pg-prod/prepare.yml +++ b/molecule/ome-pg-prod/prepare.yml @@ -1,8 +1,8 @@ # Workaround lack of cron on Docker - hosts: ome-pg-prod1.openmicroscopy.org tasks: - - name: Install cron - become: yes - yum: - name: cronie - state: present + - name: Install cron + become: yes + yum: + name: cronie + state: present diff --git a/molecule/resources/prepare-iproute.yml b/molecule/resources/prepare-iproute.yml index d352bcc5..79914b10 100644 --- a/molecule/resources/prepare-iproute.yml +++ b/molecule/resources/prepare-iproute.yml @@ -1,14 +1,14 @@ # Install iproute for ansible network vars - hosts: all tasks: - - name: Install iproute - become: yes - yum: - name: iproute - state: present + - name: Install iproute + become: yes + yum: + name: iproute + state: present - - name: Install cron - become: true - yum: - name: cronie - state: present + - name: Install cron + become: true + yum: + name: cronie + state: present diff --git a/omedev/docker-prod-apps.yml b/omedev/docker-prod-apps.yml index f47dbf6e..291a22a9 100644 --- a/omedev/docker-prod-apps.yml +++ b/omedev/docker-prod-apps.yml @@ -73,7 +73,7 @@ metrics_path: /metrics/9100 scheme: https static_configs: - - targets: "{{ monitored_node_exporter_hosts }}" + - targets: "{{ monitored_node_exporter_hosts }}" - job_name: omero-web basic_auth: @@ -82,7 +82,7 @@ metrics_path: /django_prometheus/metrics scheme: https static_configs: - - targets: "{{ monitored_omero_web_hosts }}" + - targets: "{{ monitored_omero_web_hosts }}" - job_name: jmx-blitz basic_auth: @@ -91,7 +91,7 @@ metrics_path: /metrics/9180 scheme: https static_configs: - - targets: "{{ monitored_omero_server_hosts }}" + - targets: "{{ monitored_omero_server_hosts }}" - job_name: jmx-indexer basic_auth: @@ -100,7 +100,7 @@ metrics_path: /metrics/9181 scheme: https static_configs: - - targets: "{{ monitored_omero_server_hosts }}" + - targets: "{{ monitored_omero_server_hosts }}" - job_name: jmx-pixeldata basic_auth: @@ -109,7 +109,7 @@ metrics_path: /metrics/9182 scheme: https static_configs: - - targets: "{{ monitored_omero_server_hosts }}" + - targets: "{{ monitored_omero_server_hosts }}" - job_name: postgres-exporter basic_auth: @@ -118,7 +118,7 @@ metrics_path: /metrics/9187 scheme: https static_configs: - - targets: "{{ monitored_postgres_hosts }}" + - targets: "{{ monitored_postgres_hosts }}" - job_name: omero-server basic_auth: @@ -127,11 +127,12 @@ metrics_path: /metrics/9449 scheme: https static_configs: - - targets: "{{ monitored_omero_server_hosts }}" + - targets: "{{ monitored_omero_server_hosts }}" # Federated metrics from the IDR # To get all federated metrics so you can decide what to fetch: -# curl -G https://idr.openmicroscopy.org/prometheus/federate --data-urlencode 'match[]={__name__=~".+"}' +# curl -G https://idr.openmicroscopy.org/prometheus/federate \ +# --data-urlencode 'match[]={__name__=~".+"}' - job_name: federate-{{ idr_internal_1 }} honor_labels: true @@ -142,11 +143,11 @@ - '{job="node-exporter"}' - '{job="omero-server"}' scheme: https - static_configs: - - targets: - - "{{ idr_internal_1 }}.openmicroscopy.org" - labels: - prometheussrc: "{{ idr_internal_1 }}" + static_configs: + - targets: + - "{{ idr_internal_1 }}.openmicroscopy.org" + labels: + prometheussrc: "{{ idr_internal_1 }}" - job_name: federate-{{ idr_internal_2 }} honor_labels: true @@ -157,11 +158,11 @@ - '{job="node-exporter"}' - '{job="omero-server"}' scheme: https - static_configs: - - targets: - - "{{ idr_internal_2 }}.openmicroscopy.org" - labels: - prometheussrc: "{{ idr_internal_2 }}" + static_configs: + - targets: + - "{{ idr_internal_2 }}.openmicroscopy.org" + labels: + prometheussrc: "{{ idr_internal_2 }}" - job_name: federate-idr-production honor_labels: true @@ -172,11 +173,11 @@ - '{job="node-exporter"}' - '{job="omero-server"}' scheme: https - static_configs: - - targets: - - idr.openmicroscopy.org - labels: - prometheussrc: idr-production + static_configs: + - targets: + - idr.openmicroscopy.org + labels: + prometheussrc: idr-production - job_name: federate-idr-analysis basic_auth: @@ -193,11 +194,11 @@ - '{__name__="container_cpu_user_seconds_total"}' - '{__name__="container_memory_rss"}' scheme: https - static_configs: - - targets: - - idr-analysis.openmicroscopy.org - labels: - prometheussrc: idr-analysis + static_configs: + - targets: + - idr-analysis.openmicroscopy.org + labels: + prometheussrc: idr-analysis # The prometheus role sets the prometheus_internal_ip variable that is # used later @@ -291,8 +292,10 @@ image: minio/minio:RELEASE.2020-10-18T21-54-12Z command: gateway nas /data env: - MINIO_ACCESS_KEY: "{{ ome_miniodev_access_key | default('minio') }}" - MINIO_SECRET_KEY: "{{ ome_miniodev_secret_key | default('minio123') }}" + MINIO_ACCESS_KEY: "{{ ome_miniodev_access_key \ + | default('minio') }}" + MINIO_SECRET_KEY: "{{ ome_miniodev_secret_key \ + | default('minio123') }}" name: miniodev state: started published_ports: @@ -323,21 +326,31 @@ vars: - monitored_node_exporter_hosts: "{{ ome_monitored_node_exporter_hosts | default([]) }}" - monitored_postgres_hosts: "{{ ome_monitored_postgres_hosts | default([]) }}" - monitored_omero_server_hosts: "{{ ome_monitored_omero_server_hosts | default([]) }}" - monitored_omero_web_hosts: "{{ ome_monitored_omero_web_hosts | default([]) }}" + monitored_node_exporter_hosts: "{{ ome_monitored_node_exporter_hosts\ + | default([]) }}" + monitored_postgres_hosts: "{{ ome_monitored_postgres_hosts\ + | default([]) }}" + monitored_omero_server_hosts: "{{ ome_monitored_omero_server_hosts\ + | default([]) }}" + monitored_omero_web_hosts: "{{ ome_monitored_omero_web_hosts\ + | default([]) }}" prometheus_docker_user: 909 redmine_docker_user: 999 - idr_internal_1: "{{ ome_monitored_idr_internal_1 | default('idr1') }}" - idr_internal_2: "{{ ome_monitored_idr_internal_2 | default('idr2') }}" - - scrape_username: "{{ ome_monitored_scrape_username | default('monitoring') }}" - scrape_password: "{{ ome_monitored_scrape_password | default('monitoring') }}" - scrape_idr_username: "{{ ome_monitored_scrape_idr_username | default('monitoring') }}" - scrape_idr_password: "{{ ome_monitored_scrape_idr_password | default('monitoring') }}" + idr_internal_1: "{{ ome_monitored_idr_internal_1\ + | default('idr1') }}" + idr_internal_2: "{{ ome_monitored_idr_internal_2\ + | default('idr2') }}" + + scrape_username: "{{ ome_monitored_scrape_username\ + | default('monitoring') }}" + scrape_password: "{{ ome_monitored_scrape_password\ + | default('monitoring') }}" + scrape_idr_username: "{{ ome_monitored_scrape_idr_username\ + | default('monitoring') }}" + scrape_idr_password: "{{ ome_monitored_scrape_idr_password\ + | default('monitoring') }}" nginx_version: 1.18.0 diff --git a/omedev/playbook.yml b/omedev/playbook.yml index 03ecc5b2..2d1b48b2 100644 --- a/omedev/playbook.yml +++ b/omedev/playbook.yml @@ -10,6 +10,7 @@ - role: ome.versioncontrol_utils - role: ome.nfs_mount - # This will only have effect if nfs_share_mounts is defined in host/group vars + # This will only have effect if nfs_share_mounts + # is defined in host/group vars - role: ome.docker diff --git a/postgres/ome-pg-prod.yml b/postgres/ome-pg-prod.yml index be1e9109..028ee30d 100644 --- a/postgres/ome-pg-prod.yml +++ b/postgres/ome-pg-prod.yml @@ -2,25 +2,25 @@ - hosts: ome-pg-prod1.openmicroscopy.org roles: - - role: ome.postgresql - postgresql_version: "9.6" - postgresql_server_listen: "'*'" - postgresql_databases: - - name: idr-redmine - owner: idr-redmine - restrict: True - postgresql_users: - - user: idr-redmine - password: "{{ idr_redmine_postgres_password | default('idr-redmine') }}" - databases: - - idr-redmine - postgresql_server_auth: - - database: idr-redmine - user: idr-redmine - address: "{{ idr_redmine_postgres_auth_ip | default('0.0.0.0/0') }}" - - database: idr-redmine - user: idr-redmine - address: "{{ idr_redmine_postgres_auth_ip2 | default('0.0.0.0/0') }}" + - role: ome.postgresql + postgresql_version: "9.6" + postgresql_server_listen: "'*'" + postgresql_databases: + - name: idr-redmine + owner: idr-redmine + restrict: True + postgresql_users: + - user: idr-redmine + password: "{{ idr_redmine_postgres_password | default('idr-redmine') }}" + databases: + - idr-redmine + postgresql_server_auth: + - database: idr-redmine + user: idr-redmine + address: "{{ idr_redmine_postgres_auth_ip | default('0.0.0.0/0') }}" + - database: idr-redmine + user: idr-redmine + address: "{{ idr_redmine_postgres_auth_ip2 | default('0.0.0.0/0') }}" - role: ome.nfs_mount # Parameters for this role are internal diff --git a/release/permissions.yml b/release/permissions.yml index ac3c5525..f58c1409 100644 --- a/release/permissions.yml +++ b/release/permissions.yml @@ -3,18 +3,18 @@ become: true tasks: - file: - path: /uod/idr/www - state: directory - owner: root - group: root - mode: 0755 + path: /uod/idr/www + state: directory + owner: root + group: root + mode: 0755 - file: - path: "{{ item }}" - state: directory - owner: root - group: root - mode: 0755 + path: "{{ item }}" + state: directory + owner: root + group: root + mode: 0755 with_items: "{{ www_folders }}" - find: diff --git a/release/public-images.yml b/release/public-images.yml index 1a960418..e695d1ba 100644 --- a/release/public-images.yml +++ b/release/public-images.yml @@ -6,13 +6,19 @@ file: force: yes src: "../../../repos/curated/{{ item.key }}/public/" - dest: "/uod/idr/www/downloads.openmicroscopy.org/images/{{ item.value }}" + dest: > + "/uod/idr/www/downloads. + openmicroscopy.org/ + images/{{ item.value }}" state: link with_dict: "{{ public_folders }}" - name: check public images file: force: yes src: "{{ item.src }}" - dest: "/uod/idr/www/downloads.openmicroscopy.org/images/{{ item.dest }}" + dest: > + "/uod/idr/www/downloads. + openmicroscopy.org/ + images/{{ item.dest }}" state: link - with_items: "{{ special_public_folders }}" \ No newline at end of file + with_items: "{{ special_public_folders }}" From bf8e9d0dc4801975913906caafa755f075f78bbd Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 13:23:02 +0100 Subject: [PATCH 029/142] Fix linting iproute --- molecule/resources/prepare-iproute.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/molecule/resources/prepare-iproute.yml b/molecule/resources/prepare-iproute.yml index 79914b10..4a9cba9a 100644 --- a/molecule/resources/prepare-iproute.yml +++ b/molecule/resources/prepare-iproute.yml @@ -4,11 +4,11 @@ - name: Install iproute become: yes yum: - name: iproute - state: present + name: iproute + state: present - name: Install cron become: true yum: - name: cronie - state: present + name: cronie + state: present From efcf60c7fab8254f10abe3ee3a8fbaac9a876e1d Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 13:23:43 +0100 Subject: [PATCH 030/142] fix linting docker-prod-apps --- omedev/docker-prod-apps.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/omedev/docker-prod-apps.yml b/omedev/docker-prod-apps.yml index 291a22a9..9b0f335f 100644 --- a/omedev/docker-prod-apps.yml +++ b/omedev/docker-prod-apps.yml @@ -143,11 +143,11 @@ - '{job="node-exporter"}' - '{job="omero-server"}' scheme: https - static_configs: - - targets: - - "{{ idr_internal_1 }}.openmicroscopy.org" - labels: - prometheussrc: "{{ idr_internal_1 }}" + static_configs: + - targets: + - "{{ idr_internal_1 }}.openmicroscopy.org" + labels: + prometheussrc: "{{ idr_internal_1 }}" - job_name: federate-{{ idr_internal_2 }} honor_labels: true From be0974c8b3df3df394488d2c6aef92daac126c6a Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 13:24:21 +0100 Subject: [PATCH 031/142] fix linting ome-pg-prod --- postgres/ome-pg-prod.yml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/postgres/ome-pg-prod.yml b/postgres/ome-pg-prod.yml index 028ee30d..f853a95c 100644 --- a/postgres/ome-pg-prod.yml +++ b/postgres/ome-pg-prod.yml @@ -6,26 +6,26 @@ postgresql_version: "9.6" postgresql_server_listen: "'*'" postgresql_databases: - - name: idr-redmine - owner: idr-redmine - restrict: True + - name: idr-redmine + owner: idr-redmine + restrict: true postgresql_users: - - user: idr-redmine - password: "{{ idr_redmine_postgres_password | default('idr-redmine') }}" - databases: - - idr-redmine + - user: idr-redmine + password: "{{ idr_redmine_postgres_password | default('idr-redmine') }}" + databases: + - idr-redmine postgresql_server_auth: - - database: idr-redmine - user: idr-redmine - address: "{{ idr_redmine_postgres_auth_ip | default('0.0.0.0/0') }}" - - database: idr-redmine - user: idr-redmine - address: "{{ idr_redmine_postgres_auth_ip2 | default('0.0.0.0/0') }}" + - database: idr-redmine + user: idr-redmine + address: "{{ idr_redmine_postgres_auth_ip | default('0.0.0.0/0') }}" + - database: idr-redmine + user: idr-redmine + address: "{{ idr_redmine_postgres_auth_ip2 | default('0.0.0.0/0') }}" - - role: ome.nfs_mount - # Parameters for this role are internal + - role: ome.nfs_mount + # Parameters for this role are internal - - role: ome.postgresql_backup - postgresql_backup_dir: /mnt/backups/ - postgresql_backup_filename_format: "{{ ansible_hostname }}-%a.pgdump" - postgresql_backup_minimum_expected_size: 100000 + - role: ome.postgresql_backup + postgresql_backup_dir: /mnt/backups/ + postgresql_backup_filename_format: "{{ ansible_hostname }}-%a.pgdump" + postgresql_backup_minimum_expected_size: 100000 From 622683e86a2e614e6bedf03834af771ba04f53a5 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 13:25:35 +0100 Subject: [PATCH 032/142] fix linting release/group_vars/all --- release/group_vars/all.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/release/group_vars/all.yml b/release/group_vars/all.yml index 1fd43ffd..8763f782 100644 --- a/release/group_vars/all.yml +++ b/release/group_vars/all.yml @@ -51,11 +51,17 @@ public_folders: # List containing special public images/folders that do not meet the standard # layout above special_public_folders: - - { src: '../../../../repos/curated/samples/carlos/big.tiff', dest: 'gateway_tests/big.tiff'} - - { src: '../../../../repos/curated/samples/ome/CHOBI_d3d.dv', dest: 'gateway_tests/CHOBI_d3d.dv'} - - { src: '../../../../repos/curated/samples/ome/tinyTest.d3d.dv', - dest: 'gateway_tests/tinyTest.d3d.dv' } - - { src: '../../../../repos/curated/cellomics/public/', dest: 'HCS/BBBC'} - - { src: '../../../../repos/curated/incell/public/', dest: 'HCS/INCELL2000'} - - { src: '../../../../repos/curated/perkinelmer-operetta/public/', dest: 'HCS/Operetta'} - - { src: '../../../repos/curated/zip/u-track/', dest: 'u-track'} + - src: '../../../../repos/curated/samples/carlos/big.tiff' + dest: 'gateway_tests/big.tiff' + - src: '../../../../repos/curated/samples/ome/CHOBI_d3d.dv' + dest: 'gateway_tests/CHOBI_d3d.dv' + - src: '../../../../repos/curated/samples/ome/tinyTest.d3d.dv' + dest: 'gateway_tests/tinyTest.d3d.dv' + - src: '../../../../repos/curated/cellomics/public/' + dest: 'HCS/BBBC' + - src: '../../../../repos/curated/incell/public/' + dest: 'HCS/INCELL2000' + - src: '../../../../repos/curated/perkinelmer-operetta/public/' + dest: 'HCS/Operetta' + - src: '../../../repos/curated/zip/u-track/' + dest: 'u-track' From 470587d2ccf4673339050777e3e685001f383646 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 13:26:04 +0100 Subject: [PATCH 033/142] Fix linting release/permissions --- release/permissions.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/release/permissions.yml b/release/permissions.yml index f58c1409..d4f55121 100644 --- a/release/permissions.yml +++ b/release/permissions.yml @@ -3,18 +3,18 @@ become: true tasks: - file: - path: /uod/idr/www - state: directory - owner: root - group: root - mode: 0755 + path: /uod/idr/www + state: directory + owner: root + group: root + mode: 0755 - file: - path: "{{ item }}" - state: directory - owner: root - group: root - mode: 0755 + path: "{{ item }}" + state: directory + owner: root + group: root + mode: 0755 with_items: "{{ www_folders }}" - find: From ac2e0cb1945ad1bb5691006f429402a606605fbb Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 13:27:49 +0100 Subject: [PATCH 034/142] fix linting release/public-images --- release/public-images.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/release/public-images.yml b/release/public-images.yml index e695d1ba..41f99437 100644 --- a/release/public-images.yml +++ b/release/public-images.yml @@ -4,9 +4,9 @@ tasks: - name: create symlinks for public images file: - force: yes + force: true src: "../../../repos/curated/{{ item.key }}/public/" - dest: > + dest: > "/uod/idr/www/downloads. openmicroscopy.org/ images/{{ item.value }}" @@ -14,9 +14,9 @@ with_dict: "{{ public_folders }}" - name: check public images file: - force: yes + force: true src: "{{ item.src }}" - dest: > + dest: > "/uod/idr/www/downloads. openmicroscopy.org/ images/{{ item.dest }}" From f5cef0a77a4a799792fde4e9fae76507f518d4d5 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 13:28:42 +0100 Subject: [PATCH 035/142] fix linting www/playbook --- www/playbook.yml | 188 ++++++++++++++++++++++++----------------------- 1 file changed, 96 insertions(+), 92 deletions(-) diff --git a/www/playbook.yml b/www/playbook.yml index c563cfc0..ad54ec9c 100644 --- a/www/playbook.yml +++ b/www/playbook.yml @@ -4,106 +4,110 @@ environment: PATH: /usr/local/bin:{{ ansible_env.PATH }} pre_tasks: - - name: Install open-vm-tools if system is a VMware vm - become: yes - yum: - name: open-vm-tools - state: installed - when: > - ((ansible_virtualization_type is defined) - and (ansible_virtualization_type == "VMware")) - - # Two tasks here which could instead use the role at - # https://github.com/openmicroscopy/ansible-role-lvm-partition/, but that role - # will change the device name to symlinks rather than existing device ID. - - name: storage | Resize root LV - tags: lvm - become: yes - lvol: - lv: root - vg: "{{ lvm_vgname }}" - size: "{{ provision_root_lvsize }}" - shrink: no - - # Grow the filesystem to fill the LV - - name: storage | Resize root FS - tags: lvm - become: yes - filesystem: - fstype: "{{ filesystem }}" - dev: /dev/mapper/{{ lvm_vgname }}-root - resizefs: yes - - - name: storage | Resize var_log LV - tags: lvm - become: yes - lvol: - lv: var_log - vg: "{{ lvm_vgname }}" - size: "{{ provision_varlog_lvsize }}" - shrink: no - - # Grow the filesystem to fill the LV - - name: storage | Resize var_log FS - tags: lvm - become: yes - filesystem: - fstype: "{{ filesystem }}" - dev: /dev/mapper/{{ lvm_vgname }}-var_log - resizefs: yes + - name: Install open-vm-tools if system is a VMware vm + become: yes + yum: + name: open-vm-tools + state: installed + when: > + ((ansible_virtualization_type is defined) + and (ansible_virtualization_type == "VMware")) + + # Two tasks here which could instead use the role at + # https://github.com/openmicroscopy/ansible-role-lvm-partition/, + # but that role + # will change the device name to symlinks rather than + # existing device ID. + - name: storage | Resize root LV + tags: lvm + become: yes + lvol: + lv: root + vg: "{{ lvm_vgname }}" + size: "{{ provision_root_lvsize }}" + shrink: no + + # Grow the filesystem to fill the LV + - name: storage | Resize root FS + tags: lvm + become: yes + filesystem: + fstype: "{{ filesystem }}" + dev: /dev/mapper/{{ lvm_vgname }}-root + resizefs: yes + + - name: storage | Resize var_log LV + tags: lvm + become: yes + lvol: + lv: var_log + vg: "{{ lvm_vgname }}" + size: "{{ provision_varlog_lvsize }}" + shrink: no + + # Grow the filesystem to fill the LV + - name: storage | Resize var_log FS + tags: lvm + become: yes + filesystem: + fstype: "{{ filesystem }}" + dev: /dev/mapper/{{ lvm_vgname }}-var_log + resizefs: yes roles: - # Now OME are using RHEL without Spacewalk, the current best-method of - # checking `is server deployed in Dundee/SLS` is checking for the SLS nameservers. - - role: ome.system_monitor_agent - tags: monitoring - when: "'10.1.255.216' in ansible_dns.nameservers" - - - role: ome.sudoers - sudoers_individual_commands: - - user: "%omedev" - become: ALL - command: "NOPASSWD: /usr/local/bin/deploy *" + # Now OME are using RHEL without Spacewalk, + # the current best-method of + # checking `is server deployed in Dundee/SLS` + # is checking for the SLS nameservers. + - role: ome.system_monitor_agent + tags: monitoring + when: "'10.1.255.216' in ansible_dns.nameservers" + + - role: ome.sudoers + sudoers_individual_commands: + - user: "%omedev" + become: ALL + command: "NOPASSWD: /usr/local/bin/deploy *" post_tasks: - - name: Check_MK logwatch plugin | check for plugin existence - tags: monitoring - stat: - path: "{{ check_mk_agent_plugin_path }}/mk_logwatch" - register: check_mk_logwatch_plugin_st - - - name: Check_MK logwatch plugin | activate the plugin - tags: monitoring - become: yes - command: >- - cp "{{ check_mk_agent_plugin_path }}/mk_logwatch" - /usr/share/check-mk-agent/plugins/ - creates=/usr/share/check-mk-agent/plugins/mk_logwatch - when: check_mk_logwatch_plugin_st.stat.exists - - - name: Check_MK logwatch plugin | check for default config file - tags: monitoring - stat: - path: "{{ check_mk_agent_config_example_path }}/logwatch.cfg" - register: check_mk_logwatch_plugin_conf_st - - - name: Check_MK logwatch plugin | copy the default config - tags: monitoring - become: yes - command: >- - cp "{{ check_mk_agent_config_example_path }}/logwatch.cfg" - "{{ check_mk_agent_config_path }}/logwatch.cfg" - creates="{{ check_mk_agent_config_path }}/logwatch.cfg" - when: check_mk_logwatch_plugin_conf_st.stat.exists + - name: Check_MK logwatch plugin | check for plugin existence + tags: monitoring + stat: + path: "{{ check_mk_agent_plugin_path }}/mk_logwatch" + register: check_mk_logwatch_plugin_st + + - name: Check_MK logwatch plugin | activate the plugin + tags: monitoring + become: yes + command: >- + cp "{{ check_mk_agent_plugin_path }}/mk_logwatch" + /usr/share/check-mk-agent/plugins/ + creates=/usr/share/check-mk-agent/plugins/mk_logwatch + when: check_mk_logwatch_plugin_st.stat.exists + + - name: Check_MK logwatch plugin | check for default config file + tags: monitoring + stat: + path: "{{ check_mk_agent_config_example_path }}/logwatch.cfg" + register: check_mk_logwatch_plugin_conf_st + + - name: Check_MK logwatch plugin | copy the default config + tags: monitoring + become: yes + command: >- + cp "{{ check_mk_agent_config_example_path }}/logwatch.cfg" + "{{ check_mk_agent_config_path }}/logwatch.cfg" + creates="{{ check_mk_agent_config_path }}/logwatch.cfg" + when: check_mk_logwatch_plugin_conf_st.stat.exists vars: - # Check_MK (system monitoring) paths - check_mk_agent_plugin_path: /usr/share/check-mk-agent/available-plugins - check_mk_agent_config_example_path: /usr/share/check_mk/agents/cfg_examples - check_mk_agent_config_path: /etc/check-mk-agent + # Check_MK (system monitoring) paths + check_mk_agent_plugin_path: /usr/share/check-mk-agent/available-plugins + check_mk_agent_config_example_path: /usr/share/check_mk/agents/cfg_examples + check_mk_agent_config_path: /etc/check-mk-agent - filesystem: "ext4" + filesystem: "ext4" - include: www-deploy.yml From 12c0562cd9b6f80e3bd97d57845248597262b129 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 13:33:35 +0100 Subject: [PATCH 036/142] fix linting www/www-deploy --- www/www-deploy.yml | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/www/www-deploy.yml b/www/www-deploy.yml index ca75276a..762559f3 100644 --- a/www/www-deploy.yml +++ b/www/www-deploy.yml @@ -16,7 +16,9 @@ state: reloaded vars: - nginx_proxy_worker_processes: "{{ ((ansible_processor_count * ansible_processor_cores) / 2) |round|int }}" + nginx_proxy_worker_processes: >- + "{{ ((ansible_processor_count * ansible_processor_cores) + / 2) |round|int }}" nginx_proxy_worker_connections: 65000 nginx_proxy_ssl: True nginx_proxy_ssl_certificate: "{{ ssl_certificate_bundled_path }}" @@ -32,7 +34,6 @@ server: https://www-legacy.openmicroscopy.org/qa2 - location: /static server: https://www-legacy.openmicroscopy.org - nginx_proxy_redirect_map_locations: # TODO: change to 301 when we're happy - location: "~ ^/(BIO-FORMATS)($|/)" @@ -53,7 +54,6 @@ code: 302 - location: "~ ^/(Schemas/Samples)($|/)" code: 302 - nginx_proxy_redirect_map: # by default redirect to the 404 page - match: default @@ -130,14 +130,20 @@ dest: /events/12th-annual-users-meeting-2017.html - match: "~/site/community/minutes/meetings/11th-annual-users-meeting-2016" dest: /events/11th-annual-users-meeting-2016.html - - match: "~/site/community/minutes/meetings/10th-annual-users-meeting-june-2015" + - match: >- + "~/site/community/minutes/meetings/ + 10th-annual-users-meeting-june-2015" dest: /events/10th-annual-users-meeting-june-2015.html - - match: "~/site/community/minutes/meetings/9th-annual-users-meeting-june-2014" + - match: >- + "~/site/community/minutes/meetings/ + 9th-annual-users-meeting-june-2014" dest: /events/9th-annual-users-meeting-june-2014.html - match: "~/site/community/jobs/?$" dest: /careers - match: "~/site/community/scripts/?$" - dest: https://docs.openmicroscopy.org/latest/omero/developers/scripts/index.html + dest: >- + https://docs.openmicroscopy.org/ + latest/omero/developers/scripts/index.html - match: "~/site/community/(?.*)$" dest: /support @@ -197,7 +203,9 @@ dest: https://docs.openmicroscopy.org/latest/ome-model/$link - match: "~/site/support/file-formats/?$" dest: https://docs.openmicroscopy.org/latest/ome-model/ - - match: "~/site/support/file-formats/schemas/specifications/compliant-file-specification/?$" + - match: >- + "~/site/support/file-formats/schemas + /specifications/compliant-file-specification/?$" dest: https://docs.openmicroscopy.org/latest/ome-model/specifications/ - match: "~/site/support/ome-tiff/?$" dest: https://docs.openmicroscopy.org/latest/ome-model/ome-tiff/ @@ -246,7 +254,9 @@ - match: "~/info/OMERO.server" dest: https://docs.openmicroscopy.org/latest/omero/users/index.html - match: "~/info/permissions" - dest: https://docs.openmicroscopy.org/latest/omero/sysadmins/server-permissions.html + dest: >- + https://docs.openmicroscopy.org/latest + /omero/sysadmins/server-permissions.html - match: "~/info/demo" dest: http://help.openmicroscopy.org/demo-server.html - match: "~/info/cls" @@ -262,11 +272,15 @@ - match: "~/info/attribution" dest: /licensing/ - match: "~/info/downgrade" - dest: https://docs.openmicroscopy.org/latest/omero/developers/Model/XsltTransformations.html + dest: >- + https://docs.openmicroscopy.org/latest/ + omero/developers/Model/XsltTransformations.html - match: "~/info/flimfit" dest: http://flimfit.org - match: "~/info/scripts" - dest: https://docs.openmicroscopy.org/latest/omero/developers/scripts/index.html + dest: >- + https://docs.openmicroscopy.org/latest/ + omero/developers/scripts/index.html - match: "~/info/bio-formats(/.*)?$" dest: https://docs.openmicroscopy.org/latest/bio-formats/ - match: "~/info/slidebook" From 384c9c1ca66e2b06145bae6d7d0f2e4f5dfb10b2 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 13:41:11 +0100 Subject: [PATCH 037/142] fix linting www/www-static --- www/www-static.yml | 112 ++++++++++++++++++++++----------------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/www/www-static.yml b/www/www-static.yml index 889a7124..cc585c09 100644 --- a/www/www-static.yml +++ b/www/www-static.yml @@ -3,71 +3,71 @@ - hosts: www pre_tasks: - - name: Check if phpbbforum already unzipped - stat: - path: "{{ phpbbforum_style_file }}" - register: _phpbbforum_style_file_st + - name: Check if phpbbforum already unzipped + stat: + path: "{{ phpbbforum_style_file }}" + register: _phpbbforum_style_file_st - - name: Check if schemas_documentation already unzipped - stat: - path: "{{ schemas_doc_file }}" - register: _schemas_doc_file_st + - name: Check if schemas_documentation already unzipped + stat: + path: "{{ schemas_doc_file }}" + register: _schemas_doc_file_st roles: - - role: ome.deploy_archive - become: yes - deploy_archive_dest_dir: /var/www - deploy_archive_src_url: https://downloads.openmicroscopy.org/web-archive/phpbbforum-20190718.tar.gz - deploy_archive_sha256: e9d7a7eefbacf42ddbdf92b201584913cb6d94ec331750f811232b2e91aa5b40 - # This file is patched later so only unzip if it doesn't exist - when: not _phpbbforum_style_file_st.stat.exists + - role: ome.deploy_archive + become: yes + deploy_archive_dest_dir: /var/www + deploy_archive_src_url: https://downloads.openmicroscopy.org/web-archive/phpbbforum-20190718.tar.gz + deploy_archive_sha256: e9d7a7eefbacf42ddbdf92b201584913cb6d94ec331750f811232b2e91aa5b40 + # This file is patched later so only unzip if it doesn't exist + when: not _phpbbforum_style_file_st.stat.exists - - role: ome.deploy_archive - become: yes - deploy_archive_dest_dir: /var/www - deploy_archive_src_url: https://downloads.openmicroscopy.org/web-archive/schemas_documentation-20211213.tar.gz - deploy_archive_sha256: 27cc5def458112a2e259484906f2bc8c0e0e2bd0a728b0a478302537d67117ec - # This file is patched later so only unzip if it doesn't exist - when: not _schemas_doc_file_st.stat.exists + - role: ome.deploy_archive + become: yes + deploy_archive_dest_dir: /var/www + deploy_archive_src_url: https://downloads.openmicroscopy.org/web-archive/schemas_documentation-20211213.tar.gz + deploy_archive_sha256: 27cc5def458112a2e259484906f2bc8c0e0e2bd0a728b0a478302537d67117ec + # This file is patched later so only unzip if it doesn't exist + when: not _schemas_doc_file_st.stat.exists tasks: - - name: install deployment script - become: yes - template: - src: files/deploy - dest: /usr/local/bin/deploy - mode: 0555 + - name: install deployment script + become: yes + template: + src: files/deploy + dest: /usr/local/bin/deploy + mode: 0555 - - name: Install Cron daemon - become: yes - yum: - name: cronie - state: installed + - name: Install Cron daemon + become: yes + yum: + name: cronie + state: installed - - name: Add cron job updating the website - become: yes - cron: - name: "Deploy the website" - special_time: hourly - job: "/usr/local/bin/deploy 2>&1 > /dev/null || /usr/local/bin/deploy -f" + - name: Add cron job updating the website + become: yes + cron: + name: "Deploy the website" + special_time: hourly + job: "/usr/local/bin/deploy 2>&1 > /dev/null || /usr/local/bin/deploy -f" - - name: Update static phpbb stylesheet - become: yes - blockinfile: - block: | - form, - .quick-login, - .buttons, - #jumpbox~h3, - #jumpbox~p, - .headerspace~h3, - .headerspace~p, - ul.linklist.rightside, - ul.linklist li.rightside { - display: none; - } - marker: "/* {mark} ANSIBLE MANAGED BLOCK */" - path: "{{ phpbbforum_style_file }}" + - name: Update static phpbb stylesheet + become: yes + blockinfile: + block: | + form, + .quick-login, + .buttons, + #jumpbox~h3, + #jumpbox~p, + .headerspace~h3, + .headerspace~p, + ul.linklist.rightside, + ul.linklist li.rightside { + display: none; + } + marker: "/* {mark} ANSIBLE MANAGED BLOCK */" + path: "{{ phpbbforum_style_file }}" vars: phpbbforum_style_file: "/var/www/phpbbforum/www.openmicroscopy.org/community/style.php?id=7&lang=en" From 5a6e6e5f206a3ec3440724868100c968ad614a52 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 14:29:38 +0100 Subject: [PATCH 038/142] fix linting omero/ome-demoserver --- omero/ome-demoserver.yml | 147 ++++++++++++++++++++++++++------------- 1 file changed, 97 insertions(+), 50 deletions(-) diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index b2ab72a4..99efa612 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -1,6 +1,7 @@ # Install OMERO.server, OMERO.web and prepare the OME (UoD/SLS) prerequisites -# To allow the OMERO.web plugins to upgrade, also pass `--extra-vars upgrade_webapps=True` +# To allow the OMERO.web plugins to upgrade +# also pass `--extra-vars upgrade_webapps=True` - hosts: ome-demoservers pre_tasks: @@ -13,7 +14,8 @@ ((ansible_virtualization_type is defined) and (ansible_virtualization_type == "VMware")) - # Perhaps alter the role at https://github.com/openmicroscopy/ansible-role-lvm-partition/ + # Perhaps alter the role at + # https://github.com/openmicroscopy/ansible-role-lvm-partition/ # to make some of the variables non-required. - name: Resize root FS without altering mount options tags: lvm @@ -46,7 +48,8 @@ roles: # Now OME are using RHEL without Spacewalk, the current best-method of - # checking `is server deployed in Dundee/SLS` is checking for the SLS nameservers. + # checking `is server deployed in Dundee/SLS` is + # checking for the SLS nameservers. - role: ome.system_monitor_agent tags: monitoring when: "'10.1.255.216' in ansible_dns.nameservers" @@ -99,10 +102,10 @@ postgresql_databases: - name: omero postgresql_users: - - user: "{{ omero_server_dbuser | default('omero') }}" - password: "{{ omero_server_dbpassword | default('omero') }}" - databases: - - omero + - user: "{{ omero_server_dbuser | default('omero') }}" + password: "{{ omero_server_dbpassword | default('omero') }}" + databases: + - omero - role: ome.omero_server # Defaults overridden in private configuration @@ -119,7 +122,8 @@ - "omero-figure=={{ omero_figure_release }}" - "omero-fpbioimage=={{ omero_fpbioimage_release }}" - "omero-webtagging-autotag=={{ omero_webtagging_autotag_release }}" - - "omero-webtagging-tagsearch=={{ omero_webtagging_tagsearch_release }}" + - "omero-webtagging-tagsearch==\ + {{ omero_webtagging_tagsearch_release }}" - "omero-iviewer=={{ omero_iviewer_release }}" - "omero-parade=={{ omero_parade_release }}" - "omero-signup=={{ omero_signup_release }}" @@ -131,16 +135,17 @@ omero_user_admin_user: root omero_user_admin_pass: "{{ omero_server_rootpassword }}" omero_group_create: - - name: public - type: read-only - - name: "My Data" - type: private + - name: public + type: read-only + - name: "My Data" + type: private omero_user_create: - - login: "{{ secret_omero_web_public_user | default('public') }}" - firstname: Public - lastname: User - password: "{{ secret_omero_web_public_password | default('public') }}" - groups: "--group-name public" + - login: "{{ secret_omero_web_public_user | default('public') }}" + firstname: Public + lastname: User + password: >- + "{{ secret_omero_web_public_password | default('public') }}" + groups: "--group-name public" - role: ome.ssl_certificate tags: ssl @@ -166,9 +171,12 @@ replace: path: "/etc/nginx/nginx.conf" regexp: '^worker_processes\s+\d+;' - replace: "worker_processes {{ ((ansible_processor_count * ansible_processor_cores) / 2) |round|int }};" + replace: >- + "worker_processes {{ ((ansible_processor_count * + ansible_processor_cores) / 2) |round|int }};" - # cf https://www.digitalocean.com/community/tutorials/how-to-optimize-nginx-configuration + # cf https://www.digitalocean.com/community/tutorials/ + # how-to-optimize-nginx-configuration - name: NGINX - Performance tuning - worker connections become: yes replace: @@ -214,7 +222,8 @@ become: yes template: src: templates/omero-web-config-for-webapps.j2 - dest: "{{ omero_web_basedir }}/config/omero-web-config-for-webapps.omero" + dest: >- + "{{ omero_web_basedir }}/config/omero-web-config-for-webapps.omero" owner: "root" group: "root" mode: "u=rw,go=r" @@ -254,7 +263,10 @@ - name: Check_MK postgres plugin | activate the plugin tags: monitoring become: yes - command: cp "{{ check_mk_agent_plugin_path }}/mk_postgres" /usr/share/check-mk-agent/plugins/ creates=/usr/share/check-mk-agent/plugins/mk_postgres + command: > + cp "{{ check_mk_agent_plugin_path }}/mk_postgres" + /usr/share/check-mk-agent/plugins/ + creates=/usr/share/check-mk-agent/plugins/mk_postgres when: check_mk_postgres_plugin_st.stat.exists - name: Check_MK logwatch plugin | check for plugin existence @@ -266,7 +278,10 @@ - name: Check_MK logwatch plugin | activate the plugin tags: monitoring become: yes - command: cp "{{ check_mk_agent_plugin_path }}/mk_logwatch" /usr/share/check-mk-agent/plugins/ creates=/usr/share/check-mk-agent/plugins/mk_logwatch + command: > + cp "{{ check_mk_agent_plugin_path }}/mk_logwatch" + /usr/share/check-mk-agent/plugins/ + creates=/usr/share/check-mk-agent/plugins/mk_logwatch when: check_mk_logwatch_plugin_st.stat.exists - name: Check_MK logwatch plugin | check for default config file @@ -293,7 +308,9 @@ - name: Create a figure scripts directory become: yes file: - path: "{{ omero_server_basedir }}/OMERO.server/lib/scripts/omero/figure_scripts" + path: >- + "{{ omero_server_basedir }}/OMERO.server/lib/ + scripts/omero/figure_scripts" state: directory mode: 0755 recurse: yes @@ -302,27 +319,42 @@ - name: Download the Figure_To_Pdf.py script become: yes get_url: - url: https://raw.githubusercontent.com/ome/omero-figure/{{ omero_figure_script_release }}/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py - dest: "{{ omero_server_basedir }}/OMERO.server/lib/scripts/omero/figure_scripts/Figure_To_Pdf.py" + url: >- + https://raw.githubusercontent.com/ome/omero-figure/ + {{ omero_figure_script_release }}/omero_figure/scripts/omero/ + figure_scripts/Figure_To_Pdf.py + dest: >- + "{{ omero_server_basedir }}/OMERO.server/lib/ + scripts/omero/figure_scripts/Figure_To_Pdf.py" mode: 0755 owner: "omero-server" group: "omero-server" force: yes vars: - omero_figure_release: "{{ omero_figure_release_override | default('5.1.0') }}" - omero_figure_script_release: "{{ omero_figure_script_release_override | default('v5.1.0') }}" - omero_fpbioimage_release: "{{ omero_fpbioimage_release_override | default('0.4.0') }}" - omero_iviewer_release: "{{ omero_iviewer_release_override | default('0.12.0') }}" - omero_parade_release: "{{ omero_parade_release_override | default('0.2.3') }}" - omero_webtagging_autotag_release: "{{ omero_webtagging_autotag_release_override | default('3.2.0') }}" - omero_webtagging_tagsearch_release: "{{ omero_webtagging_tagsearch_release_override | default('3.2.0') }}" - omero_signup_release: "{{ omero_signup_release_override | default('0.3.2') }}" - - omero_server_release: "{{ omero_server_release_override | default('5.6.6') }}" + omero_figure_release: >- + "{{ omero_figure_release_override | default('5.1.0') }}" + omero_figure_script_release: >- + "{{ omero_figure_script_release_override | default('v5.1.0') }}" + omero_fpbioimage_release: >- + "{{ omero_fpbioimage_release_override | default('0.4.0') }}" + omero_iviewer_release: >- + "{{ omero_iviewer_release_override | default('0.12.0') }}" + omero_parade_release: >- + "{{ omero_parade_release_override | default('0.2.3') }}" + omero_webtagging_autotag_release: >- + "{{ omero_webtagging_autotag_release_override | default('3.2.0') }}" + omero_webtagging_tagsearch_release: >- + "{{ omero_webtagging_tagsearch_release_override | default('3.2.0') }}" + omero_signup_release: >- + "{{ omero_signup_release_override | default('0.3.2') }}" + + omero_server_release: >- + "{{ omero_server_release_override | default('5.6.6') }}" omero_web_release: "{{ omero_web_release_override | default('5.16.0') }}" omero_py_release: "{{ omero_py_release_override | default('5.13.1') }}" - # For https://github.com/openmicroscopy/ansible-role-java, which is a dependency. + # For https://github.com/openmicroscopy/ansible-role-java, + # which is a dependency. java_jdk_install: True # Check_MK (system monitoring) paths @@ -331,9 +363,12 @@ check_mk_agent_config_path: /etc/check-mk-agent # Pip versions - omero_cli_duplicate_release: "{{ omero_cli_duplicate_release_override | default('0.4.0') }}" - omero_cli_render_release: "{{ omero_cli_render_release_override | default('0.8.0') }}" - omero_metadata_release: "{{ omero_cli_metadata_release_override | default('0.10.0') }}" + omero_cli_duplicate_release: >- + "{{ omero_cli_duplicate_release_override | default('0.4.0') }}" + omero_cli_render_release: >- + "{{ omero_cli_render_release_override | default('0.8.0') }}" + omero_metadata_release: >- + "{{ omero_cli_metadata_release_override | default('0.10.0') }}" # Signup omero_signup_email_body: >- @@ -343,14 +378,19 @@ password: {password}\n\n Use these login details as follows\n 1. In your browser, go to demo.openmicroscopy.org and log in.\n - 2. Download the OMERO.insight [1] desktop application to import your first data into OMERO.\n - 3. Following the steps in the omero-guide [2], change the server address to\n + 2. Download the OMERO.insight [1] desktop application to im + port your first data into OMERO.\n + 3. Following the steps in the omero-guide [2], change the server ad + dress to\n demo.openmicroscopy.org and connect\n using the login details as above to import your data.\n - 4. Use the walkthrough example [3] to get ideas about how to start using OMERO.\n + 4. Use the walkthrough example [3] to get ideas about ho + w to start using OMERO.\n OME Team\n\n - [1] https://omero-guides.readthedocs.io/en/latest/upload/docs/import-desktop-client.html \n - [2] https://omero-guides.readthedocs.io/en/latest/upload/docs/import-desktop-client.html#step-by-step \n + [1] https://omero-guides.readthedocs.io/en/latest\ + /upload/docs/import-desktop-client.html \n + [2] https://omero-guides.readthedocs.io/en/latest/upload/\ + docs/import-desktop-client.html#step-by-step \n [3] https://omero-guides.readthedocs.io/en/latest/example.html \n' postgresql_version: "11" @@ -394,16 +434,23 @@ omero.mail.config: true omero.mail.from: "{{ omero_server_mail_from }}" omero.mail.host: "{{ omero_server_mail_host }}" - # https://www.openmicroscopy.org/site/support/omero5.3/sysadmins/public.html - omero.web.public.user: "{{ secret_omero_web_public_user | default('public') }}" - omero.web.public.password: "{{ secret_omero_web_public_password | default('public') }}" + # https://www.openmicroscopy.org/site/support + # /omero5.3/sysadmins/public.html + omero.web.public.user: >- + "{{ secret_omero_web_public_user | default('public') }}" + omero.web.public.password: >- + "{{ secret_omero_web_public_password | default('public') }}" omero.web.public.enabled: True omero.web.public.server_id: 1 - omero.web.public.url_filter: "^/(webgateway/(?!(archived_files|download_as))|webclient/annotation/([0-9]+)/)" + omero.web.public.url_filter: >- + "^/(webgateway/(?!(archived_files|download_as))| webclient + /annotation/([0-9]+)/)" omero.web.server_list: [["localhost", 4064, "omero"]] # Advice is (2*cores + 1) from OME docs. - omero.web.wsgi_workers: "{{ (2 * (ansible_processor_count * ansible_processor_cores)) + 1 }}" - omero.web.admins: "{{ omero_web_admins }}" + omero.web.wsgi_workers: >- + "{{ (2 * (ansible_processor_count * + ansible_processor_cores)) + 1 }}" + omero.web.admins: "{{ omero_web_admins }}" # https://pypi.org/project/omero-iviewer/ - set iviewer to default viewer omero.web.viewer.view: omero_iviewer.views.index omero.web.nginx_server_extra_config: From bf11b3ed82b3f0648f73d5be3951d59d3e68766e Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 14:30:22 +0100 Subject: [PATCH 039/142] Fix omero/nightshade-webclients --- omero/nightshade-webclients.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/omero/nightshade-webclients.yml b/omero/nightshade-webclients.yml index 58549332..733fc30c 100644 --- a/omero/nightshade-webclients.yml +++ b/omero/nightshade-webclients.yml @@ -25,7 +25,8 @@ - "omero-py>={{ omero_py_release }}" # Now OME are using RHEL without Spacewalk, the current best-method of - # checking `is server deployed in Dundee/SLS` is checking for the SLS nameservers. + # checking `is server deployed in Dundee/SLS` is + # checking for the SLS nameservers. - role: ome.system_monitor_agent when: "'10.1.255.216' in ansible_dns.nameservers" @@ -57,10 +58,13 @@ replace: dest: "/etc/nginx/nginx.conf" regexp: '^worker_processes\s+\d+;' - replace: "worker_processes {{ ((ansible_processor_count * ansible_processor_cores) / 2) |round|int }};" + replace: >- + "worker_processes {{ ((ansible_processor_count * + ansible_processor_cores) / 2) |round|int }};" # post 2.3 'dest' should be renamed 'path' - # cf https://www.digitalocean.com/community/tutorials/how-to-optimize-nginx-configuration + # cf https://www.digitalocean.com/community/tutorials/ + # how-to-optimize-nginx-configuration - name: NGINX - Performance tuning - worker connections become: yes replace: @@ -106,12 +110,18 @@ omero_web_release: "{{ omero_web_release_override | default('5.16.0') }}" omero_py_release: "{{ omero_py_release_override | default('5.13.1') }}" - omero_figure_release: "{{ omero_figure_release_override | default('5.1.0') }}" - omero_fpbioimage_release: "{{ omero_fpbioimage_release_override | default('0.4.0') }}" - omero_iviewer_release: "{{ omero_iviewer_release_override | default('0.12.0') }}" - omero_parade_release: "{{ omero_parade_release_override | default('0.2.3') }}" - omero_webtagging_autotag_release: "{{ omero_webtagging_autotag_release_override | default('3.2.0') }}" - omero_webtagging_tagsearch_release: "{{ omero_webtagging_tagsearch_release_override | default('3.2.0') }}" + omero_figure_release: >- + "{{ omero_figure_release_override | default('5.1.0') }}" + omero_fpbioimage_release: >- + "{{ omero_fpbioimage_release_override | default('0.4.0') }}" + omero_iviewer_release: >- + "{{ omero_iviewer_release_override | default('0.12.0') }}" + omero_parade_release: >- + "{{ omero_parade_release_override | default('0.2.3') }}" + omero_webtagging_autotag_release: >- + "{{ omero_webtagging_autotag_release_override | default('3.2.0') }}" + omero_webtagging_tagsearch_release: >- + "{{ omero_webtagging_tagsearch_release_override | default('3.2.0') }}" omero_web_apps_names: - omero_figure From f4ad1697cc340e6120e8b476a31e1d24a2cbb371 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 15:09:25 +0100 Subject: [PATCH 040/142] fix linting omero/learning --- omero/learning.yml | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/omero/learning.yml b/omero/learning.yml index 0495c85a..43911400 100644 --- a/omero/learning.yml +++ b/omero/learning.yml @@ -6,7 +6,10 @@ # - Migrate database with pg_dump, pg_restore. # - Upgrade database. # Do run shape_color_argb_to_rgba.sql. -# UPDATE shape SET points = REGEXP_REPLACE(REGEXP_REPLACE(points, '[^\[]*\[([^\]]*).*', '\1'), ', ', ' ', 'g') WHERE discriminator = 'polygon' AND points LIKE 'points[%'; +# UPDATE shape SET points = +# REGEXP_REPLACE(REGEXP_REPLACE(points, '[^\[]*\[([^\]]*).*', +# '\1'), ', ', ' ', 'g') WHERE discriminator = 'polygon' AND points +# LIKE 'points[%'; # - bin/omero db password for root and public users. # - systemctl start omero-{server,web} @@ -90,10 +93,16 @@ - webindex viewname: "webindex_custom" omero.web.ui.top_links: - - ["Virtual Microscope", "webindex", {"title": "Virtual Microscope"}] - - ["HELP", "https://help.openmicroscopy.org/virtual-microscope.html", {"title": "Help", "target": "new"}] + - - "Virtual Microscope" + - "webindex" + - {"title": "Virtual Microscope"} + - - "HELP" + - "https://help.openmicroscopy.org/virtual-microscope.html" + - {"title": "Help", "target": "new"} omero.web.ui.right_plugins: - - ["Acquisition", "webclient/data/includes/right_plugin.acquisition.js.html", "metadata_tab"] + - - "Acquisition" + - "webclient/data/includes/right_plugin.acquisition.js.html" + - "metadata_tab" omero.web.caches: default: BACKEND: django_redis.cache.RedisCache @@ -104,17 +113,27 @@ - "omero_iviewer" - "virtualmicroscope" omero.web.open_with: - - ["Image viewer", "webgateway", {"supported_objects": ["image"], "script_url": "webclient/javascript/ome.openwith_viewer.js"}] - - ["omero_iviewer", "omero_iviewer_index", {"supported_objects": ["images", "dataset", "well"], "script_url": "omero_iviewer/openwith.js", "label": "OMERO.iviewer"}] + - - "Image viewer" + - "webgateway" + - supported_objects: ["image"] + script_url: "webclient/javascript/ome.openwith_viewer.js" + - - "omero_iviewer" + - "omero_iviewer_index" + - supported_objects: ["images", "dataset", "well"] + script_url": "omero_iviewer/openwith.js" + label: "OMERO.iviewer" omero.web.viewer.view: omero_iviewer.views.index omero.web.public.enabled: true - omero.web.public.password: "{{ omero_web_public_password | default('public') }}" + omero.web.public.password: >- + "{{ omero_web_public_password | default('public') }}" omero.web.public.url_filter: "/(webgateway|gallery)/" - omero.web.public.user: "{{ omero_web_public_user | default('public') }}" + omero.web.public.user: >- + "{{ omero_web_public_user | default('public') }}" omero_web_apps_packages: - omero-gallery=={{ omero_web_apps_release.omero_gallery }} - omero-iviewer=={{ omero_web_apps_release.omero_iviewer }} - - omero-virtual-microscope=={{ omero_web_apps_release.omero_virtual_microscope }} + - "omero-virtual-microscope==\ + {{ omero_web_apps_release.omero_virtual_microscope }}" omero_web_python_addons: - "django-redis==5.0.0" - "omero-py>={{ omero_py_release }}" @@ -138,7 +157,8 @@ become: yes replace: path: "{{ item.path }}" - regexp: "(\\\\$\\{omero\\.logfile\\}\\.\\%i)(\\<\\/fileNamePattern\\>)" + regexp: "(\\\\$\\{om\ + ero\\.logfile\\}\\.\\%i)(\\<\\/fileNamePattern\\>)" replace: "\\1.gz\\2" backup: yes with_items: "{{ logbacks.files }}" From b378df80dfc41df43ad235e1673cf2e8674ba7c2 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 15:20:29 +0100 Subject: [PATCH 041/142] fix linting omero/omero-monitoring-agents --- omero/omero-monitoring-agents.yml | 117 ++++++++++++++++-------------- 1 file changed, 61 insertions(+), 56 deletions(-) diff --git a/omero/omero-monitoring-agents.yml b/omero/omero-monitoring-agents.yml index 6d4f724a..fda456c9 100644 --- a/omero/omero-monitoring-agents.yml +++ b/omero/omero-monitoring-agents.yml @@ -4,35 +4,38 @@ roles: - - role: ome.prometheus_jmx + - role: ome.prometheus_jmx - - role: ome.prometheus_postgres - prometheus_postgres_dbname: omero + - role: ome.prometheus_postgres + prometheus_postgres_dbname: omero - # For restart handlers - - role: ome.omero_common + # For restart handlers + - role: ome.omero_common - - role: ome.omero_prometheus_exporter - omero_prometheus_exporter_omero_user: "{{ secret_omero_prometheus_exporter_omero_user | default('root') }}" - omero_prometheus_exporter_omero_password: "{{ secret_omero_prometheus_exporter_omero_password | default('omero') }}" + - role: ome.omero_prometheus_exporter + omero_prometheus_exporter_omero_user: >- + "{{ secret_omero_prometheus_exporter_omero_user | default('root') }}" + omero_prometheus_exporter_omero_password: >- + "{{ secret_omero_prometheus_exporter_omero_password + | default('omero') }}" tasks: - - name: omero-server prometheus jmx agents - become: yes - copy: - dest: "{{ omero_common_basedir }}/server/config/prometheus.omero" - src: omero-server-config-prometheus.omero - mode: 0644 - notify: - - restart omero-server + - name: omero-server prometheus jmx agents + become: yes + copy: + dest: "{{ omero_common_basedir }}/server/config/prometheus.omero" + src: omero-server-config-prometheus.omero + mode: 0644 + notify: + - restart omero-server - hosts: omero-web roles: - - role: ome.omero_web_django_prometheus + - role: ome.omero_web_django_prometheus # NOTE: This assumes omero-web.conf is present and includes @@ -41,46 +44,48 @@ roles: - - role: ome.prometheus_node + - role: ome.prometheus_node # Autodetect whether selinux is enabled - - role: ome.selinux_utils + - role: ome.selinux_utils tasks: - - name: nginx selinux allow network connect - become: yes - seboolean: - name: httpd_can_network_connect - state: yes - persistent: yes - when: selinux_enabled - - - name: Create monitoring htpasswd - become: yes - copy: - content: "{{ secret_monitoring_nginx_htpasswd | default(monitoring_nginx_htpasswd) }}" - dest: /etc/nginx/monitoring.htpasswd - mode: 0644 - - # This is fine to apply to all servers because if an exporter doesn't - # exist it will return an error, and we know which exporters to expect - # when scraping - - name: Create nginx proxy for prometheus exporters - become: yes - copy: - dest: /etc/nginx/conf.d-nested-includes/proxy-exporters.conf - src: confd-nested-proxy-exporters.conf - mode: 0644 - notify: - - restart nginx + - name: nginx selinux allow network connect + become: yes + seboolean: + name: httpd_can_network_connect + state: yes + persistent: yes + when: selinux_enabled + + - name: Create monitoring htpasswd + become: yes + copy: + content: >- + "{{ secret_monitoring_nginx_htpasswd | + default(monitoring_nginx_htpasswd) }}" + dest: /etc/nginx/monitoring.htpasswd + mode: 0644 + + # This is fine to apply to all servers because if an exporter doesn't + # exist it will return an error, and we know which exporters to expect + # when scraping + - name: Create nginx proxy for prometheus exporters + become: yes + copy: + dest: /etc/nginx/conf.d-nested-includes/proxy-exporters.conf + src: confd-nested-proxy-exporters.conf + mode: 0644 + notify: + - restart nginx handlers: - - name: restart nginx - become: yes - service: - name: nginx - state: restarted + - name: restart nginx + become: yes + service: + name: nginx + state: restarted vars: # monitoring:monitoring @@ -98,11 +103,11 @@ src: confd-nested-proxy-exporters-web.conf mode: 0644 notify: - - restart nginx + - restart nginx handlers: - - name: restart nginx - become: yes - service: - name: nginx - state: restarted + - name: restart nginx + become: yes + service: + name: nginx + state: restarted From 1bcb81ef231f23b9789aa0f2f6da8af6dc721404 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 15:30:30 +0100 Subject: [PATCH 042/142] fix linting omero/sls-gallery --- omero/sls-gallery.yml | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/omero/sls-gallery.yml b/omero/sls-gallery.yml index 9fac1d1c..22994ddb 100644 --- a/omero/sls-gallery.yml +++ b/omero/sls-gallery.yml @@ -92,9 +92,17 @@ args: - userdata omero.web.ui.top_links: - - ["Image Gallery", "webindex", {"title": "Image Gallery"}] - - ["HELP", "https://help.openmicroscopy.org/web-client.html", {"title": "Help", "target": "new"}] - - ["SLS Homepage", "https://www.lifesci.dundee.ac.uk/", {"title": "SLS Homepage", "target": "new"}] + - - "Image Gallery" + - "webindex" + - title: "Image Gallery" + - - "HELP" + - "https://help.openmicroscopy.org/web-client.html" + - title: "Help" + target": "new" + - - "SLS Homepage" + - "https://www.lifesci.dundee.ac.uk/" + - title: "SLS Homepage" + target: "new" omero.web.caches: default: BACKEND: django_redis.cache.RedisCache @@ -103,8 +111,15 @@ omero.web.apps: - "omero_iviewer" omero.web.open_with: - - ["Image viewer", "webgateway", {"supported_objects": ["image"], "script_url": "webclient/javascript/ome.openwith_viewer.js"}] - - ["omero_iviewer", "omero_iviewer_index", {"supported_objects": ["images", "dataset", "well"], "script_url": "omero_iviewer/openwith.js", "label": "OMERO.iviewer"}] + - - "Image viewer" + - "webgateway" + - supported_objects: ["image"] + script_url: "webclient/javascript/ome.openwith_viewer.js" + - - "omero_iviewer" + - "omero_iviewer_index" + - supported_objects": ["images", "dataset", "well"] + script_url": "omero_iviewer/openwith.js" + label: "OMERO.iviewer" omero.web.viewer.view: omero_iviewer.views.index omero_web_apps_packages: - omero-iviewer=={{ omero_web_apps_release.omero_iviewer }} @@ -124,7 +139,8 @@ become: yes replace: path: "{{ item.path }}" - regexp: "(\\\\$\\{omero\\.logfile\\}\\.\\%i)(\\<\\/fileNamePattern\\>)" + regexp: "(\\\\$\\{om\ + ero\\.logfile\\}\\.\\%i)(\\<\\/fileNamePattern\\>)" replace: "\\1.gz\\2" backup: yes with_items: "{{ logbacks.files }}" From d307cb9bcc30c5cba9b463a5f682dc3b4fe7e5f3 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 15:51:24 +0100 Subject: [PATCH 043/142] finx linting omero/ome-dundeeomero --- omero/ome-dundeeomero.yml | 65 +++++++++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 20 deletions(-) diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index 9fe5d0c9..19ae212b 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -12,7 +12,8 @@ and (ansible_virtualization_type == "VMware")) and not (molecule_test | default(False)) - # Perhaps alter the role at https://github.com/openmicroscopy/ansible-role-lvm-partition/ + # Perhaps alter the role at + # https://github.com/openmicroscopy/ansible-role-lvm-partition/ # to make some of the variables non-required. - name: Resize root FS without altering mount options tags: lvm @@ -26,10 +27,12 @@ - name: Install Make Movie script Prerequisite | MEncoder - Repo become: yes yum: - name: http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm + name: "http://li.nux.ro/download/nux/dextop/el7\ + /x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm" state: present - - name: OMERO.figure server-side prerequisites, script prerequisites + web server for decoupled OMERO.web + # web server is included for decoupled OMERO.web + - name: OMERO.figure server-side&script prerequisites & web server become: yes yum: name: "{{ item }}" @@ -107,7 +110,9 @@ tasks: - - name: Create another temporary directory since OMERO doesn't limit sizes and fills up /tmp + # OMERO doesn't limit sizes and fills up /tmp + # thus we need to create another tmp + - name: Create another temporary directory become: yes file: path: "{{ omero_server_systemd_environment.OMERO_TMPDIR }}" @@ -132,7 +137,8 @@ - restart nginx # post 2.3 'dest' should be renamed 'path' - # cf https://www.digitalocean.com/community/tutorials/how-to-optimize-nginx-configuration + # cf https://www.digitalocean.com/community/tutorials/how + # -to-optimize-nginx-configuration - name: NGINX - Performance tuning - worker connections become: yes replace: @@ -177,8 +183,11 @@ - name: Download the Figure_To_Pdf.py script become: yes get_url: - url: https://raw.githubusercontent.com/ome/omero-figure/v{{ omero_figure_release }}/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py - dest: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts/Figure_To_Pdf.py + url: "https://raw.githubusercontent.com/ome/omero-figure\ + /v{{ omero_figure_release }}/omero_figure/scripts\ + /omero/figure_scripts/Figure_To_Pdf.py" + dest: "/opt/omero/server/OMERO.server/lib/scripts\ + /omero/figure_scripts/Figure_To_Pdf.py" mode: 0644 owner: root force: yes @@ -186,8 +195,11 @@ - name: Download the Dataset_Images_To_New_Figure.py script become: yes get_url: - url: https://raw.githubusercontent.com/ome/omero-guide-figure/f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Dataset_Images_To_New_Figure.py - dest: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts/Dataset_Images_To_New_Figure.py + url: "https://raw.githubusercontent.com/ome/omero-guide-figure + /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Dataset\ + _Images_To_New_Figure.py" + dest: "/opt/omero/server/OMERO.server/lib/scripts\ + /omero/figure_scripts/Dataset_Images_To_New_Figure.py" mode: 0644 owner: root force: yes @@ -195,47 +207,60 @@ - name: Download the Figure_Images_To_Dataset.py script become: yes get_url: - url: https://raw.githubusercontent.com/ome/omero-guide-figure/f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Figure_Images_To_Dataset.py - dest: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts/Figure_Images_To_Dataset.py + url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ + /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Figure\ + _Images_To_Dataset.py" + dest: "/opt/omero/server/OMERO.server/lib/scripts\ + /omero/figure_scripts/Figure_Images_To_Dataset.py" mode: 0644 owner: root force: yes vars: - # For https://github.com/openmicroscopy/ansible-role-java, which is a dependency. + # For https://github.com/openmicroscopy/ansible-role-java + # which is a dependency. java_jdk_install: True nginx_version: 1.18.0 postgresql_version: "11" filesystem: "xfs" - omero_figure_release: "{{ omero_figure_release_override | default('5.1.0') }}" + omero_figure_release: >- + {{ omero_figure_release_override | default('5.1.0') }} omero_py_release: "{{ omero_py_release_override | default('5.13.1') }}" omero_server_config_set_production: omero.db.poolsize: 60 - omero.fs.repo.path: "%user%_%userId%/%thread%//%year%-%month%/%day%/%time%" + omero.fs.repo.path: >- + %user%_%userId%/%thread%//%year%-%month%/%day%/%time% omero.jvmcfg.percent.blitz: 50 omero.jvmcfg.percent.indexer: 20 omero.jvmcfg.percent.pixeldata: 20 omero.jvmcfg.system_memory: 17000 omero.ldap.base: "{{ omero_server_ldap_base | default('example') }}" omero.ldap.config: true - omero.ldap.urls: "{{ omero_server_ldap_urls | default('ldap://example.org') }}" + omero.ldap.urls: >- + {{ omero_server_ldap_urls | default('ldap://example.org') }} omero.mail.config: true - omero.mail.from: "{{ omero_server_mail_from | default('omero@example.org') }}" - omero.mail.host: "{{ omero_server_mail_host | default('smtp.example.org') }}" + omero.mail.from: >- + {{ omero_server_mail_from | default('omero@example.org') }} + omero.mail.host: >- + {{ omero_server_mail_host | default('smtp.example.org') }} omero.ldap.new_user_group: "My Data" omero.search.batch: 100 omero.security.password_provider: chainedPasswordProvider431 omero.throttling.method_time.error: 60000 - omero.Ice.Default.Host: "{{ omero_server_ice_default_host | default('127.0.0.1') }}" - Ice.Admin.Endpoints: "{{ omero_server_ice_admin_endpoints | default('tcp -h 127.0.0.1') }}" + omero.Ice.Default.Host: >- + {{ omero_server_ice_default_host | default('127.0.0.1') }} + Ice.Admin.Endpoints: >- + {{ omero_server_ice_admin_endpoints | default('tcp -h 127.0.0.1') }} omero.data.dir: "{{ omero_server_datadir | default('/OMERO') }}" omero_server_selfsigned_certificates: True # Production config can't be tested in molecule - omero_server_config_set: "{{ molecule_test | default(False) | ternary({}, omero_server_config_set_production) }}" + omero_server_config_set: >- + {{ molecule_test | default(False) | + ternary({}, omero_server_config_set_production) }} omero_server_python_addons: # For OMERO.figure script - "reportlab<3.6" From 07ced47f369132fbb6e0dc05ec570dc54e720e2e Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 15:55:42 +0100 Subject: [PATCH 044/142] fix linting omero/omero-firewall --- omero/omero-firewall.yml | 113 ++++++++++++++++++++------------------- 1 file changed, 57 insertions(+), 56 deletions(-) diff --git a/omero/omero-firewall.yml b/omero/omero-firewall.yml index d88b4f0e..66a2b8b3 100644 --- a/omero/omero-firewall.yml +++ b/omero/omero-firewall.yml @@ -4,64 +4,65 @@ roles: - - role: ome.iptables_raw + - role: ome.iptables_raw tasks: - # Allow: - # - all established/related in/out - # - all internal localhost connections - # - ICMP echo (ping) - # - ssh incoming connections - - name: Iptables ssh and related - become: yes - iptables_raw_25: - name: ssh_and_established - keep_unmanaged: no - rules: | - -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT - -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT - -A INPUT -i lo -j ACCEPT - -A INPUT -p icmp --icmp-type echo-request -j ACCEPT - -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT - state: present - # Highest priority - weight: 0 + # Allow: + # - all established/related in/out + # - all internal localhost connections + # - ICMP echo (ping) + # - ssh incoming connections + - name: Iptables ssh and related + become: yes + iptables_raw_25: + name: ssh_and_established + keep_unmanaged: no + rules: | + -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT + -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT + -A INPUT -i lo -j ACCEPT + -A INPUT -p icmp --icmp-type echo-request -j ACCEPT + -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT + state: present + # Highest priority + weight: 0 - # Use a low priority REJECT rule so that clients can detect when - # they've been rejected - # The alternative of setting a default DROP policy will leave them - # hanging until they timeout, though this may be preferable for public - # servers: - # http://www.chiark.greenend.org.uk/~peterb/network/drop-vs-reject - - name: Iptables default - become: yes - iptables_raw_25: - name: default_rules - rules: | - -A INPUT -j REJECT - -A FORWARD -j REJECT - -A OUTPUT -j ACCEPT - state: present - # Lowest priority - weight: 99 + # Use a low priority REJECT rule so that clients can detect when + # they've been rejected + # The alternative of setting a default DROP policy will leave them + # hanging until they timeout, though this may be preferable for public + # servers: + # http://www.chiark.greenend.org.uk/~peterb/network/drop-vs-reject + - name: Iptables default + become: yes + iptables_raw_25: + name: default_rules + rules: | + -A INPUT -j REJECT + -A FORWARD -j REJECT + -A OUTPUT -j ACCEPT + state: present + # Lowest priority + weight: 99 - # All other ports that allow incoming connections: - # - web - # - omero - # - GPFS - # - Check_MK - - name: Iptables OME ports - become: yes - iptables_raw_25: - name: ome_ports - rules: | - -A INPUT -p tcp -m multiport --dports 80,443 -j ACCEPT - -A INPUT -p tcp -m multiport --dports 4063,4064 -j ACCEPT - {% for s in gpfs_cluster_source | default([]) %} - -A INPUT -p tcp -m tcp --dport 1191 -s {{ s }} -j ACCEPT - {% endfor %} - {% if (checkmk_server_source | default('')) %} - -A INPUT -p tcp -m tcp --dport 6556 -s {{ checkmk_server_source }} -j ACCEPT - {% endif %} - state: present + # All other ports that allow incoming connections: + # - web + # - omero + # - GPFS + # - Check_MK + - name: Iptables OME ports + become: yes + iptables_raw_25: + name: ome_ports + rules: | + -A INPUT -p tcp -m multiport --dports 80,443 -j ACCEPT + -A INPUT -p tcp -m multiport --dports 4063,4064 -j ACCEPT + {% for s in gpfs_cluster_source | default([]) %} + -A INPUT -p tcp -m tcp --dport 1191 -s {{ s }} -j ACCEPT + {% endfor %} + {% if (checkmk_server_source | default('')) %} + -A INPUT -p tcp -m tcp --dport 6556 -s + {{ checkmk_server_source }} -j ACCEPT + {% endif %} + state: present From 08cf6f387bd817f62150b5149436be55f68e88c1 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 16:54:45 +0100 Subject: [PATCH 045/142] fix linting omero/training-server/playbook --- omero/training-server/playbook.yml | 142 +++++++++++++++++++++-------- 1 file changed, 102 insertions(+), 40 deletions(-) diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index bbd3095c..f174e4d7 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -9,10 +9,12 @@ - name: Install Make Movie script Prerequisite | MEncoder - Repo become: yes yum: - name: http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm + name: "http://li.nux.ro/download/nux/dextop/el7/x86_64\ + /nux-dextop-release-0-5.el7.nux.noarch.rpm" state: present - - name: OMERO.figure server-side prerequisites, script prerequisites + web server for decoupled OMERO.web + # web server is included for decoupled OMERO.web + - name: OMERO.figure server-side&script prerequisites & web server become: yes yum: name: "{{ item }}" @@ -31,7 +33,8 @@ - gcc - python-ldap - # Since Nginx isn't installed until later the directories are created in advance + # Since Nginx isn't installed until later + # the directories are created in advance - name: Create nginx include directories become: yes file: @@ -54,11 +57,11 @@ - role: ome.postgresql postgresql_databases: - - name: omero - postgresql_users: - - user: omero - password: omero - databases: [omero] + - name: omero + postgresql_users: + - user: omero + password: omero + databases: [omero] - role: ome.postgresql_backup postgresql_backup_compress: true @@ -101,7 +104,9 @@ - gallery_settings/ - cell/ - tissue/ - - webclient/(?!({{ idr_omero_web_public_url_filters_webclient_exclude | join('|') }})) + - > + webclient/(?!({{ idr_omero_web_public_url_filters_webclient_exclude + | join('|') }})) - webgateway/(?!(archived_files|download_as)) omero_web_python_addons: - "omero-py>={{ omero_py_release }}" @@ -116,20 +121,51 @@ - "omero_parade" - "omero_mapr" omero.web.ui.center_plugins: - - ["Auto Tag", "omero_webtagging_autotag/auto_tag_init.js.html", "auto_tag_panel"] - - ["Parade", "omero_parade/init.js.html", "omero_parade"] + - - "Auto Tag" + - "omero_webtagging_autotag/auto_tag_init.js.html" + - "auto_tag_panel" + - - "Parade" + - "omero_parade/init.js.html" + - "omero_parade" omero.web.ui.top_links: - - ["Data", "webindex", {"title": "Browse Data via Projects, Tags etc"}] - - ["History", "history", {"title": "History"}] - - ["Help", "https://help.openmicroscopy.org/", {"title": "Open OMERO user guide in a new tab", "target": "new"}] - - ["Figure", "figure_index", {"title": "Open Figure in new tab", "target": "_blank"}] - - ["Tag Search", "tagsearch"] - - ["Genes", {"query_string": {"experimenter": -1}, "viewname": "maprindex_gene"}, {"title": "Find Gene annotations"}] - - ["Key-Value", {"viewname": "maprindex_keyvalue"}, {"title": "Search for manually-added Key-Value pairs"}] + - - "Data" + - "webindex" + - title: "Browse Data via Projects, Tags etc" + - - "History" + - "history" + - title: "History" + - - "Help" + - "https://help.openmicroscopy.org/" + - title: "Open OMERO user guide in a new tab" + target: "new" + - - "Figure" + - "figure_index" + - title: "Open Figure in new tab" + target: "_blank" + - - "Tag Search" + - "tagsearch" + - - "Genes" + - query_string: {"experimenter": -1} + viewname: "maprindex_gene" + - title": "Find Gene annotations" + - - "Key-Value" + - viewname: "maprindex_keyvalue" + - title: "Search for manually-added Key-Value pairs" omero.web.open_with: - - ["Image viewer", "webgateway", {"supported_objects": ["image"], "script_url": "webclient/javascript/ome.openwith_viewer.js"}] - - ["omero_figure", "new_figure", {"supported_objects":["images"], "target": "_blank", "label": "OMERO.figure"}] - - ["omero_fpbioimage", "fpbioimage_index", {"supported_objects":["image"], "script_url": "fpbioimage/openwith.js", "label": "FPBioimage"}] + - - "Image viewer" + - "webgateway" + - supported_objects: ["image"] + script_url: "webclient/javascript/ome.openwith_viewer.js" + - - omero_figure + - new_figure + - supported_objects: ["images"] + target: "_blank" + label: "OMERO.figure" + - - omero_fpbioimage + - fpbioimage_index + - supported_objects: ["image"] + script_url: "fpbioimage/openwith.js" + label: "FPBioimage" - - omero_iviewer - omero_iviewer_index - supported_objects: @@ -172,15 +208,18 @@ } omero.web.public.enabled: true - omero.web.public.password: "{{ omero_web_public_password_override | default('secret') }}" - omero.web.public.url_filter: "^/({{ idr_omero_web_public_url_filters | join('|') }})" - omero.web.public.user: "{{ omero_web_public_user_override | default('secret') }}" + omero.web.public.password: >- + {{ omero_web_public_password_override | default('secret') }} + omero.web.public.url_filter: >- + ^/({{ idr_omero_web_public_url_filters | join('|') }}) + omero.web.public.user: >- + {{ omero_web_public_user_override | default('secret') }} - role: ome.iptables_raw - role: ome.docker docker_additional_options: - # Manually configure to avoid conflicts between Docker and system rules + # Manually configure to avoid conflicts betw Docker and system rules iptables: false - role: ome.cli_utils @@ -205,8 +244,12 @@ - name: Download the Figure_To_Pdf.py script become: yes get_url: - url: https://raw.githubusercontent.com/ome/omero-figure/v{{ omero_figure_release }}/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py - dest: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts/Figure_To_Pdf.py + url: >- + https://raw.githubusercontent.com/ome/omero-figure/v{{ + omero_figure_release + }}/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py + dest: "/opt/omero/server/OMERO.server/lib/scripts\ + /omero/figure_scripts/Figure_To_Pdf.py" mode: 0755 owner: "omero-server" group: "omero-server" @@ -215,8 +258,11 @@ - name: Download the Dataset_Images_To_New_Figure.py script become: yes get_url: - url: https://raw.githubusercontent.com/ome/omero-guide-figure/f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Dataset_Images_To_New_Figure.py - dest: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts/Dataset_Images_To_New_Figure.py + url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ + /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts\ + /Dataset_Images_To_New_Figure.py" + dest: "/opt/omero/server/OMERO.server/lib/scripts\ + /omero/figure_scripts/Dataset_Images_To_New_Figure.py" mode: 0755 owner: "omero-server" group: "omero-server" @@ -225,8 +271,11 @@ - name: Download the Figure_Images_To_Dataset.py script become: yes get_url: - url: https://raw.githubusercontent.com/ome/omero-guide-figure/f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Figure_Images_To_Dataset.py - dest: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts/Figure_Images_To_Dataset.py + url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ + /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts\ + /Figure_Images_To_Dataset.py" + dest: "/opt/omero/server/OMERO.server/lib/scripts\ + /omero/figure_scripts/Figure_Images_To_Dataset.py" mode: 0755 owner: "omero-server" group: "omero-server" @@ -235,7 +284,8 @@ - name: Create a workshop_scripts directory become: yes file: - path: /opt/omero/server/OMERO.server/lib/scripts/omero/workshop_scripts + path: "/opt/omero/server/OMERO.server/lib/scripts\ + /omero/workshop_scripts" state: directory mode: 0755 recurse: yes @@ -245,8 +295,11 @@ - name: Download the Scipy_Gaussian_Filter.py script become: yes get_url: - url: https://raw.githubusercontent.com/ome/omero-guide-python/v{{ ome_training_scripts_release }}/scripts/scipy_gaussian_filter.py - dest: /opt/omero/server/OMERO.server/lib/scripts/omero/workshop_scripts/Scipy_Gaussian_Filter.py + url: >- + https://raw.githubusercontent.com/ome/omero-guide-python/v{{ + ome_training_scripts_release }}/scripts/scipy_gaussian_filter.py + dest: "/opt/omero/server/OMERO.server/lib/scripts\ + /omero/workshop_scripts/Scipy_Gaussian_Filter.py" mode: 0755 owner: "omero-server" group: "omero-server" @@ -255,8 +308,11 @@ - name: Download the simple_frap.py script become: yes get_url: - url: https://raw.githubusercontent.com/ome/omero-guide-python/v{{ ome_training_scripts_release }}/scripts/simple_frap.py - dest: /opt/omero/server/OMERO.server/lib/scripts/omero/workshop_scripts/simple_frap.py + url: >- + https://raw.githubusercontent.com/ome/omero-guide-python/v{{ + ome_training_scripts_release }}/scripts/simple_frap.py + dest: "/opt/omero/server/OMERO.server/lib/scripts\ + /omero/workshop_scripts/simple_frap.py" mode: 0755 owner: "omero-server" group: "omero-server" @@ -265,8 +321,11 @@ - name: Download the simple_frap_with_figure.py script become: yes get_url: - url: https://raw.githubusercontent.com/ome/omero-guide-python/v{{ ome_training_scripts_release }}/scripts/simple_frap_with_figure.py - dest: /opt/omero/server/OMERO.server/lib/scripts/omero/workshop_scripts/simple_frap_with_figure.py + url: >- + https://raw.githubusercontent.com/ome/omero-guide-python/v{{ + ome_training_scripts_release }}/scripts/simple_frap_with_figure.py + dest: "/opt/omero/server/OMERO.server/lib/scripts\ + /omero/workshop_scripts/simple_frap_with_figure.py" mode: 0755 owner: "omero-server" group: "omero-server" @@ -283,7 +342,9 @@ - name: Download the ldap scripts become: yes get_url: - url: https://raw.githubusercontent.com/openmicroscopy/apacheds-docker/{{ apache_docker_release }}/bin/ldapmanager + url: >- + https://raw.githubusercontent.com/openmicroscopy/apacheds-docker/{{ + apache_docker_release }}/bin/ldapmanager dest: /home/ldap/ldapmanager mode: 0755 force: yes @@ -304,7 +365,8 @@ name: "importer1" state: present groups: "{{ omero_server_system_managedrepo_group }}" - password: "{{ os_system_users_password | password_hash('sha512', 'ome') }}" + password: >- + {{ os_system_users_password | password_hash('sha512', 'ome') }} - name: Allow managed repo group to login become: yes From 8c84e7a3e7e133bc54248837ee09ccd7e026f29c Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 17:04:24 +0100 Subject: [PATCH 046/142] fix linting omero/training-server/letsencrypt --- omero/training-server/letsencrypt.yml | 36 +++++++++++++++------------ 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/omero/training-server/letsencrypt.yml b/omero/training-server/letsencrypt.yml index c9893927..e91954dd 100644 --- a/omero/training-server/letsencrypt.yml +++ b/omero/training-server/letsencrypt.yml @@ -18,7 +18,8 @@ # Assume Nginx is already installed # - role: ome.nginx - # If we're not using letsencrypt assume this is CI so use a self-signed cert + # If we're not using letsencrypt assume this is CI + # so use a self-signed cert - role: ome.ssl_certificate when: not (https_letsencrypt_enabled | default(False)) @@ -38,7 +39,8 @@ certbot_auto_renew_args: --webroot --webroot-path /srv/www/letsencrypt/ # May be useful for testing: #certbot_create_args: --test-cert - #certbot_auto_renew_args: --test-cert --force-renewal --webroot --webroot-path /srv/www/letsencrypt/ + #certbot_auto_renew_args: --test-cert --force-renewal + #--webroot --webroot-path /srv/www/letsencrypt/ # WARNING: If you have a test certificate and need to convert it to a # real certificate you may need to run # rm -rf /etc/letsencrypt/* @@ -46,27 +48,29 @@ tasks: - - name: letsencrypt nginx configuration - become: yes - template: - src: templates/nginx-letsencrypt-conf.j2 - dest: /etc/nginx/conf.d-nested-includes/https.conf - mode: 0644 - notify: - - reload nginx + - name: letsencrypt nginx configuration + become: yes + template: + src: templates/nginx-letsencrypt-conf.j2 + dest: /etc/nginx/conf.d-nested-includes/https.conf + mode: 0644 + notify: + - reload nginx handlers: - - name: reload nginx - become: yes - service: - name: nginx - state: reloaded + - name: reload nginx + become: yes + service: + name: nginx + state: reloaded vars: # Must be defined somewhere # https_certificate_domain: letsencrypt_email: sysadmin@openmicroscopy.org # This must match the expectations of certbot, do not change this: - https_letsencrypt_cert_path: "/etc/letsencrypt/live/{{ https_certificate_domain | default('localhost') }}" + https_letsencrypt_cert_path: >- + /etc/letsencrypt/live/{{ https_certificate_domain + | default('localhost') }} # In production set this to True: # https_letsencrypt_enabled: From 2d28dd6c79b26a3705b60fff2257a925a48107da Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 17:10:40 +0100 Subject: [PATCH 047/142] fix linting omero/training-server/maintenance/omero-restoredb --- .../maintenance/omero-restoredb.yml | 99 ++++++++++--------- 1 file changed, 51 insertions(+), 48 deletions(-) diff --git a/omero/training-server/maintenance/omero-restoredb.yml b/omero/training-server/maintenance/omero-restoredb.yml index 4455f3fa..5a98824d 100644 --- a/omero/training-server/maintenance/omero-restoredb.yml +++ b/omero/training-server/maintenance/omero-restoredb.yml @@ -11,7 +11,8 @@ # Required runtime variables: # - omero_restore_host: The target training server -# - omero_restore_data_host: The file server containing the archived repository +# - omero_restore_data_host: The file server +# containing the archived repository # E.g. # ansible-playbook omero-restoredb.yml --step @@ -22,60 +23,62 @@ - hosts: "{{ omero_restore_host }}" vars: - omero_restore_data_dump_file: /uod/idr/repos/outreach/outreach-omero-20190710/outreach-OMERO-20190710-1550.tar - omero_restore_db_dump_file: /uod/idr/repos/outreach/outreach-omero-20190710/omero-database-omero-20190710-154903-139204.pgdump + omero_restore_data_dump_file: "/uod/idr/repos/outreach/outreach\ + -omero-20190710/outreach-OMERO-20190710-1550.tar" + omero_restore_db_dump_file: "/uod/idr/repos/outreach/outreach-omero\ + -20190710/omero-database-omero-20190710-154903-139204.pgdump" tasks: # This may take a long time with no output - - name: Copy files - # Don't become root, this should ensure ssh forwarding works - synchronize: - src: "{{ item }}" - dest: "/tmp/{{ item | basename }}" - partial: true - delegate_to: "{{ omero_restore_data_host }}" - with_items: - - "{{ omero_restore_data_dump_file }}" - - "{{ omero_restore_db_dump_file }}" + - name: Copy files + # Don't become root, this should ensure ssh forwarding works + synchronize: + src: "{{ item }}" + dest: "/tmp/{{ item | basename }}" + partial: true + delegate_to: "{{ omero_restore_data_host }}" + with_items: + - "{{ omero_restore_data_dump_file }}" + - "{{ omero_restore_db_dump_file }}" - - name: Stop OMERO.server - become: true - service: - name: omero-server - state: stopped + - name: Stop OMERO.server + become: true + service: + name: omero-server + state: stopped - # Assumes the owner and group information in the archive is correct - - name: Restore OMERO data directory - become: true - unarchive: - src: "/tmp/{{ omero_restore_data_dump_file | basename }}" - dest: / - remote_src: true + # Assumes the owner and group information in the archive is correct + - name: Restore OMERO data directory + become: true + unarchive: + src: "/tmp/{{ omero_restore_data_dump_file | basename }}" + dest: / + remote_src: true - - name: Restore OMERO database - become: true - become_user: postgres - command: >- - pg_restore --clean -d omero - "/tmp/{{ omero_restore_db_dump_file | basename }}" + - name: Restore OMERO database + become: true + become_user: postgres + command: >- + pg_restore --clean -d omero + "/tmp/{{ omero_restore_db_dump_file | basename }}" - - name: Upgrade OMERO database - become: omero-server - command: >- - /opt/omero/omego/bin/omego db upgrade - --serverdir /opt/omero/server/OMERO.server + - name: Upgrade OMERO database + become: omero-server + command: >- + /opt/omero/omego/bin/omego db upgrade + --serverdir /opt/omero/server/OMERO.server - - name: Start OMERO.server - become: true - service: - name: omero-server - state: started + - name: Start OMERO.server + become: true + service: + name: omero-server + state: started - - name: Delete temporary files - file: - path: "/tmp/{{ item | basename }}" - state: absent - with_items: - - "{{ omero_restore_data_dump_file }}" - - "{{ omero_restore_db_dump_file }}" + - name: Delete temporary files + file: + path: "/tmp/{{ item | basename }}" + state: absent + with_items: + - "{{ omero_restore_data_dump_file }}" + - "{{ omero_restore_db_dump_file }}" From 0c38b1e91672e9a24144e22c5553e07da3721aa3 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 17:12:15 +0100 Subject: [PATCH 048/142] fix linting web-proxy/playbook --- web-proxy/playbook.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/web-proxy/playbook.yml b/web-proxy/playbook.yml index 9c6f3e81..f6796046 100644 --- a/web-proxy/playbook.yml +++ b/web-proxy/playbook.yml @@ -3,22 +3,22 @@ - hosts: web-proxies roles: - - role: ome.network - tags: network - - role: ome.lvm_partition - tags: lvm - lvm_lvname: root - lvm_lvmount: / - lvm_lvsize: "{{ root_size }}" - lvm_lvfilesystem: "{{ root_filesystem }}" - - role: ome.lvm_partition - tags: lvm - lvm_lvname: var_log - lvm_lvmount: /var/log - lvm_lvsize: "{{ varlog_size }}" - lvm_lvfilesystem: "{{ root_filesystem }}" - - role: ome.ssl_certificate - - role: ome.nginx_proxy + - role: ome.network + tags: network + - role: ome.lvm_partition + tags: lvm + lvm_lvname: root + lvm_lvmount: / + lvm_lvsize: "{{ root_size }}" + lvm_lvfilesystem: "{{ root_filesystem }}" + - role: ome.lvm_partition + tags: lvm + lvm_lvname: var_log + lvm_lvmount: /var/log + lvm_lvsize: "{{ varlog_size }}" + lvm_lvfilesystem: "{{ root_filesystem }}" + - role: ome.ssl_certificate + - role: ome.nginx_proxy handlers: - name: reload nginx From 192fc06f1d41577787487181ed19e374f5d73712 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 17:14:40 +0100 Subject: [PATCH 049/142] fix linting bootstrap/playbook --- bootstrap/playbook.yml | 47 +++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/bootstrap/playbook.yml b/bootstrap/playbook.yml index acf7301d..763b1558 100644 --- a/bootstrap/playbook.yml +++ b/bootstrap/playbook.yml @@ -1,34 +1,35 @@ --- -# Playbook which runs the necessary root-level steps so that a host can be managed by others +# Playbook which runs the necessary root-level steps +# so that a host can be managed by others - hosts: omedev roles: - - role: ome.network + - role: ome.network - - role: ome.lvm_partition - lvm_lvname: var_log - lvm_lvmount: /var/log - lvm_lvsize: 4g - lvm_lvfilesystem: xfs - lvm_vgname: VolGroup00 - - role: ome.lvm_partition - lvm_lvname: root - lvm_lvmount: / - lvm_lvsize: 100%FREE - lvm_lvfilesystem: xfs - lvm_vgname: VolGroup00 - lvm_shrink: False + - role: ome.lvm_partition + lvm_lvname: var_log + lvm_lvmount: /var/log + lvm_lvsize: 4g + lvm_lvfilesystem: xfs + lvm_vgname: VolGroup00 + - role: ome.lvm_partition + lvm_lvname: root + lvm_lvmount: / + lvm_lvsize: 100%FREE + lvm_lvfilesystem: xfs + lvm_vgname: VolGroup00 + lvm_shrink: False - - role: ome.sudoers - sudoers_individual_commands: - - user: "%omedev" - become: ALL - command: "NOPASSWD: ALL" + - role: ome.sudoers + sudoers_individual_commands: + - user: "%omedev" + become: ALL + command: "NOPASSWD: ALL" - - role: ome.upgrade_distpackages - upgrade_distpackages_reboot_kernel: True + - role: ome.upgrade_distpackages + upgrade_distpackages_reboot_kernel: True - hosts: vlan-10ge-servers, vlan-ome-idr-docker roles: - - role: ome.network + - role: ome.network From 8a127a216f091eddb93074debd3d87ed1567e710 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 17:52:45 +0100 Subject: [PATCH 050/142] further linting fixes omero/training-server/playbook --- omero/training-server/playbook.yml | 110 ++++++++++++++++++----------- 1 file changed, 67 insertions(+), 43 deletions(-) diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index f174e4d7..16892137 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -58,7 +58,7 @@ - role: ome.postgresql postgresql_databases: - name: omero - postgresql_users: + postgresql_users: - user: omero password: omero databases: [omero] @@ -113,13 +113,13 @@ omero_web_config_set: omero.web.apps: - - "omero_iviewer" - - "omero_figure" - - "omero_fpbioimage" - - "omero_webtagging_autotag" - - "omero_webtagging_tagsearch" - - "omero_parade" - - "omero_mapr" + - "omero_iviewer" + - "omero_figure" + - "omero_fpbioimage" + - "omero_webtagging_autotag" + - "omero_webtagging_tagsearch" + - "omero_parade" + - "omero_mapr" omero.web.ui.center_plugins: - - "Auto Tag" - "omero_webtagging_autotag/auto_tag_init.js.html" @@ -146,7 +146,7 @@ - "tagsearch" - - "Genes" - query_string: {"experimenter": -1} - viewname: "maprindex_gene" + viewname: "maprindex_gene" - title": "Find Gene annotations" - - "Key-Value" - viewname: "maprindex_keyvalue" @@ -362,11 +362,11 @@ - name: Add operating system user "importer1" become: true user: - name: "importer1" - state: present - groups: "{{ omero_server_system_managedrepo_group }}" - password: >- - {{ os_system_users_password | password_hash('sha512', 'ome') }} + name: "importer1" + state: present + groups: "{{ omero_server_system_managedrepo_group }}" + password: >- + {{ os_system_users_password | password_hash('sha512', 'ome') }} - name: Allow managed repo group to login become: yes @@ -382,7 +382,7 @@ image: openmicroscopy/apacheds:{{ apache_docker_release }} name: ldap published_ports: - - "10389:10389" + - "10389:10389" state: started restart_policy: always @@ -435,7 +435,7 @@ command: server /srv/minio env_file: /etc/minio/docker-minio.env published_ports: - - "9000:9000" + - "9000:9000" state: started restart_policy: always volumes: @@ -480,19 +480,21 @@ state: present # TODO: Move to an independent role, currently bundled in - # https://github.com/manics/ansible-role-minio-s3-gateway/blob/0.1.0/tasks/minio-client.yml + # https://github.com/manics/ansible-role-minio-s3-gateway/ + # blob/0.1.0/tasks/minio-client.yml - name: Download minio client become: true get_url: - url: - https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2020-11-25T23-04-07Z - checksum: - sha256:985c43f9bec8fdc4ef2ee44c63c9657e10c4cfeb5cb949179d6d693f7428c314 + url: "https://dl.min.io/client/mc/release\ + /linux-amd64/archive/mc.RELEASE.2020-11-25T23-04-07Z" + checksum: "sha256:985c43f9bec8fdc4ef2ee44c63\ + c9657e10c4cfeb5cb949179d6d693f7428c314" dest: /usr/local/bin/mc mode: u=rwx,g=rx,o=rx # Crypted passwords generated using - # https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-generate-crypted-passwords-for-the-user-module + # https://docs.ansible.com/ansible/latest/reference_appendices/ + # faq.html#how-do-i-generate-crypted-passwords-for-the-user-module vars: #omero_server_datadir_chown: True #temporal upgrade force for omero server workaround @@ -502,14 +504,22 @@ omero_server_system_managedrepo_group: managed_repo_group omero_server_datadir_managedrepo_mode: u=rwX,g=srwX,o=rX,+t omero_server_datadir_chown: False - omero_server_release: "{{ omero_server_release_override | default('5.6.6') }}" - omero_web_release: "{{ omero_web_release_override | default('5.16.0') }}" - omero_figure_release: "{{ omero_figure_release_override | default('5.1.0') }}" - omero_fpbioimage_release: "{{ omero_fpbioimage_release_override | default('0.4.0') }}" - omero_iviewer_release: "{{ omero_iviewer_release_override | default('0.12.0') }}" - omero_mapr_release: "{{ omero_mapr_release_override | default('0.5.0') }}" - omero_parade_release: "{{ omero_parade_release_override | default('0.2.3') }}" - omero_py_release: "{{ omero_py_release_override | default('5.13.1') }}" + omero_server_release: >- + {{ omero_server_release_override | default('5.6.6') }} + omero_web_release: >- + {{ omero_web_release_override | default('5.16.0') }} + omero_figure_release: >- + {{ omero_figure_release_override | default('5.1.0') }} + omero_fpbioimage_release: >- + {{ omero_fpbioimage_release_override | default('0.4.0') }} + omero_iviewer_release: >- + {{ omero_iviewer_release_override | default('0.12.0') }} + omero_mapr_release: >- + {{ omero_mapr_release_override | default('0.5.0') }} + omero_parade_release: >- + {{ omero_parade_release_override | default('0.2.3') }} + omero_py_release: >- + {{ omero_py_release_override | default('5.13.1') }} # The omero_web_apps_* vars are used by the ome.omero_web role under # Python 3 otherwise ignored @@ -522,16 +532,27 @@ - "omero-webtagging-autotag=={{ omero_webtagging_autotag_release }}" - "omero-webtagging-tagsearch=={{ omero_webtagging_tagsearch_release }}" - ome_training_scripts_release: "{{ ome_training_scripts_release_override | default('0.2.0') }}" - omero_webtagging_autotag_release: "{{ omero_webtagging_autotag_release_override | default('3.2.0') }}" - omero_webtagging_tagsearch_release: "{{ omero_webtagging_tagsearch_release_override | default('3.2.0') }}" - omero_cli_duplicate_release: "{{ omero_cli_duplicate_release_override | default('0.4.0') }}" - omero_metadata_release: "{{ omero_metadata_release_overrride | default('0.8.0') }}" - omero_cli_render_release: "{{ omero_cli_render_release_override | default('0.7.0') }}" - os_system_users_password: "{{ os_system_users_password_override | default('ome') }}" - apache_docker_release: "{{ apache_docker_release_override | default('0.6.0') }}" - omero_ms_zarr_release: "{{ omero_ms_zarr_release_override | default('latest') }}" - minio_docker_release: "{{ minio_docker_release_override | default('RELEASE.2020-11-25T22-36-25Z') }}" + ome_training_scripts_release: >- + {{ ome_training_scripts_release_override | default('0.2.0') }} + omero_webtagging_autotag_release: >- + {{ omero_webtagging_autotag_release_override | default('3.2.0') }} + omero_webtagging_tagsearch_release: >- + {{ omero_webtagging_tagsearch_release_override | default('3.2.0') }} + omero_cli_duplicate_release: >- + {{ omero_cli_duplicate_release_override | default('0.4.0') }} + omero_metadata_release: >- + {{ omero_metadata_release_overrride | default('0.8.0') }} + omero_cli_render_release: >- + {{ omero_cli_render_release_override | default('0.7.0') }} + os_system_users_password: >- + {{ os_system_users_password_override | default('ome') }} + apache_docker_release: >- + {{ apache_docker_release_override | default('0.6.0') }} + omero_ms_zarr_release: >- + {{ omero_ms_zarr_release_override | default('latest') }} + minio_docker_release: >- + {{ minio_docker_release_override | + default('RELEASE.2020-11-25T22-36-25Z') }} ldap_password: "{{ ldap_password_override | default ('secret') }}" omero_server_config_set: #omero.fs.importUsers: "fm1" @@ -549,7 +570,8 @@ omero.glacier2.IceSSL.CertFile: server.p12 # This password doesn't need to be secret omero.glacier2.IceSSL.Password: secret - omero.fs.repo.path: "%user%_%userId%/%thread%//%year%-%month%/%day%/%time%" + omero.fs.repo.path: >- + %user%_%userId%/%thread%//%year%-%month%/%day%/%time% omero.ldap.config: "true" omero.ldap.urls: "ldap://localhost:10389" omero.ldap.base: "dc=openmicroscopy,dc=org" @@ -560,9 +582,11 @@ omero.ldap.password: "{{ ldap_password }}" omero.ldap.sync_on_login: "true" omero.ldap.user_filter: "(objectClass=person)" - omero.ldap.user_mapping: "omeName=uid,firstName=givenName,lastName=sn,email=mail" + omero.ldap.user_mapping: >- + omeName=uid,firstName=givenName,lastName=sn,email=mail omero.ldap.username: "uid=admin,ou=system" - omero.server.nodedescriptors: "master:Blitz-0,Indexer-0,Processor-0,Storm,Tables-0" + omero.server.nodedescriptors: >- + master:Blitz-0,Indexer-0,Processor-0,Storm,Tables-0 external_nic: "{{ ansible_default_ipv4.interface }}" From 6ff601980444ad28066eafd51afdbcdbf9deaadf Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 18:37:11 +0100 Subject: [PATCH 051/142] Last batch of linting fixes on 9 yml files --- molecule/ome-pg-prod/prepare.yml | 4 +- omedev/docker-prod-apps.yml | 14 +- omero/ome-demoserver.yml | 6 +- omero/ome-dundeeomero.yml | 8 +- omero/omero-monitoring-agents.yml | 16 +- postgres/ome-pg-prod.yml | 2 +- www/playbook.yml | 51 +-- www/www-deploy.yml | 590 +++++++++++++++--------------- www/www-static.yml | 19 +- 9 files changed, 360 insertions(+), 350 deletions(-) diff --git a/molecule/ome-pg-prod/prepare.yml b/molecule/ome-pg-prod/prepare.yml index 1cf4e32e..bfdb6ec2 100644 --- a/molecule/ome-pg-prod/prepare.yml +++ b/molecule/ome-pg-prod/prepare.yml @@ -4,5 +4,5 @@ - name: Install cron become: yes yum: - name: cronie - state: present + name: cronie + state: present diff --git a/omedev/docker-prod-apps.yml b/omedev/docker-prod-apps.yml index 9b0f335f..6dfba146 100644 --- a/omedev/docker-prod-apps.yml +++ b/omedev/docker-prod-apps.yml @@ -144,10 +144,10 @@ - '{job="omero-server"}' scheme: https static_configs: - - targets: - - "{{ idr_internal_1 }}.openmicroscopy.org" - labels: - prometheussrc: "{{ idr_internal_1 }}" + - targets: + - "{{ idr_internal_1 }}.openmicroscopy.org" + labels: + prometheussrc: "{{ idr_internal_1 }}" - job_name: federate-{{ idr_internal_2 }} honor_labels: true @@ -158,7 +158,7 @@ - '{job="node-exporter"}' - '{job="omero-server"}' scheme: https - static_configs: + static_configs: - targets: - "{{ idr_internal_2 }}.openmicroscopy.org" labels: @@ -173,7 +173,7 @@ - '{job="node-exporter"}' - '{job="omero-server"}' scheme: https - static_configs: + static_configs: - targets: - idr.openmicroscopy.org labels: @@ -194,7 +194,7 @@ - '{__name__="container_cpu_user_seconds_total"}' - '{__name__="container_memory_rss"}' scheme: https - static_configs: + static_configs: - targets: - idr-analysis.openmicroscopy.org labels: diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index 99efa612..4e6012b2 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -29,7 +29,8 @@ - name: Install Make Movie script Prerequisite | MEncoder - Repo become: yes yum: - name: http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm + name: "http://li.nux.ro/download/nux/dextop/el7\ + /x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm" state: present - name: Install Make Movie script Prerequisite | MEncoder - Package @@ -414,7 +415,8 @@ omero.mail.from: "{{ omero_server_mail_from }}" omero.mail.host: "{{ omero_server_mail_host }}" omero.new_user_group: "My Data" - omero.server.nodedescriptors: "master:Blitz-0,Indexer-0,Processor-0,Storm,Tables-0" + omero.server.nodedescriptors: >- + master:Blitz-0,Indexer-0,Processor-0,Storm,Tables-0 omero.search.batch: 100 omero.throttling.method_time.error: 60000 diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index 19ae212b..f0d7ece2 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -68,10 +68,10 @@ postgresql_databases: - name: "{{ omero_server_dbname | default('omero') }}" postgresql_users: - - user: "{{ omero_server_dbuser | default('omero') }}" - password: "{{ omero_server_dbpassword | default('omero') }}" - databases: - - "{{ omero_server_dbname | default('omero') }}" + - user: "{{ omero_server_dbuser | default('omero') }}" + password: "{{ omero_server_dbpassword | default('omero') }}" + databases: + - "{{ omero_server_dbname | default('omero') }}" # Note - had to have these set to `install-mock` to progress role diff --git a/omero/omero-monitoring-agents.yml b/omero/omero-monitoring-agents.yml index fda456c9..83ab303b 100644 --- a/omero/omero-monitoring-agents.yml +++ b/omero/omero-monitoring-agents.yml @@ -96,14 +96,14 @@ - hosts: omero-web tasks: - - name: Create nginx proxy for prometheus web exporters - become: yes - copy: - dest: /etc/nginx/conf.d-nested-includes/proxy-exporters-web.conf - src: confd-nested-proxy-exporters-web.conf - mode: 0644 - notify: - - restart nginx + - name: Create nginx proxy for prometheus web exporters + become: yes + copy: + dest: /etc/nginx/conf.d-nested-includes/proxy-exporters-web.conf + src: confd-nested-proxy-exporters-web.conf + mode: 0644 + notify: + - restart nginx handlers: - name: restart nginx diff --git a/postgres/ome-pg-prod.yml b/postgres/ome-pg-prod.yml index f853a95c..2e362292 100644 --- a/postgres/ome-pg-prod.yml +++ b/postgres/ome-pg-prod.yml @@ -13,7 +13,7 @@ - user: idr-redmine password: "{{ idr_redmine_postgres_password | default('idr-redmine') }}" databases: - - idr-redmine + - idr-redmine postgresql_server_auth: - database: idr-redmine user: idr-redmine diff --git a/www/playbook.yml b/www/playbook.yml index ad54ec9c..5b61b963 100644 --- a/www/playbook.yml +++ b/www/playbook.yml @@ -7,8 +7,8 @@ - name: Install open-vm-tools if system is a VMware vm become: yes yum: - name: open-vm-tools - state: installed + name: open-vm-tools + state: installed when: > ((ansible_virtualization_type is defined) and (ansible_virtualization_type == "VMware")) @@ -16,48 +16,48 @@ # Two tasks here which could instead use the role at # https://github.com/openmicroscopy/ansible-role-lvm-partition/, # but that role - # will change the device name to symlinks rather than + # will change the device name to symlinks rather than # existing device ID. - name: storage | Resize root LV tags: lvm become: yes lvol: - lv: root - vg: "{{ lvm_vgname }}" - size: "{{ provision_root_lvsize }}" - shrink: no + lv: root + vg: "{{ lvm_vgname }}" + size: "{{ provision_root_lvsize }}" + shrink: no # Grow the filesystem to fill the LV - name: storage | Resize root FS tags: lvm become: yes filesystem: - fstype: "{{ filesystem }}" - dev: /dev/mapper/{{ lvm_vgname }}-root - resizefs: yes + fstype: "{{ filesystem }}" + dev: /dev/mapper/{{ lvm_vgname }}-root + resizefs: yes - name: storage | Resize var_log LV tags: lvm become: yes lvol: - lv: var_log - vg: "{{ lvm_vgname }}" - size: "{{ provision_varlog_lvsize }}" - shrink: no + lv: var_log + vg: "{{ lvm_vgname }}" + size: "{{ provision_varlog_lvsize }}" + shrink: no # Grow the filesystem to fill the LV - name: storage | Resize var_log FS tags: lvm become: yes filesystem: - fstype: "{{ filesystem }}" - dev: /dev/mapper/{{ lvm_vgname }}-var_log - resizefs: yes + fstype: "{{ filesystem }}" + dev: /dev/mapper/{{ lvm_vgname }}-var_log + resizefs: yes roles: - # Now OME are using RHEL without Spacewalk, + # Now OME are using RHEL without Spacewalk, # the current best-method of - # checking `is server deployed in Dundee/SLS` + # checking `is server deployed in Dundee/SLS` # is checking for the SLS nameservers. - role: ome.system_monitor_agent tags: monitoring @@ -65,16 +65,16 @@ - role: ome.sudoers sudoers_individual_commands: - - user: "%omedev" - become: ALL - command: "NOPASSWD: /usr/local/bin/deploy *" + - user: "%omedev" + become: ALL + command: "NOPASSWD: /usr/local/bin/deploy *" post_tasks: - name: Check_MK logwatch plugin | check for plugin existence tags: monitoring stat: - path: "{{ check_mk_agent_plugin_path }}/mk_logwatch" + path: "{{ check_mk_agent_plugin_path }}/mk_logwatch" register: check_mk_logwatch_plugin_st - name: Check_MK logwatch plugin | activate the plugin @@ -89,7 +89,7 @@ - name: Check_MK logwatch plugin | check for default config file tags: monitoring stat: - path: "{{ check_mk_agent_config_example_path }}/logwatch.cfg" + path: "{{ check_mk_agent_config_example_path }}/logwatch.cfg" register: check_mk_logwatch_plugin_conf_st - name: Check_MK logwatch plugin | copy the default config @@ -104,7 +104,8 @@ vars: # Check_MK (system monitoring) paths check_mk_agent_plugin_path: /usr/share/check-mk-agent/available-plugins - check_mk_agent_config_example_path: /usr/share/check_mk/agents/cfg_examples + check_mk_agent_config_example_path: "/usr/share\ + /check_mk/agents/cfg_examples" check_mk_agent_config_path: /etc/check-mk-agent filesystem: "ext4" diff --git a/www/www-deploy.yml b/www/www-deploy.yml index 762559f3..e3603132 100644 --- a/www/www-deploy.yml +++ b/www/www-deploy.yml @@ -36,319 +36,319 @@ server: https://www-legacy.openmicroscopy.org nginx_proxy_redirect_map_locations: # TODO: change to 301 when we're happy - - location: "~ ^/(BIO-FORMATS)($|/)" - code: 302 - - location: "~ ^/(OME-FILES)($|/)" - code: 302 - - location: "~ ^/(OMERO)($|/)" - code: 302 - - location: "~ ^/(site)($|/)" - code: 302 - - location: "~ ^/(omero-blog)($|/)" - code: 302 - - location: "~ ^/(info)($|/)" - code: 302 - - location: "~ ^/(forums)($|/)" - code: 302 - - location: "~ ^/(XMLschemas)($|/)" - code: 302 - - location: "~ ^/(Schemas/Samples)($|/)" - code: 302 + - location: "~ ^/(BIO-FORMATS)($|/)" + code: 302 + - location: "~ ^/(OME-FILES)($|/)" + code: 302 + - location: "~ ^/(OMERO)($|/)" + code: 302 + - location: "~ ^/(site)($|/)" + code: 302 + - location: "~ ^/(omero-blog)($|/)" + code: 302 + - location: "~ ^/(info)($|/)" + code: 302 + - location: "~ ^/(forums)($|/)" + code: 302 + - location: "~ ^/(XMLschemas)($|/)" + code: 302 + - location: "~ ^/(Schemas/Samples)($|/)" + code: 302 nginx_proxy_redirect_map: # by default redirect to the 404 page - - match: default - dest: /404.html - - match: "~/omero-blog.*" - dest: http://blog.openmicroscopy.org - - match: "~/site/?$" - dest: / - - match: "~/site/news/?$" - dest: /announcements + - match: default + dest: /404.html + - match: "~/omero-blog.*" + dest: http://blog.openmicroscopy.org + - match: "~/site/?$" + dest: / + - match: "~/site/news/?$" + dest: /announcements - # about - - match: "~/site/about/?$" - dest: /about - - match: "~/site/about/who-ome" - dest: /teams - - match: "~/site/about/licensing" - dest: /licensing - - match: "~/site/about/licensing-attribution(/.*)?$" - dest: /licensing - - match: "~/site/about/ome-contributors/?$" - dest: /contributors - - match: "~/site/about/partners/?$" - dest: /commercial-partners - - match: "~/site/about/development-teams/?$" - dest: /teams - - match: "~/site/about/development-teams/glencoe-software" - dest: https://www.glencoesoftware.com/team.html - - match: "~/site/about/publications" - dest: /citing-ome - - match: "~/site/about/what-omero/overview" - dest: /omero - - match: "~/site/about/(?.*)$" - dest: /about + # about + - match: "~/site/about/?$" + dest: /about + - match: "~/site/about/who-ome" + dest: /teams + - match: "~/site/about/licensing" + dest: /licensing + - match: "~/site/about/licensing-attribution(/.*)?$" + dest: /licensing + - match: "~/site/about/ome-contributors/?$" + dest: /contributors + - match: "~/site/about/partners/?$" + dest: /commercial-partners + - match: "~/site/about/development-teams/?$" + dest: /teams + - match: "~/site/about/development-teams/glencoe-software" + dest: https://www.glencoesoftware.com/team.html + - match: "~/site/about/publications" + dest: /citing-ome + - match: "~/site/about/what-omero/overview" + dest: /omero + - match: "~/site/about/(?.*)$" + dest: /about - # products - - match: "~/site/products/?$" - dest: /products - - match: "~/site/products/omero/?$" - dest: /omero - - match: "~/site/products/omero/downloads/?$" - dest: /omero/downloads/ - - match: "~/site/products/omero/feature-list/?$" - dest: /omero/features/ - - match: "~/site/products/omero/big-images-support/?$" - dest: /omero/view/ - - match: "~/site/products/omero/secvuln/?$" - dest: /security/advisories/ - - match: "~/site/products/ome5/secvuln/?$" - dest: /security/advisories/ - - match: "~/site/products/omero/secvuln/(?.*[^/])/?$" - dest: /security/advisories/$link/ - - match: "~/site/products/bio-formats/?$" - dest: /bio-formats - - match: "~/site/products/bio-formats/downloads/?$" - dest: /bio-formats/downloads/ - - match: "~/site/products/ome-files-cpp/?$" - dest: /ome-files - - match: "~/site/products/(?.*)$" - dest: /products + # products + - match: "~/site/products/?$" + dest: /products + - match: "~/site/products/omero/?$" + dest: /omero + - match: "~/site/products/omero/downloads/?$" + dest: /omero/downloads/ + - match: "~/site/products/omero/feature-list/?$" + dest: /omero/features/ + - match: "~/site/products/omero/big-images-support/?$" + dest: /omero/view/ + - match: "~/site/products/omero/secvuln/?$" + dest: /security/advisories/ + - match: "~/site/products/ome5/secvuln/?$" + dest: /security/advisories/ + - match: "~/site/products/omero/secvuln/(?.*[^/])/?$" + dest: /security/advisories/$link/ + - match: "~/site/products/bio-formats/?$" + dest: /bio-formats + - match: "~/site/products/bio-formats/downloads/?$" + dest: /bio-formats/downloads/ + - match: "~/site/products/ome-files-cpp/?$" + dest: /ome-files + - match: "~/site/products/(?.*)$" + dest: /products - # community - - match: "~/forums/?$" - dest: https://forum.image.sc/c/data-management - - match: "~/site/community/?$" - dest: /support - - match: "~/site/community/mailing-lists/?$" - dest: /support - - match: "~/site/events(/.*)?$" - dest: /events - - match: "~/site/community/minutes/conference-calls/?$" - dest: /on-the-web - - match: "~/site/community/minutes/meetings/12th-annual-users-meeting-2017" - dest: /events/12th-annual-users-meeting-2017.html - - match: "~/site/community/minutes/meetings/11th-annual-users-meeting-2016" - dest: /events/11th-annual-users-meeting-2016.html - - match: >- - "~/site/community/minutes/meetings/ - 10th-annual-users-meeting-june-2015" - dest: /events/10th-annual-users-meeting-june-2015.html - - match: >- - "~/site/community/minutes/meetings/ - 9th-annual-users-meeting-june-2014" - dest: /events/9th-annual-users-meeting-june-2014.html - - match: "~/site/community/jobs/?$" - dest: /careers - - match: "~/site/community/scripts/?$" - dest: >- - https://docs.openmicroscopy.org/ - latest/omero/developers/scripts/index.html - - match: "~/site/community/(?.*)$" - dest: /support + # community + - match: "~/forums/?$" + dest: https://forum.image.sc/c/data-management + - match: "~/site/community/?$" + dest: /support + - match: "~/site/community/mailing-lists/?$" + dest: /support + - match: "~/site/events(/.*)?$" + dest: /events + - match: "~/site/community/minutes/conference-calls/?$" + dest: /on-the-web + - match: "~/site/community/minutes/meetings/12th-annual-users-meeting-2017" + dest: /events/12th-annual-users-meeting-2017.html + - match: "~/site/community/minutes/meetings/11th-annual-users-meeting-2016" + dest: /events/11th-annual-users-meeting-2016.html + - match: >- + "~/site/community/minutes/meetings/ + 10th-annual-users-meeting-june-2015" + dest: /events/10th-annual-users-meeting-june-2015.html + - match: >- + "~/site/community/minutes/meetings/ + 9th-annual-users-meeting-june-2014" + dest: /events/9th-annual-users-meeting-june-2014.html + - match: "~/site/community/jobs/?$" + dest: /careers + - match: "~/site/community/scripts/?$" + dest: >- + https://docs.openmicroscopy.org/ + latest/omero/developers/scripts/index.html + - match: "~/site/community/(?.*)$" + dest: /support - # support - - match: "~/site/support/?$" - dest: /docs + # support + - match: "~/site/support/?$" + dest: /docs - - match: "~/site/support/bio-formats/?$" - dest: https://docs.openmicroscopy.org/latest/bio-formats/ - - match: "~/site/support/bio-formats/(?.*)$" - dest: https://docs.openmicroscopy.org/latest/bio-formats/$link - - match: "~/site/support/bio-formats5/?$" - dest: https://docs.openmicroscopy.org/latest/bio-formats5/ - - match: "~/site/support/bio-formats5/(?.*)$" - dest: https://docs.openmicroscopy.org/latest/bio-formats5/$link - - match: '~/site/support/bio-formats5\.3/?$' - dest: https://docs.openmicroscopy.org/latest/bio-formats5.3/ - - match: '~/site/support/bio-formats5\.3/(?.*)$' - dest: https://docs.openmicroscopy.org/latest/bio-formats5.3/$link - - match: '~/site/support/bio-formats5\.4/?$' - dest: https://docs.openmicroscopy.org/latest/bio-formats5.4/ - - match: '~/site/support/bio-formats5\.4/(?.*)$' - dest: https://docs.openmicroscopy.org/latest/bio-formats5.4/$link - - match: '~/site/support/bio-formats5\.5/?$' - dest: https://docs.openmicroscopy.org/latest/bio-formats5.5/ - - match: '~/site/support/bio-formats5\.5/(?.*)$' - dest: https://docs.openmicroscopy.org/latest/bio-formats5.5/$link + - match: "~/site/support/bio-formats/?$" + dest: https://docs.openmicroscopy.org/latest/bio-formats/ + - match: "~/site/support/bio-formats/(?.*)$" + dest: https://docs.openmicroscopy.org/latest/bio-formats/$link + - match: "~/site/support/bio-formats5/?$" + dest: https://docs.openmicroscopy.org/latest/bio-formats5/ + - match: "~/site/support/bio-formats5/(?.*)$" + dest: https://docs.openmicroscopy.org/latest/bio-formats5/$link + - match: '~/site/support/bio-formats5\.3/?$' + dest: https://docs.openmicroscopy.org/latest/bio-formats5.3/ + - match: '~/site/support/bio-formats5\.3/(?.*)$' + dest: https://docs.openmicroscopy.org/latest/bio-formats5.3/$link + - match: '~/site/support/bio-formats5\.4/?$' + dest: https://docs.openmicroscopy.org/latest/bio-formats5.4/ + - match: '~/site/support/bio-formats5\.4/(?.*)$' + dest: https://docs.openmicroscopy.org/latest/bio-formats5.4/$link + - match: '~/site/support/bio-formats5\.5/?$' + dest: https://docs.openmicroscopy.org/latest/bio-formats5.5/ + - match: '~/site/support/bio-formats5\.5/(?.*)$' + dest: https://docs.openmicroscopy.org/latest/bio-formats5.5/$link - - match: "~/site/support/omero/?$" - dest: https://docs.openmicroscopy.org/latest/omero/ - - match: "~/site/support/omero/(?.*)$" - dest: https://docs.openmicroscopy.org/latest/omero/$link - - match: "~/site/support/omero5/?$" - dest: https://docs.openmicroscopy.org/latest/omero5/ - - match: "~/site/support/omero5/(?.*)$" - dest: https://docs.openmicroscopy.org/latest/omero5/$link - - match: '~/site/support/omero5\.0/?$' - dest: https://docs.openmicroscopy.org/latest/omero5.0/ - - match: '~/site/support/omero5\.0/(?.*)$' - dest: https://docs.openmicroscopy.org/latest/omero5.0/$link - - match: '~/site/support/omero5\.1/?$' - dest: https://docs.openmicroscopy.org/latest/omero5.1/ - - match: '~/site/support/omero5\.1/(?.*)$' - dest: https://docs.openmicroscopy.org/latest/omero5.1/$link - - match: '~/site/support/omero5\.2/?$' - dest: https://docs.openmicroscopy.org/latest/omero5.2/ - - match: '~/site/support/omero5\.2/(?.*)$' - dest: https://docs.openmicroscopy.org/latest/omero5.2/$link - - match: '~/site/support/omero5\.3/?$' - dest: https://docs.openmicroscopy.org/latest/omero5.3/ - - match: '~/site/support/omero5\.3/(?.*)$' - dest: https://docs.openmicroscopy.org/latest/omero5.3/$link + - match: "~/site/support/omero/?$" + dest: https://docs.openmicroscopy.org/latest/omero/ + - match: "~/site/support/omero/(?.*)$" + dest: https://docs.openmicroscopy.org/latest/omero/$link + - match: "~/site/support/omero5/?$" + dest: https://docs.openmicroscopy.org/latest/omero5/ + - match: "~/site/support/omero5/(?.*)$" + dest: https://docs.openmicroscopy.org/latest/omero5/$link + - match: '~/site/support/omero5\.0/?$' + dest: https://docs.openmicroscopy.org/latest/omero5.0/ + - match: '~/site/support/omero5\.0/(?.*)$' + dest: https://docs.openmicroscopy.org/latest/omero5.0/$link + - match: '~/site/support/omero5\.1/?$' + dest: https://docs.openmicroscopy.org/latest/omero5.1/ + - match: '~/site/support/omero5\.1/(?.*)$' + dest: https://docs.openmicroscopy.org/latest/omero5.1/$link + - match: '~/site/support/omero5\.2/?$' + dest: https://docs.openmicroscopy.org/latest/omero5.2/ + - match: '~/site/support/omero5\.2/(?.*)$' + dest: https://docs.openmicroscopy.org/latest/omero5.2/$link + - match: '~/site/support/omero5\.3/?$' + dest: https://docs.openmicroscopy.org/latest/omero5.3/ + - match: '~/site/support/omero5\.3/(?.*)$' + dest: https://docs.openmicroscopy.org/latest/omero5.3/$link - - match: "~/site/support/ome-model/?$" - dest: https://docs.openmicroscopy.org/latest/ome-model/ - - match: "~/site/support/ome-model/(?.*)$" - dest: https://docs.openmicroscopy.org/latest/ome-model/$link - - match: "~/site/support/file-formats/?$" - dest: https://docs.openmicroscopy.org/latest/ome-model/ - - match: >- - "~/site/support/file-formats/schemas - /specifications/compliant-file-specification/?$" - dest: https://docs.openmicroscopy.org/latest/ome-model/specifications/ - - match: "~/site/support/ome-tiff/?$" - dest: https://docs.openmicroscopy.org/latest/ome-model/ome-tiff/ - - match: "~/site/support/ome-files-cpp/?$" - dest: https://docs.openmicroscopy.org/latest/ome-files-cpp/ - - match: "~/site/support/ome-files-cpp/(?.*)$" - dest: https://docs.openmicroscopy.org/latest/ome-files-cpp/$link - - match: "~/site/support/contributing/?$" - dest: https://docs.openmicroscopy.org/contributing/ - - match: "~/site/support/contributing/(?.*)$" - dest: https://docs.openmicroscopy.org/contributing/$link - - match: "~/site/support/previous(/.*)?$" - dest: https://docs.openmicroscopy.org - - match: "~/site/support/ome-artwork(/.*)?$" - dest: /artwork + - match: "~/site/support/ome-model/?$" + dest: https://docs.openmicroscopy.org/latest/ome-model/ + - match: "~/site/support/ome-model/(?.*)$" + dest: https://docs.openmicroscopy.org/latest/ome-model/$link + - match: "~/site/support/file-formats/?$" + dest: https://docs.openmicroscopy.org/latest/ome-model/ + - match: >- + "~/site/support/file-formats/schemas + /specifications/compliant-file-specification/?$" + dest: https://docs.openmicroscopy.org/latest/ome-model/specifications/ + - match: "~/site/support/ome-tiff/?$" + dest: https://docs.openmicroscopy.org/latest/ome-model/ome-tiff/ + - match: "~/site/support/ome-files-cpp/?$" + dest: https://docs.openmicroscopy.org/latest/ome-files-cpp/ + - match: "~/site/support/ome-files-cpp/(?.*)$" + dest: https://docs.openmicroscopy.org/latest/ome-files-cpp/$link + - match: "~/site/support/contributing/?$" + dest: https://docs.openmicroscopy.org/contributing/ + - match: "~/site/support/contributing/(?.*)$" + dest: https://docs.openmicroscopy.org/contributing/$link + - match: "~/site/support/previous(/.*)?$" + dest: https://docs.openmicroscopy.org + - match: "~/site/support/ome-artwork(/.*)?$" + dest: /artwork - # uppercase alias - - match: "~/BIO-FORMATS$" - dest: /bio-formats - - match: "~/BIO-FORMATS/(?.*)$" - dest: /bio-formats/$link - - match: "~/OME-FILES$" - dest: /ome-files - - match: "~/OME-FILES/(?.*)$" - dest: /ome-files/$link - - match: "~/OMERO$" - dest: /omero - - match: "~/OMERO/(?.*)$" - dest: /omero/$link + # uppercase alias + - match: "~/BIO-FORMATS$" + dest: /bio-formats + - match: "~/BIO-FORMATS/(?.*)$" + dest: /bio-formats/$link + - match: "~/OME-FILES$" + dest: /ome-files + - match: "~/OME-FILES/(?.*)$" + dest: /ome-files/$link + - match: "~/OMERO$" + dest: /omero + - match: "~/OMERO/(?.*)$" + dest: /omero/$link - # info - - match: "~/info/vulnerabilities/?$" - dest: /security/advisories/ - - match: "~/info/vulnerabilities/(?.*[^/])/?$" - dest: /security/advisories/$link/ - - match: "~/info/omero/?$" - dest: /omero - - match: "~/info/OMERO.insight/?$" - dest: https://docs.openmicroscopy.org/latest/omero/users/index.html - - match: "~/info/OMERO.importer/?$" - dest: https://docs.openmicroscopy.org/latest/omero/users/index.html - - match: "~/info/OMERO.editor/?$" - dest: https://docs.openmicroscopy.org/latest/omero/users/index.html - - match: "~/info/OMERO.web/?$" - dest: https://docs.openmicroscopy.org/latest/omero/users/index.html - - match: "~/info/OMERO.server" - dest: https://docs.openmicroscopy.org/latest/omero/users/index.html - - match: "~/info/permissions" - dest: >- - https://docs.openmicroscopy.org/latest - /omero/sysadmins/server-permissions.html - - match: "~/info/demo" - dest: http://help.openmicroscopy.org/demo-server.html - - match: "~/info/cls" - dest: /omero/downloads/ - - match: "~/info/download" - dest: /omero/downloads/ - - match: "~/info/downloads" - dest: /omero/downloads/ - - match: "~/info/lists" - dest: http://lists.openmicroscopy.org.uk/mailman/listinfo/ - - match: "~/info/videos" - dest: https://www.youtube.com/channel/UCyySB9ZzNi8aBGYqcxSrauQ - - match: "~/info/attribution" - dest: /licensing/ - - match: "~/info/downgrade" - dest: >- - https://docs.openmicroscopy.org/latest/ - omero/developers/Model/XsltTransformations.html - - match: "~/info/flimfit" - dest: http://flimfit.org - - match: "~/info/scripts" - dest: >- - https://docs.openmicroscopy.org/latest/ - omero/developers/scripts/index.html - - match: "~/info/bio-formats(/.*)?$" - dest: https://docs.openmicroscopy.org/latest/bio-formats/ - - match: "~/info/slidebook" - dest: https://www.intelligent-imaging.com/technical-answers - - match: "~/info/(.*)?$" - dest: /site-map + # info + - match: "~/info/vulnerabilities/?$" + dest: /security/advisories/ + - match: "~/info/vulnerabilities/(?.*[^/])/?$" + dest: /security/advisories/$link/ + - match: "~/info/omero/?$" + dest: /omero + - match: "~/info/OMERO.insight/?$" + dest: https://docs.openmicroscopy.org/latest/omero/users/index.html + - match: "~/info/OMERO.importer/?$" + dest: https://docs.openmicroscopy.org/latest/omero/users/index.html + - match: "~/info/OMERO.editor/?$" + dest: https://docs.openmicroscopy.org/latest/omero/users/index.html + - match: "~/info/OMERO.web/?$" + dest: https://docs.openmicroscopy.org/latest/omero/users/index.html + - match: "~/info/OMERO.server" + dest: https://docs.openmicroscopy.org/latest/omero/users/index.html + - match: "~/info/permissions" + dest: >- + https://docs.openmicroscopy.org/latest + /omero/sysadmins/server-permissions.html + - match: "~/info/demo" + dest: http://help.openmicroscopy.org/demo-server.html + - match: "~/info/cls" + dest: /omero/downloads/ + - match: "~/info/download" + dest: /omero/downloads/ + - match: "~/info/downloads" + dest: /omero/downloads/ + - match: "~/info/lists" + dest: http://lists.openmicroscopy.org.uk/mailman/listinfo/ + - match: "~/info/videos" + dest: https://www.youtube.com/channel/UCyySB9ZzNi8aBGYqcxSrauQ + - match: "~/info/attribution" + dest: /licensing/ + - match: "~/info/downgrade" + dest: >- + https://docs.openmicroscopy.org/latest/ + omero/developers/Model/XsltTransformations.html + - match: "~/info/flimfit" + dest: http://flimfit.org + - match: "~/info/scripts" + dest: >- + https://docs.openmicroscopy.org/latest/ + omero/developers/scripts/index.html + - match: "~/info/bio-formats(/.*)?$" + dest: https://docs.openmicroscopy.org/latest/bio-formats/ + - match: "~/info/slidebook" + dest: https://www.intelligent-imaging.com/technical-answers + - match: "~/info/(.*)?$" + dest: /site-map - # Legacy XMLschemas endpoint - - match: "~/XMLschemas/(?.*[^/])?$" - dest: /Schemas/$link + # Legacy XMLschemas endpoint + - match: "~/XMLschemas/(?.*[^/])?$" + dest: /Schemas/$link - # Legacy schemas samples - - match: - "~/Schemas/Samples/2013-06/bioformats-artificial/\ - multi-channel-4D-series.ome.tif.zip" - dest: - "https://downloads.openmicroscopy.org/images/OME-TIFF/\ - 2013-06/bioformats-artificial/multi-channel-4D-series.ome.tif" - - match: "~/Schemas/Samples/2015-01/set-1-meta-companion" - dest: - https://downloads.openmicroscopy.org/images/OME-TIFF/2015-01/companion/ - - match: - "~/Schemas/Samples/2015-01/bioformats-artificial/\ - multi-channel-time-series.ome.tif.zip" - dest: - "https://downloads.openmicroscopy.org/images/OME-TIFF/\ - 2015-01/bioformats-artificial/multi-channel-time-series.ome.tif" - - match: "~/Schemas/Samples/(?.*)?$" - dest: https://downloads.openmicroscopy.org/images/OME-TIFF/$link - - match: "~/Schemas/Samples" - dest: https://downloads.openmicroscopy.org/images/ + # Legacy schemas samples + - match: + "~/Schemas/Samples/2013-06/bioformats-artificial/\ + multi-channel-4D-series.ome.tif.zip" + dest: + "https://downloads.openmicroscopy.org/images/OME-TIFF/\ + 2013-06/bioformats-artificial/multi-channel-4D-series.ome.tif" + - match: "~/Schemas/Samples/2015-01/set-1-meta-companion" + dest: + https://downloads.openmicroscopy.org/images/OME-TIFF/2015-01/companion/ + - match: + "~/Schemas/Samples/2015-01/bioformats-artificial/\ + multi-channel-time-series.ome.tif.zip" + dest: + "https://downloads.openmicroscopy.org/images/OME-TIFF/\ + 2015-01/bioformats-artificial/multi-channel-time-series.ome.tif" + - match: "~/Schemas/Samples/(?.*)?$" + dest: https://downloads.openmicroscopy.org/images/OME-TIFF/$link + - match: "~/Schemas/Samples" + dest: https://downloads.openmicroscopy.org/images/ nginx_proxy_direct_locations: - - location: "/" - root: "/var/www/www.openmicroscopy.org/html" - index: index.html + - location: "/" + root: "/var/www/www.openmicroscopy.org/html" + index: index.html - - location: "^~ /Schemas/Documentation/Generated/" - alias: /var/www/schemas_documentation/ + - location: "^~ /Schemas/Documentation/Generated/" + alias: /var/www/schemas_documentation/ - - location: "/Schemas/Transforms/" - root: "/var/www/www.openmicroscopy.org/html/" - custom: - - autoindex on + - location: "/Schemas/Transforms/" + root: "/var/www/www.openmicroscopy.org/html/" + custom: + - autoindex on - # Static copy of old phpBB forums: treat query params as part of filename - - location: "~ ^/community/style.php.*" - root: /var/www/phpbbforum/www.openmicroscopy.org - custom: - - try_files $request_uri $uri =404 - - default_type text/css - - location: "~ ^/community/?$" - redirect301: /community/index.php - - location: /community - root: /var/www/phpbbforum/www.openmicroscopy.org - custom: - # Need to exclude extra query parameters in incoming external links - # e.g. sid= - # If an exact match isn't found try just these parameters: - # [f, t, p], [f, t], [f] - - >- - try_files - $request_uri - $uri?f=$arg_f&t=$arg_t&p=$arg_p - $uri?f=$arg_f&t=$arg_t - $uri?f=$arg_f - =404 - - default_type text/html + # Static copy of old phpBB forums: treat query params as part of filename + - location: "~ ^/community/style.php.*" + root: /var/www/phpbbforum/www.openmicroscopy.org + custom: + - try_files $request_uri $uri =404 + - default_type text/css + - location: "~ ^/community/?$" + redirect301: /community/index.php + - location: /community + root: /var/www/phpbbforum/www.openmicroscopy.org + custom: + # Need to exclude extra query parameters in incoming external links + # e.g. sid= + # If an exact match isn't found try just these parameters: + # [f, t, p], [f, t], [f] + - >- + try_files + $request_uri + $uri?f=$arg_f&t=$arg_t&p=$arg_p + $uri?f=$arg_f&t=$arg_t + $uri?f=$arg_f + =404 + - default_type text/html - include: www-static.yml diff --git a/www/www-static.yml b/www/www-static.yml index cc585c09..2e659766 100644 --- a/www/www-static.yml +++ b/www/www-static.yml @@ -17,16 +17,20 @@ - role: ome.deploy_archive become: yes deploy_archive_dest_dir: /var/www - deploy_archive_src_url: https://downloads.openmicroscopy.org/web-archive/phpbbforum-20190718.tar.gz - deploy_archive_sha256: e9d7a7eefbacf42ddbdf92b201584913cb6d94ec331750f811232b2e91aa5b40 + deploy_archive_src_url: "https://downloads.openmicroscopy.org/web-\ + archive/phpbbforum-20190718.tar.gz" + deploy_archive_sha256: "e9d7a7eefbacf42ddbdf92b201584913cb6d94ec\ + 331750f811232b2e91aa5b40" # This file is patched later so only unzip if it doesn't exist when: not _phpbbforum_style_file_st.stat.exists - role: ome.deploy_archive become: yes deploy_archive_dest_dir: /var/www - deploy_archive_src_url: https://downloads.openmicroscopy.org/web-archive/schemas_documentation-20211213.tar.gz - deploy_archive_sha256: 27cc5def458112a2e259484906f2bc8c0e0e2bd0a728b0a478302537d67117ec + deploy_archive_src_url: "https://downloads.openmicroscopy.org/web-\ + archive/schemas_documentation-20211213.tar.gz" + deploy_archive_sha256: "27cc5def458112a2e259484906f2bc8c0e0e2bd\ + 0a728b0a478302537d67117ec" # This file is patched later so only unzip if it doesn't exist when: not _schemas_doc_file_st.stat.exists @@ -49,7 +53,9 @@ cron: name: "Deploy the website" special_time: hourly - job: "/usr/local/bin/deploy 2>&1 > /dev/null || /usr/local/bin/deploy -f" + job: >- + /usr/local/bin/deploy 2>&1 > + /dev/null || /usr/local/bin/deploy -f - name: Update static phpbb stylesheet become: yes @@ -70,5 +76,6 @@ path: "{{ phpbbforum_style_file }}" vars: - phpbbforum_style_file: "/var/www/phpbbforum/www.openmicroscopy.org/community/style.php?id=7&lang=en" + phpbbforum_style_file: "/var/www/phpbbforum/www.openmicroscopy\ + .org/community/style.php?id=7&lang=en" schemas_doc_file: "/var/www/schemas_documentation/OME-2016-06/ome.html" From 5081882ba14d39b25992562d2b79063c7f8e807d Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 19:31:41 +0100 Subject: [PATCH 052/142] Fix linting in 2 more files --- omedev/docker-prod-apps.yml | 24 ++++++++++++------------ www/www-deploy.yml | 6 ++++-- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/omedev/docker-prod-apps.yml b/omedev/docker-prod-apps.yml index 6dfba146..d6b8dbae 100644 --- a/omedev/docker-prod-apps.yml +++ b/omedev/docker-prod-apps.yml @@ -145,9 +145,9 @@ scheme: https static_configs: - targets: - - "{{ idr_internal_1 }}.openmicroscopy.org" - labels: - prometheussrc: "{{ idr_internal_1 }}" + - "{{ idr_internal_1 }}.openmicroscopy.org" + labels: + prometheussrc: "{{ idr_internal_1 }}" - job_name: federate-{{ idr_internal_2 }} honor_labels: true @@ -160,9 +160,9 @@ scheme: https static_configs: - targets: - - "{{ idr_internal_2 }}.openmicroscopy.org" - labels: - prometheussrc: "{{ idr_internal_2 }}" + - "{{ idr_internal_2 }}.openmicroscopy.org" + labels: + prometheussrc: "{{ idr_internal_2 }}" - job_name: federate-idr-production honor_labels: true @@ -175,9 +175,9 @@ scheme: https static_configs: - targets: - - idr.openmicroscopy.org - labels: - prometheussrc: idr-production + - idr.openmicroscopy.org + labels: + prometheussrc: idr-production - job_name: federate-idr-analysis basic_auth: @@ -196,9 +196,9 @@ scheme: https static_configs: - targets: - - idr-analysis.openmicroscopy.org - labels: - prometheussrc: idr-analysis + - idr-analysis.openmicroscopy.org + labels: + prometheussrc: idr-analysis # The prometheus role sets the prometheus_internal_ip variable that is # used later diff --git a/www/www-deploy.yml b/www/www-deploy.yml index e3603132..5ae2c258 100644 --- a/www/www-deploy.yml +++ b/www/www-deploy.yml @@ -126,9 +126,11 @@ dest: /events - match: "~/site/community/minutes/conference-calls/?$" dest: /on-the-web - - match: "~/site/community/minutes/meetings/12th-annual-users-meeting-2017" + - match: "~/site/community/minutes/meetings\ + /12th-annual-users-meeting-2017" dest: /events/12th-annual-users-meeting-2017.html - - match: "~/site/community/minutes/meetings/11th-annual-users-meeting-2016" + - match: "~/site/community/minutes/meetings\ + /11th-annual-users-meeting-2016" dest: /events/11th-annual-users-meeting-2016.html - match: >- "~/site/community/minutes/meetings/ From 9a255e00d134a0977302c75348e73e1c1a2a1e75 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 19:44:18 +0100 Subject: [PATCH 053/142] linting fixes in docker-prod-apps --- omedev/docker-prod-apps.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/omedev/docker-prod-apps.yml b/omedev/docker-prod-apps.yml index d6b8dbae..cec681f2 100644 --- a/omedev/docker-prod-apps.yml +++ b/omedev/docker-prod-apps.yml @@ -146,8 +146,8 @@ static_configs: - targets: - "{{ idr_internal_1 }}.openmicroscopy.org" - labels: - prometheussrc: "{{ idr_internal_1 }}" + labels: + prometheussrc: "{{ idr_internal_1 }}" - job_name: federate-{{ idr_internal_2 }} honor_labels: true @@ -161,8 +161,8 @@ static_configs: - targets: - "{{ idr_internal_2 }}.openmicroscopy.org" - labels: - prometheussrc: "{{ idr_internal_2 }}" + labels: + prometheussrc: "{{ idr_internal_2 }}" - job_name: federate-idr-production honor_labels: true @@ -176,8 +176,8 @@ static_configs: - targets: - idr.openmicroscopy.org - labels: - prometheussrc: idr-production + labels: + prometheussrc: idr-production - job_name: federate-idr-analysis basic_auth: @@ -197,8 +197,8 @@ static_configs: - targets: - idr-analysis.openmicroscopy.org - labels: - prometheussrc: idr-analysis + labels: + prometheussrc: idr-analysis # The prometheus role sets the prometheus_internal_ip variable that is # used later From 1596e47071f4e47349607252865906c2c8f5a417 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 7 Jun 2023 19:54:17 +0100 Subject: [PATCH 054/142] Try to push "labels" to the left --- omedev/docker-prod-apps.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/omedev/docker-prod-apps.yml b/omedev/docker-prod-apps.yml index cec681f2..618521f3 100644 --- a/omedev/docker-prod-apps.yml +++ b/omedev/docker-prod-apps.yml @@ -146,8 +146,8 @@ static_configs: - targets: - "{{ idr_internal_1 }}.openmicroscopy.org" - labels: - prometheussrc: "{{ idr_internal_1 }}" + labels: + prometheussrc: "{{ idr_internal_1 }}" - job_name: federate-{{ idr_internal_2 }} honor_labels: true @@ -161,8 +161,8 @@ static_configs: - targets: - "{{ idr_internal_2 }}.openmicroscopy.org" - labels: - prometheussrc: "{{ idr_internal_2 }}" + labels: + prometheussrc: "{{ idr_internal_2 }}" - job_name: federate-idr-production honor_labels: true @@ -176,8 +176,8 @@ static_configs: - targets: - idr.openmicroscopy.org - labels: - prometheussrc: idr-production + labels: + prometheussrc: idr-production - job_name: federate-idr-analysis basic_auth: @@ -197,8 +197,8 @@ static_configs: - targets: - idr-analysis.openmicroscopy.org - labels: - prometheussrc: idr-analysis + labels: + prometheussrc: idr-analysis # The prometheus role sets the prometheus_internal_ip variable that is # used later From dc5722a915670ed3f602b06cd2d475c909280f14 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 10:41:56 +0100 Subject: [PATCH 055/142] Fix the missing variable def cf. Seb's comment --- omero/training-server/maintenance/omero-restoredb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/training-server/maintenance/omero-restoredb.yml b/omero/training-server/maintenance/omero-restoredb.yml index 5a98824d..9a4ed960 100644 --- a/omero/training-server/maintenance/omero-restoredb.yml +++ b/omero/training-server/maintenance/omero-restoredb.yml @@ -20,7 +20,7 @@ # -e omero_restore_data_host=example.openmicroscopy.org -- hosts: "{{ omero_restore_host }}" +- hosts: "{{ omero_restore_host | default("localhost") }}" vars: omero_restore_data_dump_file: "/uod/idr/repos/outreach/outreach\ From 42a8b5eef486cf9a6fc5ba066a819469a451c798 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 10:49:18 +0100 Subject: [PATCH 056/142] use single quotes --- omero/training-server/maintenance/omero-restoredb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/training-server/maintenance/omero-restoredb.yml b/omero/training-server/maintenance/omero-restoredb.yml index 9a4ed960..db6acda9 100644 --- a/omero/training-server/maintenance/omero-restoredb.yml +++ b/omero/training-server/maintenance/omero-restoredb.yml @@ -20,7 +20,7 @@ # -e omero_restore_data_host=example.openmicroscopy.org -- hosts: "{{ omero_restore_host | default("localhost") }}" +- hosts: "{{ omero_restore_host | default('localhost') }}" vars: omero_restore_data_dump_file: "/uod/idr/repos/outreach/outreach\ From 3c9184f3cf765f318f69a4acaa2606f687fdbcd7 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 11:29:27 +0100 Subject: [PATCH 057/142] Replace include: with import_playbook: cf. Seb's comment --- omero/training-server/playbook.yml | 4 ++-- site.yml | 18 +++++++++--------- www/playbook.yml | 2 +- www/www-deploy.yml | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index 16892137..0cbc07b4 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -590,5 +590,5 @@ external_nic: "{{ ansible_default_ipv4.interface }}" -- include: letsencrypt.yml -- include: idr_data.yml +- import_playbook: letsencrypt.yml +- import_playbook: idr_data.yml diff --git a/site.yml b/site.yml index 0232abd5..8505a1f8 100644 --- a/site.yml +++ b/site.yml @@ -3,32 +3,32 @@ # For new hosts you may also need to run the bootstrap playbook to setup # networking and initial partitions: -#- include: bootstrap/playbook.yml +#- import_playbook: bootstrap/playbook.yml # deployment of two OMERO.web instances for hosting Dundee's production OMERO. # One of the two instances is for publication data ("ns-web-pub"). -- include: omero/nightshade-webclients.yml +- import_playbook: omero/nightshade-webclients.yml # nightshade.openmicroscopy.org OMERO.server -- include: omero/ome-dundeeomero.yml +- import_playbook: omero/ome-dundeeomero.yml # https://demo.openmicroscopy.org OMERO.server and OMERO.web -- include: omero/ome-demoserver.yml +- import_playbook: omero/ome-demoserver.yml # Firewall configuration for all UoD OMERO servers # The training-server playbooks modify the firewall configuration so this must # be run first to setup the basic rules -- include: omero/omero-firewall.yml +- import_playbook: omero/omero-firewall.yml # https://outreach.openmicroscopy.org # https://workshop.openmicroscopy.org -- include: omero/training-server/playbook.yml +- import_playbook: omero/training-server/playbook.yml # Internal monitoring configuration for all UoD OMERO servers -- include: omero/omero-monitoring-agents.yml +- import_playbook: omero/omero-monitoring-agents.yml # https://www.openmicroscopy.org/ -- include: www/playbook.yml +- import_playbook: www/playbook.yml # OME proxied service -- include: web-proxy/playbook.yml +- import_playbook: web-proxy/playbook.yml diff --git a/www/playbook.yml b/www/playbook.yml index 5b61b963..45c561ac 100644 --- a/www/playbook.yml +++ b/www/playbook.yml @@ -111,5 +111,5 @@ filesystem: "ext4" -- include: www-deploy.yml +- import_playbook: www-deploy.yml # www-deploy.yml includes www-jekyll.yml diff --git a/www/www-deploy.yml b/www/www-deploy.yml index 5ae2c258..dbafdc7d 100644 --- a/www/www-deploy.yml +++ b/www/www-deploy.yml @@ -353,4 +353,4 @@ - default_type text/html -- include: www-static.yml +- import_playbook: www-static.yml From 0dcc6e99902cd0b3525cd85f4b2286448890b265 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 11:35:33 +0100 Subject: [PATCH 058/142] Rename molecule_disabled.yml -> molecule.yml --- molecule/ome-pg-prod/{molecule_disabled.yml => molecule.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename molecule/ome-pg-prod/{molecule_disabled.yml => molecule.yml} (100%) diff --git a/molecule/ome-pg-prod/molecule_disabled.yml b/molecule/ome-pg-prod/molecule.yml similarity index 100% rename from molecule/ome-pg-prod/molecule_disabled.yml rename to molecule/ome-pg-prod/molecule.yml From d68687679d0642529ca5e79dcc959d153b951495 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 12:17:48 +0100 Subject: [PATCH 059/142] try fixing the all should have name --- bootstrap/playbook.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap/playbook.yml b/bootstrap/playbook.yml index 763b1558..dbe851e1 100644 --- a/bootstrap/playbook.yml +++ b/bootstrap/playbook.yml @@ -1,6 +1,7 @@ --- # Playbook which runs the necessary root-level steps # so that a host can be managed by others +name: Bootstrap - hosts: omedev roles: From 3886f2f6fc86dd55f1a948e4985bbd63046774ff Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 12:22:54 +0100 Subject: [PATCH 060/142] Revert "try fixing the all should have name" This reverts commit d68687679d0642529ca5e79dcc959d153b951495. --- bootstrap/playbook.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/bootstrap/playbook.yml b/bootstrap/playbook.yml index dbe851e1..763b1558 100644 --- a/bootstrap/playbook.yml +++ b/bootstrap/playbook.yml @@ -1,7 +1,6 @@ --- # Playbook which runs the necessary root-level steps # so that a host can be managed by others -name: Bootstrap - hosts: omedev roles: From 8ee0e7a0012e59722c3911ae9b319a417aec9155 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 13:20:34 +0100 Subject: [PATCH 061/142] Replace become: yes with become: true --- molecule/ome-pg-prod/prepare.yml | 2 +- molecule/resources/prepare-iproute.yml | 2 +- omero/learning.yml | 10 ++--- omero/nightshade-webclients.yml | 12 +++--- omero/ome-demoserver.yml | 40 +++++++++---------- omero/ome-dundeeomero.yml | 30 +++++++------- omero/omero-firewall.yml | 6 +-- omero/omero-monitoring-agents.yml | 14 +++---- omero/sls-gallery.yml | 8 ++-- omero/training-server/idr_data.yml | 2 +- omero/training-server/letsencrypt.yml | 8 ++-- omero/training-server/playbook.yml | 54 +++++++++++++------------- www/playbook.yml | 14 +++---- www/www-static.yml | 12 +++--- 14 files changed, 107 insertions(+), 107 deletions(-) diff --git a/molecule/ome-pg-prod/prepare.yml b/molecule/ome-pg-prod/prepare.yml index bfdb6ec2..fdb0d2d9 100644 --- a/molecule/ome-pg-prod/prepare.yml +++ b/molecule/ome-pg-prod/prepare.yml @@ -2,7 +2,7 @@ - hosts: ome-pg-prod1.openmicroscopy.org tasks: - name: Install cron - become: yes + become: true yum: name: cronie state: present diff --git a/molecule/resources/prepare-iproute.yml b/molecule/resources/prepare-iproute.yml index 4a9cba9a..c004880a 100644 --- a/molecule/resources/prepare-iproute.yml +++ b/molecule/resources/prepare-iproute.yml @@ -2,7 +2,7 @@ - hosts: all tasks: - name: Install iproute - become: yes + become: true yum: name: iproute state: present diff --git a/omero/learning.yml b/omero/learning.yml index 43911400..a3672546 100644 --- a/omero/learning.yml +++ b/omero/learning.yml @@ -147,14 +147,14 @@ tasks: - name: find OMERO.server log configuration - become: yes + become: true find: paths: /opt/omero/server/OMERO.server/etc/ patterns: "logback*.xml" register: logbacks - name: OMERO.server logs are compressed on rollover - become: yes + become: true replace: path: "{{ item.path }}" regexp: "(\\\\$\\{om\ @@ -164,7 +164,7 @@ with_items: "{{ logbacks.files }}" - name: TLS certificate is installed for JVM - become: yes + become: true java_cert: cert_url: "{{ ldap_host }}" cert_port: 636 @@ -174,14 +174,14 @@ notify: restart omero-server - name: OMERO.web configuration is installed - become: yes + become: true copy: src: "files/learning-omero-web.conf" dest: "/etc/nginx/conf.d/omero-web.conf" notify: restart nginx - name: OMERO.web starts on boot - become: yes + become: true service: name: "{{ item }}.service" enabled: true diff --git a/omero/nightshade-webclients.yml b/omero/nightshade-webclients.yml index 733fc30c..b4428ce9 100644 --- a/omero/nightshade-webclients.yml +++ b/omero/nightshade-webclients.yml @@ -42,7 +42,7 @@ tasks: - name: Install open-vm-tools if system is a VMware vm - become: yes + become: true yum: name: open-vm-tools state: present @@ -54,7 +54,7 @@ # (Total cores / 2), leaving some for WSGI # post 2.3 'dest' should be renamed 'path' - name: NGINX - Performance tuning - worker processes - become: yes + become: true replace: dest: "/etc/nginx/nginx.conf" regexp: '^worker_processes\s+\d+;' @@ -66,21 +66,21 @@ # cf https://www.digitalocean.com/community/tutorials/ # how-to-optimize-nginx-configuration - name: NGINX - Performance tuning - worker connections - become: yes + become: true replace: dest: "/etc/nginx/nginx.conf" regexp: 'worker_connections\s+\d+;' replace: "worker_connections 65000;" - name: NGINX - create nested includes directory - become: yes + become: true file: path: /etc/nginx/conf.d-nested-includes state: directory mode: 0755 - name: NGINX - SSL Configuration - become: yes + become: true template: src: templates/nginx-confdnestedincludes-ssl-conf.j2 dest: /etc/nginx/conf.d-nested-includes/ssl.conf @@ -89,7 +89,7 @@ - restart nginx - name: NGINX - Custom Paper Redirect - become: yes + become: true template: src: templates/nginx-confdnestedincludes-ns-pub-redirects-conf.j2 dest: /etc/nginx/conf.d-nested-includes/ns-pub-redirects.conf diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index 4e6012b2..e1f54b9f 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -6,7 +6,7 @@ - hosts: ome-demoservers pre_tasks: - name: Install open-vm-tools if system is a VMware vm - become: yes + become: true yum: name: open-vm-tools state: installed @@ -19,7 +19,7 @@ # to make some of the variables non-required. - name: Resize root FS without altering mount options tags: lvm - become: yes + become: true lvol: lv: root vg: VolGroup00 @@ -27,20 +27,20 @@ shrink: no - name: Install Make Movie script Prerequisite | MEncoder - Repo - become: yes + become: true yum: name: "http://li.nux.ro/download/nux/dextop/el7\ /x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm" state: present - name: Install Make Movie script Prerequisite | MEncoder - Package - become: yes + become: true yum: name: mencoder state: present - name: Server-side script prerequisites - become: yes + become: true yum: name: "{{ item }}" state: present @@ -168,7 +168,7 @@ post_tasks: - name: NGINX - Performance tuning - worker processes - become: yes + become: true replace: path: "/etc/nginx/nginx.conf" regexp: '^worker_processes\s+\d+;' @@ -179,21 +179,21 @@ # cf https://www.digitalocean.com/community/tutorials/ # how-to-optimize-nginx-configuration - name: NGINX - Performance tuning - worker connections - become: yes + become: true replace: path: "/etc/nginx/nginx.conf" regexp: 'worker_connections\s+\d+;' replace: "worker_connections 65000;" - name: NGINX - create nested includes directory - become: yes + become: true file: path: /etc/nginx/conf.d-nested-includes state: directory mode: 0755 - name: NGINX - SSL Configuration - become: yes + become: true template: src: templates/nginx-confdnestedincludes-ssl-conf.j2 dest: /etc/nginx/conf.d-nested-includes/ssl.conf @@ -202,7 +202,7 @@ - restart nginx - name: NGINX - OMERO websockets - become: yes + become: true template: src: templates/nginx-confdnestedincludes-omerows-conf.j2 dest: /etc/nginx/conf.d-nested-includes/omerows.conf @@ -211,7 +211,7 @@ - restart nginx - name: NGINX - websocket proxy support - become: yes + become: true template: src: templates/nginx-confd-websockets-conf.j2 dest: /etc/nginx/conf.d/websockets.conf @@ -220,7 +220,7 @@ - restart nginx - name: Config for OMERO.web plugins - become: yes + become: true template: src: templates/omero-web-config-for-webapps.j2 dest: >- @@ -232,7 +232,7 @@ - restart omero-web - name: OMERO.web config for CORS - become: yes + become: true template: src: templates/omero-web-config-for-cors.j2 dest: "{{ omero_web_basedir }}/config/omero-web-config-for-cors.omero" @@ -243,7 +243,7 @@ - restart omero-web - name: OMERO.web config for signup app - become: yes + become: true template: src: templates/omero-web-config-signup.j2 dest: "{{ omero_web_basedir }}/config/omero-web-config-signup.omero" @@ -263,7 +263,7 @@ - name: Check_MK postgres plugin | activate the plugin tags: monitoring - become: yes + become: true command: > cp "{{ check_mk_agent_plugin_path }}/mk_postgres" /usr/share/check-mk-agent/plugins/ @@ -278,7 +278,7 @@ - name: Check_MK logwatch plugin | activate the plugin tags: monitoring - become: yes + become: true command: > cp "{{ check_mk_agent_plugin_path }}/mk_logwatch" /usr/share/check-mk-agent/plugins/ @@ -293,7 +293,7 @@ - name: Check_MK logwatch plugin | copy the default config tags: monitoring - become: yes + become: true command: > cp "{{ check_mk_agent_config_example_path }}/logwatch.cfg" "{{ check_mk_agent_config_path }}/logwatch.cfg" @@ -301,13 +301,13 @@ when: check_mk_logwatch_plugin_conf_st.stat.exists - name: PostgreSQL Nightly Backups | Remove old cron job - become: yes + become: true file: path: /etc/cron.daily/nightly-pg_dump-omero.sh state: absent - name: Create a figure scripts directory - become: yes + become: true file: path: >- "{{ omero_server_basedir }}/OMERO.server/lib/ @@ -318,7 +318,7 @@ owner: root - name: Download the Figure_To_Pdf.py script - become: yes + become: true get_url: url: >- https://raw.githubusercontent.com/ome/omero-figure/ diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index f0d7ece2..590a553a 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -3,7 +3,7 @@ - hosts: ome-dundeeomero.openmicroscopy.org pre_tasks: - name: Install open-vm-tools if system is a VMware vm - become: yes + become: true yum: name: open-vm-tools state: present @@ -17,7 +17,7 @@ # to make some of the variables non-required. - name: Resize root FS without altering mount options tags: lvm - become: yes + become: true lvol: lv: root vg: rhel @@ -25,7 +25,7 @@ when: "not (molecule_test | default(False))" - name: Install Make Movie script Prerequisite | MEncoder - Repo - become: yes + become: true yum: name: "http://li.nux.ro/download/nux/dextop/el7\ /x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm" @@ -33,7 +33,7 @@ # web server is included for decoupled OMERO.web - name: OMERO.figure server-side&script prerequisites & web server - become: yes + become: true yum: name: "{{ item }}" state: present @@ -113,7 +113,7 @@ # OMERO doesn't limit sizes and fills up /tmp # thus we need to create another tmp - name: Create another temporary directory - become: yes + become: true file: path: "{{ omero_server_systemd_environment.OMERO_TMPDIR }}" state: directory @@ -121,14 +121,14 @@ owner: "{{ omero_server_system_user }}" - name: NGINX - enable service / start on boot - become: yes + become: true systemd: name: nginx enabled: yes # post 2.3 'dest' should be renamed 'path' - name: NGINX - Performance tuning - worker processes - become: yes + become: true replace: dest: "/etc/nginx/nginx.conf" regexp: '^worker_processes\s+\d+;' @@ -140,7 +140,7 @@ # cf https://www.digitalocean.com/community/tutorials/how # -to-optimize-nginx-configuration - name: NGINX - Performance tuning - worker connections - become: yes + become: true replace: dest: "/etc/nginx/nginx.conf" regexp: 'worker_connections\s+\d+;' @@ -149,7 +149,7 @@ - restart nginx - name: NGINX - create nested includes directory - become: yes + become: true file: path: /etc/nginx/conf.d-nested-includes state: directory @@ -157,7 +157,7 @@ # post 2.3 'destfile' should be renamed 'path' - name: NGINX - Configuration - become: yes + become: true template: src: nginx-omero.conf.j2 dest: /etc/nginx/conf.d/omero-web.conf @@ -166,13 +166,13 @@ - restart nginx - name: PostgreSQL Nightly Backups | Remove old cron job - become: yes + become: true file: path: /etc/cron.daily/nightly-pg_dump-omero.sh state: absent - name: Create a figure scripts directory - become: yes + become: true file: path: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts state: directory @@ -181,7 +181,7 @@ owner: root - name: Download the Figure_To_Pdf.py script - become: yes + become: true get_url: url: "https://raw.githubusercontent.com/ome/omero-figure\ /v{{ omero_figure_release }}/omero_figure/scripts\ @@ -193,7 +193,7 @@ force: yes - name: Download the Dataset_Images_To_New_Figure.py script - become: yes + become: true get_url: url: "https://raw.githubusercontent.com/ome/omero-guide-figure /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Dataset\ @@ -205,7 +205,7 @@ force: yes - name: Download the Figure_Images_To_Dataset.py script - become: yes + become: true get_url: url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Figure\ diff --git a/omero/omero-firewall.yml b/omero/omero-firewall.yml index 66a2b8b3..4757b89c 100644 --- a/omero/omero-firewall.yml +++ b/omero/omero-firewall.yml @@ -14,7 +14,7 @@ # - ICMP echo (ping) # - ssh incoming connections - name: Iptables ssh and related - become: yes + become: true iptables_raw_25: name: ssh_and_established keep_unmanaged: no @@ -35,7 +35,7 @@ # servers: # http://www.chiark.greenend.org.uk/~peterb/network/drop-vs-reject - name: Iptables default - become: yes + become: true iptables_raw_25: name: default_rules rules: | @@ -52,7 +52,7 @@ # - GPFS # - Check_MK - name: Iptables OME ports - become: yes + become: true iptables_raw_25: name: ome_ports rules: | diff --git a/omero/omero-monitoring-agents.yml b/omero/omero-monitoring-agents.yml index 83ab303b..a20fb4f0 100644 --- a/omero/omero-monitoring-agents.yml +++ b/omero/omero-monitoring-agents.yml @@ -22,7 +22,7 @@ tasks: - name: omero-server prometheus jmx agents - become: yes + become: true copy: dest: "{{ omero_common_basedir }}/server/config/prometheus.omero" src: omero-server-config-prometheus.omero @@ -52,7 +52,7 @@ tasks: - name: nginx selinux allow network connect - become: yes + become: true seboolean: name: httpd_can_network_connect state: yes @@ -60,7 +60,7 @@ when: selinux_enabled - name: Create monitoring htpasswd - become: yes + become: true copy: content: >- "{{ secret_monitoring_nginx_htpasswd | @@ -72,7 +72,7 @@ # exist it will return an error, and we know which exporters to expect # when scraping - name: Create nginx proxy for prometheus exporters - become: yes + become: true copy: dest: /etc/nginx/conf.d-nested-includes/proxy-exporters.conf src: confd-nested-proxy-exporters.conf @@ -82,7 +82,7 @@ handlers: - name: restart nginx - become: yes + become: true service: name: nginx state: restarted @@ -97,7 +97,7 @@ tasks: - name: Create nginx proxy for prometheus web exporters - become: yes + become: true copy: dest: /etc/nginx/conf.d-nested-includes/proxy-exporters-web.conf src: confd-nested-proxy-exporters-web.conf @@ -107,7 +107,7 @@ handlers: - name: restart nginx - become: yes + become: true service: name: nginx state: restarted diff --git a/omero/sls-gallery.yml b/omero/sls-gallery.yml index 22994ddb..4a01067e 100644 --- a/omero/sls-gallery.yml +++ b/omero/sls-gallery.yml @@ -129,14 +129,14 @@ tasks: - name: find OMERO.server log configuration - become: yes + become: true find: paths: /opt/omero/server/OMERO.server/etc/ patterns: "logback*.xml" register: logbacks - name: OMERO.server logs are compressed on rollover - become: yes + become: true replace: path: "{{ item.path }}" regexp: "(\\\\$\\{om\ @@ -146,14 +146,14 @@ with_items: "{{ logbacks.files }}" - name: OMERO.web configuration is installed - become: yes + become: true copy: src: "files/sls-gallery-omero-web.conf" dest: "/etc/nginx/conf.d/omero-web.conf" notify: restart nginx - name: OMERO.web starts on boot - become: yes + become: true service: name: "{{ item }}.service" enabled: true diff --git a/omero/training-server/idr_data.yml b/omero/training-server/idr_data.yml index f43ceefa..6f7642e5 100644 --- a/omero/training-server/idr_data.yml +++ b/omero/training-server/idr_data.yml @@ -2,7 +2,7 @@ - hosts: ome-outreach tasks: - name: Clone study metadata - become: yes + become: true git: dest: /uod/idr/metadata/{{ item.name }} repo: https://github.com/IDR/{{ item.name }} diff --git a/omero/training-server/letsencrypt.yml b/omero/training-server/letsencrypt.yml index e91954dd..757d844f 100644 --- a/omero/training-server/letsencrypt.yml +++ b/omero/training-server/letsencrypt.yml @@ -6,7 +6,7 @@ pre_tasks: - name: letsencrypt challenge directory - become: yes + become: true file: path: /srv/www/letsencrypt/.well-known/ recurse: yes @@ -27,7 +27,7 @@ # This will stop nginx when the certificate is first created # For renewals we configure Nginx to serve the challenge - role: ome.certbot - become: yes + become: true certbot_create_if_missing: yes certbot_admin_email: "{{ letsencrypt_email }}" certbot_domains: @@ -49,7 +49,7 @@ tasks: - name: letsencrypt nginx configuration - become: yes + become: true template: src: templates/nginx-letsencrypt-conf.j2 dest: /etc/nginx/conf.d-nested-includes/https.conf @@ -59,7 +59,7 @@ handlers: - name: reload nginx - become: yes + become: true service: name: nginx state: reloaded diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index 0cbc07b4..b19ed880 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -7,7 +7,7 @@ pre_tasks: - name: Install Make Movie script Prerequisite | MEncoder - Repo - become: yes + become: true yum: name: "http://li.nux.ro/download/nux/dextop/el7/x86_64\ /nux-dextop-release-0-5.el7.nux.noarch.rpm" @@ -15,7 +15,7 @@ # web server is included for decoupled OMERO.web - name: OMERO.figure server-side&script prerequisites & web server - become: yes + become: true yum: name: "{{ item }}" state: present @@ -23,7 +23,7 @@ - mencoder # For the 'make movie' script - name: Prerequisites for ldap - become: yes + become: true yum: name: "{{ item }}" state: present @@ -36,7 +36,7 @@ # Since Nginx isn't installed until later # the directories are created in advance - name: Create nginx include directories - become: yes + become: true file: path: "{{ item }}" state: directory @@ -46,7 +46,7 @@ - /etc/nginx/conf.d-nested-includes - name: NGINX - websocket proxy support - become: yes + become: true template: src: templates/nginx-confd-websockets-conf.j2 dest: /etc/nginx/conf.d/websockets.conf @@ -226,13 +226,13 @@ tasks: - name: Docker | python client - become: yes + become: true yum: name: docker-python state: present - name: Create a figure scripts directory - become: yes + become: true file: path: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts state: directory @@ -242,7 +242,7 @@ group: "omero-server" - name: Download the Figure_To_Pdf.py script - become: yes + become: true get_url: url: >- https://raw.githubusercontent.com/ome/omero-figure/v{{ @@ -256,7 +256,7 @@ force: yes - name: Download the Dataset_Images_To_New_Figure.py script - become: yes + become: true get_url: url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts\ @@ -269,7 +269,7 @@ force: yes - name: Download the Figure_Images_To_Dataset.py script - become: yes + become: true get_url: url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts\ @@ -282,7 +282,7 @@ force: yes - name: Create a workshop_scripts directory - become: yes + become: true file: path: "/opt/omero/server/OMERO.server/lib/scripts\ /omero/workshop_scripts" @@ -293,7 +293,7 @@ group: "omero-server" - name: Download the Scipy_Gaussian_Filter.py script - become: yes + become: true get_url: url: >- https://raw.githubusercontent.com/ome/omero-guide-python/v{{ @@ -306,7 +306,7 @@ force: yes - name: Download the simple_frap.py script - become: yes + become: true get_url: url: >- https://raw.githubusercontent.com/ome/omero-guide-python/v{{ @@ -319,7 +319,7 @@ force: yes - name: Download the simple_frap_with_figure.py script - become: yes + become: true get_url: url: >- https://raw.githubusercontent.com/ome/omero-guide-python/v{{ @@ -332,7 +332,7 @@ force: yes - name: Create a directory for ldap scripts - become: yes + become: true file: path: /home/ldap state: directory @@ -340,7 +340,7 @@ recurse: yes - name: Download the ldap scripts - become: yes + become: true get_url: url: >- https://raw.githubusercontent.com/openmicroscopy/apacheds-docker/{{ @@ -350,7 +350,7 @@ force: yes - name: Add DropBox folder for trainer-1 - become: yes + become: true file: path: /home/DropBox/trainer-1 state: directory @@ -369,7 +369,7 @@ {{ os_system_users_password | password_hash('sha512', 'ome') }} - name: Allow managed repo group to login - become: yes + become: true lineinfile: path: /etc/security/access.conf regexp: "{{ omero_server_system_managedrepo_group }}" @@ -377,7 +377,7 @@ line: "+:{{ omero_server_system_managedrepo_group }}:ALL" - name: Run docker for ldap - become: yes + become: true docker_container: image: openmicroscopy/apacheds:{{ apache_docker_release }} name: ldap @@ -387,7 +387,7 @@ restart_policy: always - name: Run docker for omero-ms-zarr - become: yes + become: true docker_container: image: openmicroscopy/omero-ms-zarr:{{ omero_ms_zarr_release }} name: omero_ms_zarr @@ -405,20 +405,20 @@ - "/OMERO:/OMERO:ro" - name: Create minio config directory - become: yes + become: true file: path: /etc/minio state: directory mode: 0755 - name: Check if minio admin credentials exists - become: yes + become: true stat: path: /etc/minio/docker-minio.env register: _minio_docker_env_st - name: Create random minio admin credentials file - become: yes + become: true copy: content: | MINIO_ACCESS_KEY={{ lookup('password', '/dev/null length=12') }} @@ -428,7 +428,7 @@ when: not _minio_docker_env_st.stat.exists - name: Run docker for minio - become: yes + become: true docker_container: image: minio/minio:{{ minio_docker_release }} name: minio @@ -442,7 +442,7 @@ - "/srv/minio:/srv/minio" - name: Nginx - docker webservices support - become: yes + become: true template: src: templates/nginx-confdnestedincludes-{{ item }}.j2 dest: /etc/nginx/conf.d-nested-includes/{{ item }}.conf @@ -460,7 +460,7 @@ # - incoming from host localhost - name: Iptables Docker forward rules - become: yes + become: true iptables_raw_25: name: docker_outreach_rules rules: | @@ -469,7 +469,7 @@ state: present - name: Iptables Docker nat rules - become: yes + become: true iptables_raw_25: name: docker_outreach_nat table: nat diff --git a/www/playbook.yml b/www/playbook.yml index 45c561ac..622ae4c2 100644 --- a/www/playbook.yml +++ b/www/playbook.yml @@ -5,7 +5,7 @@ PATH: /usr/local/bin:{{ ansible_env.PATH }} pre_tasks: - name: Install open-vm-tools if system is a VMware vm - become: yes + become: true yum: name: open-vm-tools state: installed @@ -20,7 +20,7 @@ # existing device ID. - name: storage | Resize root LV tags: lvm - become: yes + become: true lvol: lv: root vg: "{{ lvm_vgname }}" @@ -30,7 +30,7 @@ # Grow the filesystem to fill the LV - name: storage | Resize root FS tags: lvm - become: yes + become: true filesystem: fstype: "{{ filesystem }}" dev: /dev/mapper/{{ lvm_vgname }}-root @@ -38,7 +38,7 @@ - name: storage | Resize var_log LV tags: lvm - become: yes + become: true lvol: lv: var_log vg: "{{ lvm_vgname }}" @@ -48,7 +48,7 @@ # Grow the filesystem to fill the LV - name: storage | Resize var_log FS tags: lvm - become: yes + become: true filesystem: fstype: "{{ filesystem }}" dev: /dev/mapper/{{ lvm_vgname }}-var_log @@ -79,7 +79,7 @@ - name: Check_MK logwatch plugin | activate the plugin tags: monitoring - become: yes + become: true command: >- cp "{{ check_mk_agent_plugin_path }}/mk_logwatch" /usr/share/check-mk-agent/plugins/ @@ -94,7 +94,7 @@ - name: Check_MK logwatch plugin | copy the default config tags: monitoring - become: yes + become: true command: >- cp "{{ check_mk_agent_config_example_path }}/logwatch.cfg" "{{ check_mk_agent_config_path }}/logwatch.cfg" diff --git a/www/www-static.yml b/www/www-static.yml index 2e659766..aa158c18 100644 --- a/www/www-static.yml +++ b/www/www-static.yml @@ -15,7 +15,7 @@ roles: - role: ome.deploy_archive - become: yes + become: true deploy_archive_dest_dir: /var/www deploy_archive_src_url: "https://downloads.openmicroscopy.org/web-\ archive/phpbbforum-20190718.tar.gz" @@ -25,7 +25,7 @@ when: not _phpbbforum_style_file_st.stat.exists - role: ome.deploy_archive - become: yes + become: true deploy_archive_dest_dir: /var/www deploy_archive_src_url: "https://downloads.openmicroscopy.org/web-\ archive/schemas_documentation-20211213.tar.gz" @@ -36,20 +36,20 @@ tasks: - name: install deployment script - become: yes + become: true template: src: files/deploy dest: /usr/local/bin/deploy mode: 0555 - name: Install Cron daemon - become: yes + become: true yum: name: cronie state: installed - name: Add cron job updating the website - become: yes + become: true cron: name: "Deploy the website" special_time: hourly @@ -58,7 +58,7 @@ /dev/null || /usr/local/bin/deploy -f - name: Update static phpbb stylesheet - become: yes + become: true blockinfile: block: | form, From cbd30178d97022354741222f25030afda835ded8 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 13:28:14 +0100 Subject: [PATCH 062/142] False -> false and True -> true to fix the "truthies" --- bootstrap/playbook.yml | 4 ++-- molecule/docker-prod/molecule.yml | 2 +- molecule/nightshade-webclients/molecule.yml | 2 +- molecule/ome-dundeeomero/molecule.yml | 2 +- molecule/omero-training-server/molecule.yml | 4 ++-- omedev/docker-prod-apps.yml | 2 +- omero/learning.yml | 16 ++++++++-------- omero/ome-demoserver.yml | 14 +++++++------- omero/ome-dundeeomero.yml | 4 ++-- omero/sls-gallery.yml | 16 ++++++++-------- omero/training-server/playbook.yml | 6 +++--- www/www-deploy.yml | 6 +++--- 12 files changed, 39 insertions(+), 39 deletions(-) diff --git a/bootstrap/playbook.yml b/bootstrap/playbook.yml index 763b1558..1fe0e458 100644 --- a/bootstrap/playbook.yml +++ b/bootstrap/playbook.yml @@ -18,7 +18,7 @@ lvm_lvsize: 100%FREE lvm_lvfilesystem: xfs lvm_vgname: VolGroup00 - lvm_shrink: False + lvm_shrink: false - role: ome.sudoers sudoers_individual_commands: @@ -27,7 +27,7 @@ command: "NOPASSWD: ALL" - role: ome.upgrade_distpackages - upgrade_distpackages_reboot_kernel: True + upgrade_distpackages_reboot_kernel: true - hosts: vlan-10ge-servers, vlan-ome-idr-docker diff --git a/molecule/docker-prod/molecule.yml b/molecule/docker-prod/molecule.yml index ddb33301..f43e3aa3 100644 --- a/molecule/docker-prod/molecule.yml +++ b/molecule/docker-prod/molecule.yml @@ -41,7 +41,7 @@ provisioner: group_vars: # all: - # molecule_test: True + # molecule_test: true docker-hosts: # This should allow docker-in-docker to work docker_storage_driver: vfs diff --git a/molecule/nightshade-webclients/molecule.yml b/molecule/nightshade-webclients/molecule.yml index c9e65123..71cd0c18 100644 --- a/molecule/nightshade-webclients/molecule.yml +++ b/molecule/nightshade-webclients/molecule.yml @@ -28,7 +28,7 @@ provisioner: molecule_test: true docker-hosts: # firewalld isn't installed, don't attempt to disable - iptables_raw_disable_firewalld: False + iptables_raw_disable_firewalld: false playbooks: converge: ../../site.yml lint: diff --git a/molecule/ome-dundeeomero/molecule.yml b/molecule/ome-dundeeomero/molecule.yml index 2d4b350a..588452cd 100644 --- a/molecule/ome-dundeeomero/molecule.yml +++ b/molecule/ome-dundeeomero/molecule.yml @@ -30,7 +30,7 @@ provisioner: molecule_test: true docker-hosts: # firewalld isn't installed, don't attempt to disable - iptables_raw_disable_firewalld: False + iptables_raw_disable_firewalld: false playbooks: converge: ../../site.yml lint: diff --git a/molecule/omero-training-server/molecule.yml b/molecule/omero-training-server/molecule.yml index 6a01bd9f..6add4d5c 100644 --- a/molecule/omero-training-server/molecule.yml +++ b/molecule/omero-training-server/molecule.yml @@ -24,7 +24,7 @@ provisioner: inventory: group_vars: all: - molecule_test: True + molecule_test: true postgresql_version: "9.6" docker-hosts: # This should allow docker-in-docker to work @@ -33,7 +33,7 @@ provisioner: # testing on travis: https://github.com/docker/for-linux/issues/219 docker_version: 17.09.1.ce-1.el7.centos # firewalld isn't installed, don't attempt to disable - iptables_raw_disable_firewalld: False + iptables_raw_disable_firewalld: false playbooks: prepare: ../resources/prepare-iproute.yml converge: ../../site.yml diff --git a/omedev/docker-prod-apps.yml b/omedev/docker-prod-apps.yml index 618521f3..885db7fe 100644 --- a/omedev/docker-prod-apps.yml +++ b/omedev/docker-prod-apps.yml @@ -218,7 +218,7 @@ nginx_proxy_http2: true nginx_proxy_ssl_certificate: "{{ ssl_certificate_bundled_path }}" nginx_proxy_ssl_certificate_key: "{{ ssl_certificate_key_path }}" - nginx_proxy_force_ssl: True + nginx_proxy_force_ssl: true nginx_proxy_conf_http: - "client_max_body_size 128m" nginx_proxy_sites: diff --git a/omero/learning.yml b/omero/learning.yml index a3672546..41c92084 100644 --- a/omero/learning.yml +++ b/omero/learning.yml @@ -21,7 +21,7 @@ lvm_lvmount: '/var/lib/pgsql' lvm_lvsize: 20G lvm_lvfilesystem: xfs - lvm_shrink: False + lvm_shrink: false - role: ome.postgresql postgresql_databases: @@ -37,7 +37,7 @@ lvm_lvmount: '/OMERO' lvm_lvsize: 150G lvm_lvfilesystem: xfs - lvm_shrink: False + lvm_shrink: false - role: ome.lvm_partition lvm_vgname: VolGroup00 @@ -45,20 +45,20 @@ lvm_lvmount: '/opt/omero' lvm_lvsize: 40G lvm_lvfilesystem: xfs - lvm_shrink: False + lvm_shrink: false - role: ome.omero_server omero_server_python_addons: - "omero-py>={{ omero_py_release }}" omero_server_config_set: - omero.client.ui.menu.dropdown.colleagues.enabled: False + omero.client.ui.menu.dropdown.colleagues.enabled: false omero.client.ui.menu.dropdown.everyone.label: "All courses" omero.client.ui.menu.dropdown.leaders.label: "Courses:" omero.db.poolsize: 100 omero.jvmcfg.percent.blitz: 50 omero.jvmcfg.percent.indexer: 20 omero.jvmcfg.percent.pixeldata: 30 - omero.ldap.config: True + omero.ldap.config: true omero.ldap.base: "{{ omero_server_ldap_base }}" omero.ldap.username: "{{ omero_server_ldap_username }}" omero.ldap.password: "{{ omero_server_ldap_password | default('') }}" @@ -69,20 +69,20 @@ omero.mail.from: "{{ omero_server_mail_from }}" omero.mail.host: "{{ omero_server_mail_host }}" omero.policy.binary_access: "+read,+write,-image,-plate" - omero.security.ignore_case: True + omero.security.ignore_case: true omero.security.keyStore: "/etc/pki/java/cacerts" omero.security.trustStore: "/etc/pki/java/cacerts" omero.security.keyStorePassword: "changeit" omero.security.trustStorePassword: "changeit" omero.sessions.timeout: 3600000 - omero_server_selfsigned_certificates: True + omero_server_selfsigned_certificates: true - role: ome.redis - role: ome.nginx - role: ome.omero_web - omero_web_setup_nginx: False + omero_web_setup_nginx: false omero_web_config_set: omero.web.server_list: - ["localhost", 4064, "Virtual Microscope"] diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index e1f54b9f..a26599ee 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -63,7 +63,7 @@ lvm_lvmount: /var/lib/pgsql lvm_lvsize: "{{ provision_postgres_lvsize }}" lvm_lvfilesystem: "{{ filesystem }}" - lvm_shrink: False + lvm_shrink: false # Disk Layout - OMERO | VG and LV (separate disk) for Binary Repository - role: ome.lvm_partition @@ -73,7 +73,7 @@ lvm_lvmount: "{{ omero_server_datadir }}" lvm_lvsize: "{{ provision_omero_server_datadir_lvsize }}" lvm_lvfilesystem: "{{ filesystem }}" - lvm_shrink: False + lvm_shrink: false # Disk Layout - OMERO.server | LV for dist & logs - role: ome.lvm_partition @@ -83,7 +83,7 @@ lvm_lvmount: "{{ omero_server_basedir }}" lvm_lvsize: "{{ provision_omero_server_basedir_lvsize }}" lvm_lvfilesystem: "{{ filesystem }}" - lvm_shrink: False + lvm_shrink: false # Disk Layout - OMERO.web | LV for dist & logs - role: ome.lvm_partition @@ -93,7 +93,7 @@ lvm_lvmount: "{{ omero_web_basedir }}" lvm_lvsize: "{{ provision_omero_web_basedir_lvsize }}" lvm_lvfilesystem: "{{ filesystem }}" - lvm_shrink: False + lvm_shrink: false - role: ome.nginx nginx_version: 1.16.1 @@ -356,7 +356,7 @@ omero_py_release: "{{ omero_py_release_override | default('5.13.1') }}" # For https://github.com/openmicroscopy/ansible-role-java, # which is a dependency. - java_jdk_install: True + java_jdk_install: true # Check_MK (system monitoring) paths check_mk_agent_plugin_path: /usr/share/check-mk-agent/available-plugins @@ -430,7 +430,7 @@ - markdown - "omero-py>={{ omero_py_release }}" - omero_server_selfsigned_certificates: True + omero_server_selfsigned_certificates: true omero_web_config_set: omero.mail.config: true @@ -442,7 +442,7 @@ "{{ secret_omero_web_public_user | default('public') }}" omero.web.public.password: >- "{{ secret_omero_web_public_password | default('public') }}" - omero.web.public.enabled: True + omero.web.public.enabled: true omero.web.public.server_id: 1 omero.web.public.url_filter: >- "^/(webgateway/(?!(archived_files|download_as))| webclient diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index 590a553a..fb6dd5a2 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -219,7 +219,7 @@ vars: # For https://github.com/openmicroscopy/ansible-role-java # which is a dependency. - java_jdk_install: True + java_jdk_install: true nginx_version: 1.18.0 postgresql_version: "11" @@ -255,7 +255,7 @@ {{ omero_server_ice_admin_endpoints | default('tcp -h 127.0.0.1') }} omero.data.dir: "{{ omero_server_datadir | default('/OMERO') }}" - omero_server_selfsigned_certificates: True + omero_server_selfsigned_certificates: true # Production config can't be tested in molecule omero_server_config_set: >- diff --git a/omero/sls-gallery.yml b/omero/sls-gallery.yml index 4a01067e..a1925d51 100644 --- a/omero/sls-gallery.yml +++ b/omero/sls-gallery.yml @@ -16,7 +16,7 @@ lvm_lvmount: '/var/lib/pgsql' lvm_lvsize: 8G lvm_lvfilesystem: xfs - lvm_shrink: False + lvm_shrink: false - role: ome.postgresql postgresql_databases: @@ -38,7 +38,7 @@ lvm_lvmount: '/OMERO' lvm_lvsize: 80G lvm_lvfilesystem: xfs - lvm_shrink: False + lvm_shrink: false - role: ome.lvm_partition lvm_vgname: VolGroup00 @@ -46,18 +46,18 @@ lvm_lvmount: '/opt/omero' lvm_lvsize: 40G lvm_lvfilesystem: xfs - lvm_shrink: False + lvm_shrink: false - role: ome.omero_server omero_server_config_set: - omero.client.ui.menu.dropdown.colleagues.enabled: False + omero.client.ui.menu.dropdown.colleagues.enabled: false omero.client.ui.menu.dropdown.everyone.label: "All images" omero.client.ui.menu.dropdown.leaders.label: "Gallery:" omero.db.poolsize: 50 omero.jvmcfg.percent.blitz: 50 omero.jvmcfg.percent.indexer: 20 omero.jvmcfg.percent.pixeldata: 30 - omero.ldap.config: True + omero.ldap.config: true omero.ldap.base: "{{ omero_server_ldap_base }}" omero.ldap.username: "{{ omero_server_ldap_username }}" omero.ldap.user_filter: "{{ omero_server_ldap_user_filter }}" @@ -70,15 +70,15 @@ omero.mail.host: "{{ omero_server_mail_host }}" omero.pixeldata.max_plane_height: 5120 omero.pixeldata.max_plane_width: 5120 - omero_server_selfsigned_certificates: True + omero_server_selfsigned_certificates: true - role: ome.redis - role: ome.nginx - role: ome.omero_web - omero_web_setup_nginx: False - omero_web_systemd_start: True + omero_web_setup_nginx: false + omero_web_systemd_start: true omero_web_config_set: omero.web.server_list: - ["localhost", 4064, "SLS Gallery"] diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index b19ed880..fbc143a5 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -496,14 +496,14 @@ # https://docs.ansible.com/ansible/latest/reference_appendices/ # faq.html#how-do-i-generate-crypted-passwords-for-the-user-module vars: - #omero_server_datadir_chown: True + #omero_server_datadir_chown: true #temporal upgrade force for omero server workaround #omero_server_checkupgrade_comparator: '!=' postgresql_version: "13" - omero_server_selfsigned_certificates: True + omero_server_selfsigned_certificates: true omero_server_system_managedrepo_group: managed_repo_group omero_server_datadir_managedrepo_mode: u=rwX,g=srwX,o=rX,+t - omero_server_datadir_chown: False + omero_server_datadir_chown: false omero_server_release: >- {{ omero_server_release_override | default('5.6.6') }} omero_web_release: >- diff --git a/www/www-deploy.yml b/www/www-deploy.yml index dbafdc7d..69ef0dac 100644 --- a/www/www-deploy.yml +++ b/www/www-deploy.yml @@ -20,11 +20,11 @@ "{{ ((ansible_processor_count * ansible_processor_cores) / 2) |round|int }}" nginx_proxy_worker_connections: 65000 - nginx_proxy_ssl: True + nginx_proxy_ssl: true nginx_proxy_ssl_certificate: "{{ ssl_certificate_bundled_path }}" nginx_proxy_ssl_certificate_key: "{{ ssl_certificate_key_path }}" - nginx_proxy_http2: True - nginx_proxy_force_ssl: False + nginx_proxy_http2: true + nginx_proxy_force_ssl: false nginx_proxy_404: "/404.html" nginx_proxy_conf_http: - "client_max_body_size 2g" From 8771d7e2bdfdc18dce3bfd923e416ce783a9078f Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 14:02:52 +0100 Subject: [PATCH 063/142] force: yes -> force: true --- omero/ome-demoserver.yml | 2 +- omero/ome-dundeeomero.yml | 6 +++--- omero/training-server/playbook.yml | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index a26599ee..804cf309 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -330,7 +330,7 @@ mode: 0755 owner: "omero-server" group: "omero-server" - force: yes + force: true vars: omero_figure_release: >- diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index fb6dd5a2..9eb01883 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -190,7 +190,7 @@ /omero/figure_scripts/Figure_To_Pdf.py" mode: 0644 owner: root - force: yes + force: true - name: Download the Dataset_Images_To_New_Figure.py script become: true @@ -202,7 +202,7 @@ /omero/figure_scripts/Dataset_Images_To_New_Figure.py" mode: 0644 owner: root - force: yes + force: true - name: Download the Figure_Images_To_Dataset.py script become: true @@ -214,7 +214,7 @@ /omero/figure_scripts/Figure_Images_To_Dataset.py" mode: 0644 owner: root - force: yes + force: true vars: # For https://github.com/openmicroscopy/ansible-role-java diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index fbc143a5..9199b3c6 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -253,7 +253,7 @@ mode: 0755 owner: "omero-server" group: "omero-server" - force: yes + force: true - name: Download the Dataset_Images_To_New_Figure.py script become: true @@ -266,7 +266,7 @@ mode: 0755 owner: "omero-server" group: "omero-server" - force: yes + force: true - name: Download the Figure_Images_To_Dataset.py script become: true @@ -279,7 +279,7 @@ mode: 0755 owner: "omero-server" group: "omero-server" - force: yes + force: true - name: Create a workshop_scripts directory become: true @@ -303,7 +303,7 @@ mode: 0755 owner: "omero-server" group: "omero-server" - force: yes + force: true - name: Download the simple_frap.py script become: true @@ -316,7 +316,7 @@ mode: 0755 owner: "omero-server" group: "omero-server" - force: yes + force: true - name: Download the simple_frap_with_figure.py script become: true @@ -329,7 +329,7 @@ mode: 0755 owner: "omero-server" group: "omero-server" - force: yes + force: true - name: Create a directory for ldap scripts become: true @@ -347,7 +347,7 @@ apache_docker_release }}/bin/ldapmanager dest: /home/ldap/ldapmanager mode: 0755 - force: yes + force: true - name: Add DropBox folder for trainer-1 become: true From 5754964934a0336d46cc8398ce4a8612dc1259a4 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 14:30:08 +0100 Subject: [PATCH 064/142] One more batch of truthies --- omero/learning.yml | 2 +- omero/ome-demoserver.yml | 4 ++-- omero/ome-dundeeomero.yml | 4 ++-- omero/omero-firewall.yml | 2 +- omero/omero-monitoring-agents.yml | 4 ++-- omero/sls-gallery.yml | 2 +- omero/training-server/idr_data.yml | 2 +- omero/training-server/letsencrypt.yml | 4 ++-- omero/training-server/playbook.yml | 10 +++++----- release/presentations.yml | 4 ++-- www/playbook.yml | 6 +++--- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/omero/learning.yml b/omero/learning.yml index 41c92084..1a7d4693 100644 --- a/omero/learning.yml +++ b/omero/learning.yml @@ -160,7 +160,7 @@ regexp: "(\\\\$\\{om\ ero\\.logfile\\}\\.\\%i)(\\<\\/fileNamePattern\\>)" replace: "\\1.gz\\2" - backup: yes + backup: true with_items: "{{ logbacks.files }}" - name: TLS certificate is installed for JVM diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index 804cf309..b7c1b75c 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -24,7 +24,7 @@ lv: root vg: VolGroup00 size: "{{ provision_root_lvsize }}" - shrink: no + shrink: false - name: Install Make Movie script Prerequisite | MEncoder - Repo become: true @@ -314,7 +314,7 @@ scripts/omero/figure_scripts" state: directory mode: 0755 - recurse: yes + recurse: true owner: root - name: Download the Figure_To_Pdf.py script diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index 9eb01883..597271a6 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -124,7 +124,7 @@ become: true systemd: name: nginx - enabled: yes + enabled: true # post 2.3 'dest' should be renamed 'path' - name: NGINX - Performance tuning - worker processes @@ -177,7 +177,7 @@ path: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts state: directory mode: 0755 - recurse: yes + recurse: true owner: root - name: Download the Figure_To_Pdf.py script diff --git a/omero/omero-firewall.yml b/omero/omero-firewall.yml index 4757b89c..c3949d41 100644 --- a/omero/omero-firewall.yml +++ b/omero/omero-firewall.yml @@ -17,7 +17,7 @@ become: true iptables_raw_25: name: ssh_and_established - keep_unmanaged: no + keep_unmanaged: false rules: | -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT diff --git a/omero/omero-monitoring-agents.yml b/omero/omero-monitoring-agents.yml index a20fb4f0..7e6444a3 100644 --- a/omero/omero-monitoring-agents.yml +++ b/omero/omero-monitoring-agents.yml @@ -55,8 +55,8 @@ become: true seboolean: name: httpd_can_network_connect - state: yes - persistent: yes + state: true + persistent: true when: selinux_enabled - name: Create monitoring htpasswd diff --git a/omero/sls-gallery.yml b/omero/sls-gallery.yml index a1925d51..f4d9e6c7 100644 --- a/omero/sls-gallery.yml +++ b/omero/sls-gallery.yml @@ -142,7 +142,7 @@ regexp: "(\\\\$\\{om\ ero\\.logfile\\}\\.\\%i)(\\<\\/fileNamePattern\\>)" replace: "\\1.gz\\2" - backup: yes + backup: true with_items: "{{ logbacks.files }}" - name: OMERO.web configuration is installed diff --git a/omero/training-server/idr_data.yml b/omero/training-server/idr_data.yml index 6f7642e5..f994034c 100644 --- a/omero/training-server/idr_data.yml +++ b/omero/training-server/idr_data.yml @@ -6,7 +6,7 @@ git: dest: /uod/idr/metadata/{{ item.name }} repo: https://github.com/IDR/{{ item.name }} - update: yes + update: true version: "{{ item.version }}" loop: "{{ studies | default([]) }}" diff --git a/omero/training-server/letsencrypt.yml b/omero/training-server/letsencrypt.yml index 757d844f..1b696505 100644 --- a/omero/training-server/letsencrypt.yml +++ b/omero/training-server/letsencrypt.yml @@ -9,7 +9,7 @@ become: true file: path: /srv/www/letsencrypt/.well-known/ - recurse: yes + recurse: true state: directory mode: 0755 @@ -28,7 +28,7 @@ # For renewals we configure Nginx to serve the challenge - role: ome.certbot become: true - certbot_create_if_missing: yes + certbot_create_if_missing: true certbot_admin_email: "{{ letsencrypt_email }}" certbot_domains: - "{{ https_certificate_domain }}" diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index 9199b3c6..338c085e 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -237,7 +237,7 @@ path: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts state: directory mode: 0755 - recurse: yes + recurse: true owner: "omero-server" group: "omero-server" @@ -288,7 +288,7 @@ /omero/workshop_scripts" state: directory mode: 0755 - recurse: yes + recurse: true owner: "omero-server" group: "omero-server" @@ -337,7 +337,7 @@ path: /home/ldap state: directory mode: 0755 - recurse: yes + recurse: true - name: Download the ldap scripts become: true @@ -355,7 +355,7 @@ path: /home/DropBox/trainer-1 state: directory mode: 0755 - recurse: yes + recurse: true owner: "omero-server" group: "omero-server" @@ -400,7 +400,7 @@ network_mode: host restart_policy: always state: started - pull: yes + pull: true volumes: - "/OMERO:/OMERO:ro" diff --git a/release/presentations.yml b/release/presentations.yml index 55763bd9..b067a99c 100644 --- a/release/presentations.yml +++ b/release/presentations.yml @@ -5,6 +5,6 @@ - name: update presentations git: repo: https://github.com/ome/presentations - force: no - update: yes + force: false + update: true dest: "/uod/idr/www/downloads.openmicroscopy.org/presentations" diff --git a/www/playbook.yml b/www/playbook.yml index 622ae4c2..0ec07b2d 100644 --- a/www/playbook.yml +++ b/www/playbook.yml @@ -25,7 +25,7 @@ lv: root vg: "{{ lvm_vgname }}" size: "{{ provision_root_lvsize }}" - shrink: no + shrink: false # Grow the filesystem to fill the LV - name: storage | Resize root FS @@ -34,7 +34,7 @@ filesystem: fstype: "{{ filesystem }}" dev: /dev/mapper/{{ lvm_vgname }}-root - resizefs: yes + resizefs: true - name: storage | Resize var_log LV tags: lvm @@ -43,7 +43,7 @@ lv: var_log vg: "{{ lvm_vgname }}" size: "{{ provision_varlog_lvsize }}" - shrink: no + shrink: false # Grow the filesystem to fill the LV - name: storage | Resize var_log FS From 63f4c5dab4b5273f3f3e22066dbc61a63788d1ed Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 14:36:35 +0100 Subject: [PATCH 065/142] Last truthy --- www/playbook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/playbook.yml b/www/playbook.yml index 0ec07b2d..caa630d7 100644 --- a/www/playbook.yml +++ b/www/playbook.yml @@ -52,7 +52,7 @@ filesystem: fstype: "{{ filesystem }}" dev: /dev/mapper/{{ lvm_vgname }}-var_log - resizefs: yes + resizefs: true roles: # Now OME are using RHEL without Spacewalk, From f6ea7f95b424853537cfe54b8848e204c5b22cbb Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 15:20:20 +0100 Subject: [PATCH 066/142] Add 4 names to tasks --- release/permissions.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/release/permissions.yml b/release/permissions.yml index d4f55121..c16e91cd 100644 --- a/release/permissions.yml +++ b/release/permissions.yml @@ -2,14 +2,16 @@ - hosts: idr0-slot3.openmicroscopy.org become: true tasks: - - file: + - name: set perms /uod/idr/www + file: path: /uod/idr/www state: directory owner: root group: root mode: 0755 - - file: + - name: set perms2 + file: path: "{{ item }}" state: directory owner: root @@ -17,13 +19,15 @@ mode: 0755 with_items: "{{ www_folders }}" - - find: + - name: set perms3 www_folders + find: paths: "{{ www_folders }}" file_type: "directory" recurse: "no" register: "products" - - file: + - name: set perms3 + file: path: "{{ item }}" state: directory owner: root From 5475b46b75efcc0b928d76107ab2639109b709c4 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 15:32:41 +0100 Subject: [PATCH 067/142] Replace set_fact with ansible.builtin as per linter instr --- molecule/docker-prod/converge.yml | 2 +- release/release-acceptance.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/molecule/docker-prod/converge.yml b/molecule/docker-prod/converge.yml index 60bc873f..53129fa5 100644 --- a/molecule/docker-prod/converge.yml +++ b/molecule/docker-prod/converge.yml @@ -12,7 +12,7 @@ - skip_ansible_lint - name: Set address of postgres for redmine - set_fact: + ansible.builtin.set_fact: redmine_tracker_db_host: "{{ hostname_ip.stdout }}" diff --git a/release/release-acceptance.yml b/release/release-acceptance.yml index fb09b9bf..d8144761 100644 --- a/release/release-acceptance.yml +++ b/release/release-acceptance.yml @@ -20,11 +20,11 @@ when: item.stat is not defined or not item.stat.exists - name: Check pre-release - set_fact: + ansible.builtin.set_fact: prerelease: "{{ '-' in version }}" - name: Define minor and major versions - set_fact: + ansible.builtin.set_fact: minorversion: "{{ version.split('.')[:2] | join('.') }}" majorversion: "{{ version.split('.')[:1] | join('.') }}" From ab49a420c153621d2db194e3aed55aa601cfe12f Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 15:34:48 +0100 Subject: [PATCH 068/142] Replace service with ansible.builtin as per lint instr --- omero/learning.yml | 2 +- omero/nightshade-webclients.yml | 2 +- omero/ome-demoserver.yml | 2 +- omero/ome-dundeeomero.yml | 2 +- omero/omero-monitoring-agents.yml | 4 ++-- omero/sls-gallery.yml | 2 +- omero/training-server/letsencrypt.yml | 2 +- omero/training-server/maintenance/omero-restoredb.yml | 4 ++-- web-proxy/playbook.yml | 2 +- www/www-deploy.yml | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/omero/learning.yml b/omero/learning.yml index 1a7d4693..90bc4e84 100644 --- a/omero/learning.yml +++ b/omero/learning.yml @@ -182,7 +182,7 @@ - name: OMERO.web starts on boot become: true - service: + ansible.builtin.service: name: "{{ item }}.service" enabled: true loop: diff --git a/omero/nightshade-webclients.yml b/omero/nightshade-webclients.yml index b4428ce9..86d48743 100644 --- a/omero/nightshade-webclients.yml +++ b/omero/nightshade-webclients.yml @@ -34,7 +34,7 @@ - name: reload nginx listen: ssl certificate changed become: true - service: + ansible.builtin.service: name: nginx state: reloaded diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index b7c1b75c..6f1336c6 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -161,7 +161,7 @@ - name: reload web server listen: ssl certificate changed become: true - service: + ansible.builtin.service: name: nginx state: reloaded diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index 597271a6..848d6fa4 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -104,7 +104,7 @@ - name: reload nginx listen: ssl certificate changed become: true - service: + ansible.builtin.service: name: nginx state: reloaded diff --git a/omero/omero-monitoring-agents.yml b/omero/omero-monitoring-agents.yml index 7e6444a3..a8d52dff 100644 --- a/omero/omero-monitoring-agents.yml +++ b/omero/omero-monitoring-agents.yml @@ -83,7 +83,7 @@ handlers: - name: restart nginx become: true - service: + ansible.builtin.service: name: nginx state: restarted @@ -108,6 +108,6 @@ handlers: - name: restart nginx become: true - service: + ansible.builtin.service: name: nginx state: restarted diff --git a/omero/sls-gallery.yml b/omero/sls-gallery.yml index f4d9e6c7..3cdfef77 100644 --- a/omero/sls-gallery.yml +++ b/omero/sls-gallery.yml @@ -154,7 +154,7 @@ - name: OMERO.web starts on boot become: true - service: + ansible.builtin.service: name: "{{ item }}.service" enabled: true loop: diff --git a/omero/training-server/letsencrypt.yml b/omero/training-server/letsencrypt.yml index 1b696505..28205be6 100644 --- a/omero/training-server/letsencrypt.yml +++ b/omero/training-server/letsencrypt.yml @@ -60,7 +60,7 @@ handlers: - name: reload nginx become: true - service: + ansible.builtin.service: name: nginx state: reloaded diff --git a/omero/training-server/maintenance/omero-restoredb.yml b/omero/training-server/maintenance/omero-restoredb.yml index db6acda9..d7c701e7 100644 --- a/omero/training-server/maintenance/omero-restoredb.yml +++ b/omero/training-server/maintenance/omero-restoredb.yml @@ -44,7 +44,7 @@ - name: Stop OMERO.server become: true - service: + ansible.builtin.service: name: omero-server state: stopped @@ -71,7 +71,7 @@ - name: Start OMERO.server become: true - service: + ansible.builtin.service: name: omero-server state: started diff --git a/web-proxy/playbook.yml b/web-proxy/playbook.yml index f6796046..cb6f9874 100644 --- a/web-proxy/playbook.yml +++ b/web-proxy/playbook.yml @@ -24,7 +24,7 @@ - name: reload nginx listen: ssl certificate changed become: true - service: + ansible.builtin.service: name: nginx state: reloaded diff --git a/www/www-deploy.yml b/www/www-deploy.yml index 69ef0dac..fd524508 100644 --- a/www/www-deploy.yml +++ b/www/www-deploy.yml @@ -11,7 +11,7 @@ - name: reload nginx listen: ssl certificate changed become: true - service: + ansible.builtin.service: name: nginx state: reloaded From 07e182a289e0f43c25b5924fcfad3de08952eabd Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 15:36:20 +0100 Subject: [PATCH 069/142] Replace copy with ansible.builtin as per lint instr --- molecule/release/prepare.yml | 6 +++--- omedev/docker-prod-apps.yml | 2 +- omero/learning.yml | 2 +- omero/omero-monitoring-agents.yml | 8 ++++---- omero/sls-gallery.yml | 2 +- omero/training-server/playbook.yml | 2 +- release/release-acceptance.yml | 6 +++--- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/molecule/release/prepare.yml b/molecule/release/prepare.yml index b7b3cfa1..741ed391 100644 --- a/molecule/release/prepare.yml +++ b/molecule/release/prepare.yml @@ -22,7 +22,7 @@ state: directory with_items: "{{ www_folders }}" - name: Create minor version redirects - copy: + ansible.builtin.copy: dest: "{{ item }}/component/3.1/.htaccess" content: "Redirect 301 /component/3.1 /component/3.1.8" with_items: "{{ www_folders }}" @@ -32,7 +32,7 @@ state: directory with_items: "{{ www_folders }}" - name: Create major version redirects - copy: + ansible.builtin.copy: dest: "{{ item }}/component/3/.htaccess" content: "Redirect 301 /component/3 /component/3.1.8" with_items: "{{ www_folders }}" @@ -42,7 +42,7 @@ state: directory with_items: "{{ www_folders }}" - name: Create latest version redirects - copy: + ansible.builtin.copy: dest: "{{ item }}/component/latest/.htaccess" content: "Redirect 301 /component/latest /component/3.1.8" with_items: "{{ www_folders }}" diff --git a/omedev/docker-prod-apps.yml b/omedev/docker-prod-apps.yml index 885db7fe..de09cfe2 100644 --- a/omedev/docker-prod-apps.yml +++ b/omedev/docker-prod-apps.yml @@ -275,7 +275,7 @@ - name: prometheus htpasswd file become: true - copy: + ansible.builtin.copy: dest: /etc/nginx/prometheus.htpasswd # default: admin:monitoring content: >- diff --git a/omero/learning.yml b/omero/learning.yml index 90bc4e84..4e2c9dac 100644 --- a/omero/learning.yml +++ b/omero/learning.yml @@ -175,7 +175,7 @@ - name: OMERO.web configuration is installed become: true - copy: + ansible.builtin.copy: src: "files/learning-omero-web.conf" dest: "/etc/nginx/conf.d/omero-web.conf" notify: restart nginx diff --git a/omero/omero-monitoring-agents.yml b/omero/omero-monitoring-agents.yml index a8d52dff..65533204 100644 --- a/omero/omero-monitoring-agents.yml +++ b/omero/omero-monitoring-agents.yml @@ -23,7 +23,7 @@ - name: omero-server prometheus jmx agents become: true - copy: + ansible.builtin.copy: dest: "{{ omero_common_basedir }}/server/config/prometheus.omero" src: omero-server-config-prometheus.omero mode: 0644 @@ -61,7 +61,7 @@ - name: Create monitoring htpasswd become: true - copy: + ansible.builtin.copy: content: >- "{{ secret_monitoring_nginx_htpasswd | default(monitoring_nginx_htpasswd) }}" @@ -73,7 +73,7 @@ # when scraping - name: Create nginx proxy for prometheus exporters become: true - copy: + ansible.builtin.copy: dest: /etc/nginx/conf.d-nested-includes/proxy-exporters.conf src: confd-nested-proxy-exporters.conf mode: 0644 @@ -98,7 +98,7 @@ tasks: - name: Create nginx proxy for prometheus web exporters become: true - copy: + ansible.builtin.copy: dest: /etc/nginx/conf.d-nested-includes/proxy-exporters-web.conf src: confd-nested-proxy-exporters-web.conf mode: 0644 diff --git a/omero/sls-gallery.yml b/omero/sls-gallery.yml index 3cdfef77..3e3f9a05 100644 --- a/omero/sls-gallery.yml +++ b/omero/sls-gallery.yml @@ -147,7 +147,7 @@ - name: OMERO.web configuration is installed become: true - copy: + ansible.builtin.copy: src: "files/sls-gallery-omero-web.conf" dest: "/etc/nginx/conf.d/omero-web.conf" notify: restart nginx diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index 338c085e..6c796663 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -419,7 +419,7 @@ - name: Create random minio admin credentials file become: true - copy: + ansible.builtin.copy: content: | MINIO_ACCESS_KEY={{ lookup('password', '/dev/null length=12') }} MINIO_SECRET_KEY={{ lookup('password', '/dev/null length=24') }} diff --git a/release/release-acceptance.yml b/release/release-acceptance.yml index d8144761..cc2ac642 100644 --- a/release/release-acceptance.yml +++ b/release/release-acceptance.yml @@ -53,7 +53,7 @@ when: not prerelease - name: Create minor version redirects - copy: + ansible.builtin.copy: dest: "{{ item }}/{{ product }}/{{ minorversion }}/.htaccess" content: "Redirect 301 /{{ product }}/{{ minorversion }} \ /{{ product }}/{{ version }}" @@ -70,7 +70,7 @@ when: not prerelease - name: Create major version redirects - copy: + ansible.builtin.copy: dest: "{{ item }}/{{ product }}/{{ majorversion }}/.htaccess" content: "Redirect 301 /{{ product }}/{{ majorversion }} \ /{{ product }}/{{ version }}" @@ -87,7 +87,7 @@ when: not prerelease - name: Create latest version redirect - copy: + ansible.builtin.copy: dest: "{{ item }}/{{ product }}/latest/.htaccess" content: "Redirect 301 /{{ product }}/latest \ /{{ product }}/{{ version }}" From e065aec60882e18cf048fdf4e7fc41ef2a948177 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 15:43:38 +0100 Subject: [PATCH 070/142] Replace -> ansible.builtin.replace as per instr in lint --- omero/learning.yml | 2 +- omero/nightshade-webclients.yml | 4 ++-- omero/ome-demoserver.yml | 4 ++-- omero/ome-dundeeomero.yml | 4 ++-- omero/sls-gallery.yml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/omero/learning.yml b/omero/learning.yml index 4e2c9dac..602cdc9f 100644 --- a/omero/learning.yml +++ b/omero/learning.yml @@ -155,7 +155,7 @@ - name: OMERO.server logs are compressed on rollover become: true - replace: + ansible.builtin.replace: path: "{{ item.path }}" regexp: "(\\\\$\\{om\ ero\\.logfile\\}\\.\\%i)(\\<\\/fileNamePattern\\>)" diff --git a/omero/nightshade-webclients.yml b/omero/nightshade-webclients.yml index 86d48743..e3b3007a 100644 --- a/omero/nightshade-webclients.yml +++ b/omero/nightshade-webclients.yml @@ -55,7 +55,7 @@ # post 2.3 'dest' should be renamed 'path' - name: NGINX - Performance tuning - worker processes become: true - replace: + ansible.builtin.replace: dest: "/etc/nginx/nginx.conf" regexp: '^worker_processes\s+\d+;' replace: >- @@ -67,7 +67,7 @@ # how-to-optimize-nginx-configuration - name: NGINX - Performance tuning - worker connections become: true - replace: + ansible.builtin.replace: dest: "/etc/nginx/nginx.conf" regexp: 'worker_connections\s+\d+;' replace: "worker_connections 65000;" diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index 6f1336c6..a0e90ee1 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -169,7 +169,7 @@ - name: NGINX - Performance tuning - worker processes become: true - replace: + ansible.builtin.replace: path: "/etc/nginx/nginx.conf" regexp: '^worker_processes\s+\d+;' replace: >- @@ -180,7 +180,7 @@ # how-to-optimize-nginx-configuration - name: NGINX - Performance tuning - worker connections become: true - replace: + ansible.builtin.replace: path: "/etc/nginx/nginx.conf" regexp: 'worker_connections\s+\d+;' replace: "worker_connections 65000;" diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index 848d6fa4..dcecf605 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -129,7 +129,7 @@ # post 2.3 'dest' should be renamed 'path' - name: NGINX - Performance tuning - worker processes become: true - replace: + ansible.builtin.replace: dest: "/etc/nginx/nginx.conf" regexp: '^worker_processes\s+\d+;' replace: "worker_processes 1;" @@ -141,7 +141,7 @@ # -to-optimize-nginx-configuration - name: NGINX - Performance tuning - worker connections become: true - replace: + ansible.builtin.replace: dest: "/etc/nginx/nginx.conf" regexp: 'worker_connections\s+\d+;' replace: "worker_connections 65000;" diff --git a/omero/sls-gallery.yml b/omero/sls-gallery.yml index 3e3f9a05..543aa1d8 100644 --- a/omero/sls-gallery.yml +++ b/omero/sls-gallery.yml @@ -137,7 +137,7 @@ - name: OMERO.server logs are compressed on rollover become: true - replace: + ansible.builtin.replace: path: "{{ item.path }}" regexp: "(\\\\$\\{om\ ero\\.logfile\\}\\.\\%i)(\\<\\/fileNamePattern\\>)" From 916ad419c524978c7171870e69e78e0c87626957 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 15:46:01 +0100 Subject: [PATCH 071/142] replace fail with ansible.builtin.fail --- omero/training-server/idr_data.yml | 2 +- release/release-acceptance.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/omero/training-server/idr_data.yml b/omero/training-server/idr_data.yml index f994034c..7d3c8db3 100644 --- a/omero/training-server/idr_data.yml +++ b/omero/training-server/idr_data.yml @@ -17,7 +17,7 @@ loop: "{{ studies | default([]) }}" - name: Fail if data directory is missing - fail: + ansible.builtin.fail: msg: "/uod/idr/filesets/{{ item.item }} does not exist" when: not item.stat.exists loop: "{{ stat_results.results }}" diff --git a/release/release-acceptance.yml b/release/release-acceptance.yml index cc2ac642..f49c8ec1 100644 --- a/release/release-acceptance.yml +++ b/release/release-acceptance.yml @@ -3,7 +3,7 @@ become: true tasks: - name: Check mandatory variables are defined - fail: + ansible.builtin.fail: msg: Please pass 'product' and 'version' variables when: product is not defined and version is not defined @@ -14,7 +14,7 @@ with_items: "{{ www_folders }}" - name: Check the release component exist - fail: + ansible.builtin.fail: msg: "{{ item }} does not exist" with_items: "{{ s.results }}" when: item.stat is not defined or not item.stat.exists From eca05638672ac626ed88443fb887d9ef47b34644 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 15:51:51 +0100 Subject: [PATCH 072/142] yum and template to ansible.builtin --- molecule/ome-pg-prod/prepare.yml | 2 +- molecule/resources/prepare-iproute.yml | 4 ++-- omero/nightshade-webclients.yml | 6 +++--- omero/ome-demoserver.yml | 20 ++++++++++---------- omero/ome-dundeeomero.yml | 8 ++++---- omero/training-server/letsencrypt.yml | 2 +- omero/training-server/playbook.yml | 12 ++++++------ www/playbook.yml | 2 +- www/www-static.yml | 4 ++-- 9 files changed, 30 insertions(+), 30 deletions(-) diff --git a/molecule/ome-pg-prod/prepare.yml b/molecule/ome-pg-prod/prepare.yml index fdb0d2d9..8d02fff8 100644 --- a/molecule/ome-pg-prod/prepare.yml +++ b/molecule/ome-pg-prod/prepare.yml @@ -3,6 +3,6 @@ tasks: - name: Install cron become: true - yum: + ansible.builtin.yum: name: cronie state: present diff --git a/molecule/resources/prepare-iproute.yml b/molecule/resources/prepare-iproute.yml index c004880a..6d086bd9 100644 --- a/molecule/resources/prepare-iproute.yml +++ b/molecule/resources/prepare-iproute.yml @@ -3,12 +3,12 @@ tasks: - name: Install iproute become: true - yum: + ansible.builtin.yum: name: iproute state: present - name: Install cron become: true - yum: + ansible.builtin.yum: name: cronie state: present diff --git a/omero/nightshade-webclients.yml b/omero/nightshade-webclients.yml index e3b3007a..be420658 100644 --- a/omero/nightshade-webclients.yml +++ b/omero/nightshade-webclients.yml @@ -43,7 +43,7 @@ - name: Install open-vm-tools if system is a VMware vm become: true - yum: + ansible.builtin.yum: name: open-vm-tools state: present when: > @@ -81,7 +81,7 @@ - name: NGINX - SSL Configuration become: true - template: + ansible.builtin.template: src: templates/nginx-confdnestedincludes-ssl-conf.j2 dest: /etc/nginx/conf.d-nested-includes/ssl.conf mode: 0644 @@ -90,7 +90,7 @@ - name: NGINX - Custom Paper Redirect become: true - template: + ansible.builtin.template: src: templates/nginx-confdnestedincludes-ns-pub-redirects-conf.j2 dest: /etc/nginx/conf.d-nested-includes/ns-pub-redirects.conf mode: 0644 diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index a0e90ee1..926ac440 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -7,7 +7,7 @@ pre_tasks: - name: Install open-vm-tools if system is a VMware vm become: true - yum: + ansible.builtin.yum: name: open-vm-tools state: installed when: > @@ -28,20 +28,20 @@ - name: Install Make Movie script Prerequisite | MEncoder - Repo become: true - yum: + ansible.builtin.yum: name: "http://li.nux.ro/download/nux/dextop/el7\ /x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm" state: present - name: Install Make Movie script Prerequisite | MEncoder - Package become: true - yum: + ansible.builtin.yum: name: mencoder state: present - name: Server-side script prerequisites become: true - yum: + ansible.builtin.yum: name: "{{ item }}" state: present with_items: @@ -194,7 +194,7 @@ - name: NGINX - SSL Configuration become: true - template: + ansible.builtin.template: src: templates/nginx-confdnestedincludes-ssl-conf.j2 dest: /etc/nginx/conf.d-nested-includes/ssl.conf mode: 0644 @@ -203,7 +203,7 @@ - name: NGINX - OMERO websockets become: true - template: + ansible.builtin.template: src: templates/nginx-confdnestedincludes-omerows-conf.j2 dest: /etc/nginx/conf.d-nested-includes/omerows.conf mode: 0644 @@ -212,7 +212,7 @@ - name: NGINX - websocket proxy support become: true - template: + ansible.builtin.template: src: templates/nginx-confd-websockets-conf.j2 dest: /etc/nginx/conf.d/websockets.conf mode: 0644 @@ -221,7 +221,7 @@ - name: Config for OMERO.web plugins become: true - template: + ansible.builtin.template: src: templates/omero-web-config-for-webapps.j2 dest: >- "{{ omero_web_basedir }}/config/omero-web-config-for-webapps.omero" @@ -233,7 +233,7 @@ - name: OMERO.web config for CORS become: true - template: + ansible.builtin.template: src: templates/omero-web-config-for-cors.j2 dest: "{{ omero_web_basedir }}/config/omero-web-config-for-cors.omero" owner: "root" @@ -244,7 +244,7 @@ - name: OMERO.web config for signup app become: true - template: + ansible.builtin.template: src: templates/omero-web-config-signup.j2 dest: "{{ omero_web_basedir }}/config/omero-web-config-signup.omero" # Contains sensitive info diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index dcecf605..235bea96 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -4,7 +4,7 @@ pre_tasks: - name: Install open-vm-tools if system is a VMware vm become: true - yum: + ansible.builtin.yum: name: open-vm-tools state: present when: > @@ -26,7 +26,7 @@ - name: Install Make Movie script Prerequisite | MEncoder - Repo become: true - yum: + ansible.builtin.yum: name: "http://li.nux.ro/download/nux/dextop/el7\ /x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm" state: present @@ -34,7 +34,7 @@ # web server is included for decoupled OMERO.web - name: OMERO.figure server-side&script prerequisites & web server become: true - yum: + ansible.builtin.yum: name: "{{ item }}" state: present with_items: @@ -158,7 +158,7 @@ # post 2.3 'destfile' should be renamed 'path' - name: NGINX - Configuration become: true - template: + ansible.builtin.template: src: nginx-omero.conf.j2 dest: /etc/nginx/conf.d/omero-web.conf mode: 0644 diff --git a/omero/training-server/letsencrypt.yml b/omero/training-server/letsencrypt.yml index 28205be6..5a071618 100644 --- a/omero/training-server/letsencrypt.yml +++ b/omero/training-server/letsencrypt.yml @@ -50,7 +50,7 @@ - name: letsencrypt nginx configuration become: true - template: + ansible.builtin.template: src: templates/nginx-letsencrypt-conf.j2 dest: /etc/nginx/conf.d-nested-includes/https.conf mode: 0644 diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index 6c796663..598bc5da 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -8,7 +8,7 @@ - name: Install Make Movie script Prerequisite | MEncoder - Repo become: true - yum: + ansible.builtin.yum: name: "http://li.nux.ro/download/nux/dextop/el7/x86_64\ /nux-dextop-release-0-5.el7.nux.noarch.rpm" state: present @@ -16,7 +16,7 @@ # web server is included for decoupled OMERO.web - name: OMERO.figure server-side&script prerequisites & web server become: true - yum: + ansible.builtin.yum: name: "{{ item }}" state: present with_items: @@ -24,7 +24,7 @@ - name: Prerequisites for ldap become: true - yum: + ansible.builtin.yum: name: "{{ item }}" state: present with_items: @@ -47,7 +47,7 @@ - name: NGINX - websocket proxy support become: true - template: + ansible.builtin.template: src: templates/nginx-confd-websockets-conf.j2 dest: /etc/nginx/conf.d/websockets.conf mode: 0644 @@ -227,7 +227,7 @@ tasks: - name: Docker | python client become: true - yum: + ansible.builtin.yum: name: docker-python state: present @@ -443,7 +443,7 @@ - name: Nginx - docker webservices support become: true - template: + ansible.builtin.template: src: templates/nginx-confdnestedincludes-{{ item }}.j2 dest: /etc/nginx/conf.d-nested-includes/{{ item }}.conf mode: 0644 diff --git a/www/playbook.yml b/www/playbook.yml index caa630d7..7e86ef50 100644 --- a/www/playbook.yml +++ b/www/playbook.yml @@ -6,7 +6,7 @@ pre_tasks: - name: Install open-vm-tools if system is a VMware vm become: true - yum: + ansible.builtin.yum: name: open-vm-tools state: installed when: > diff --git a/www/www-static.yml b/www/www-static.yml index aa158c18..175c0df6 100644 --- a/www/www-static.yml +++ b/www/www-static.yml @@ -37,14 +37,14 @@ tasks: - name: install deployment script become: true - template: + ansible.builtin.template: src: files/deploy dest: /usr/local/bin/deploy mode: 0555 - name: Install Cron daemon become: true - yum: + ansible.builtin.yum: name: cronie state: installed From 3164258a8cf5d515b2f09b4572c550f92c5f4d1d Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 15:54:08 +0100 Subject: [PATCH 073/142] get_url for ansible.builtin --- omero/ome-demoserver.yml | 2 +- omero/ome-dundeeomero.yml | 6 +++--- omero/training-server/playbook.yml | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index 926ac440..97b1d60c 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -320,7 +320,7 @@ - name: Download the Figure_To_Pdf.py script become: true get_url: - url: >- + ansible.builtin.url: >- https://raw.githubusercontent.com/ome/omero-figure/ {{ omero_figure_script_release }}/omero_figure/scripts/omero/ figure_scripts/Figure_To_Pdf.py diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index 235bea96..f1fa22af 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -183,7 +183,7 @@ - name: Download the Figure_To_Pdf.py script become: true get_url: - url: "https://raw.githubusercontent.com/ome/omero-figure\ + ansible.builtin.url: "https://raw.githubusercontent.com/ome/omero-figure\ /v{{ omero_figure_release }}/omero_figure/scripts\ /omero/figure_scripts/Figure_To_Pdf.py" dest: "/opt/omero/server/OMERO.server/lib/scripts\ @@ -195,7 +195,7 @@ - name: Download the Dataset_Images_To_New_Figure.py script become: true get_url: - url: "https://raw.githubusercontent.com/ome/omero-guide-figure + ansible.builtin.url: "https://raw.githubusercontent.com/ome/omero-guide-figure /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Dataset\ _Images_To_New_Figure.py" dest: "/opt/omero/server/OMERO.server/lib/scripts\ @@ -207,7 +207,7 @@ - name: Download the Figure_Images_To_Dataset.py script become: true get_url: - url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ + ansible.builtin.url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Figure\ _Images_To_Dataset.py" dest: "/opt/omero/server/OMERO.server/lib/scripts\ diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index 598bc5da..2645ac61 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -244,7 +244,7 @@ - name: Download the Figure_To_Pdf.py script become: true get_url: - url: >- + ansible.builtin.url: >- https://raw.githubusercontent.com/ome/omero-figure/v{{ omero_figure_release }}/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py @@ -258,7 +258,7 @@ - name: Download the Dataset_Images_To_New_Figure.py script become: true get_url: - url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ + ansible.builtin.url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts\ /Dataset_Images_To_New_Figure.py" dest: "/opt/omero/server/OMERO.server/lib/scripts\ @@ -271,7 +271,7 @@ - name: Download the Figure_Images_To_Dataset.py script become: true get_url: - url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ + ansible.builtin.url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts\ /Figure_Images_To_Dataset.py" dest: "/opt/omero/server/OMERO.server/lib/scripts\ @@ -295,7 +295,7 @@ - name: Download the Scipy_Gaussian_Filter.py script become: true get_url: - url: >- + ansible.builtin.url: >- https://raw.githubusercontent.com/ome/omero-guide-python/v{{ ome_training_scripts_release }}/scripts/scipy_gaussian_filter.py dest: "/opt/omero/server/OMERO.server/lib/scripts\ @@ -308,7 +308,7 @@ - name: Download the simple_frap.py script become: true get_url: - url: >- + ansible.builtin.url: >- https://raw.githubusercontent.com/ome/omero-guide-python/v{{ ome_training_scripts_release }}/scripts/simple_frap.py dest: "/opt/omero/server/OMERO.server/lib/scripts\ @@ -321,7 +321,7 @@ - name: Download the simple_frap_with_figure.py script become: true get_url: - url: >- + ansible.builtin.url: >- https://raw.githubusercontent.com/ome/omero-guide-python/v{{ ome_training_scripts_release }}/scripts/simple_frap_with_figure.py dest: "/opt/omero/server/OMERO.server/lib/scripts\ @@ -342,7 +342,7 @@ - name: Download the ldap scripts become: true get_url: - url: >- + ansible.builtin.url: >- https://raw.githubusercontent.com/openmicroscopy/apacheds-docker/{{ apache_docker_release }}/bin/ldapmanager dest: /home/ldap/ldapmanager @@ -485,7 +485,7 @@ - name: Download minio client become: true get_url: - url: "https://dl.min.io/client/mc/release\ + ansible.builtin.url: "https://dl.min.io/client/mc/release\ /linux-amd64/archive/mc.RELEASE.2020-11-25T23-04-07Z" checksum: "sha256:985c43f9bec8fdc4ef2ee44c63\ c9657e10c4cfeb5cb949179d6d693f7428c314" From 03cc14d33a4e49b790b80c28d92aae61ebf14453 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 15:56:15 +0100 Subject: [PATCH 074/142] stat to ansible.builtin --- omero/ome-demoserver.yml | 6 +++--- omero/training-server/idr_data.yml | 2 +- omero/training-server/playbook.yml | 2 +- release/release-acceptance.yml | 2 +- www/playbook.yml | 4 ++-- www/www-static.yml | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index 97b1d60c..30a6000a 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -257,7 +257,7 @@ - name: Check_MK postgres plugin | check for plugin existence tags: monitoring - stat: + ansible.builtin.stat: path: "{{ check_mk_agent_plugin_path }}/mk_postgres" register: check_mk_postgres_plugin_st @@ -272,7 +272,7 @@ - name: Check_MK logwatch plugin | check for plugin existence tags: monitoring - stat: + ansible.builtin.stat: path: "{{ check_mk_agent_plugin_path }}/mk_logwatch" register: check_mk_logwatch_plugin_st @@ -287,7 +287,7 @@ - name: Check_MK logwatch plugin | check for default config file tags: monitoring - stat: + ansible.builtin.stat: path: "{{ check_mk_agent_config_example_path }}/logwatch.cfg" register: check_mk_logwatch_plugin_conf_st diff --git a/omero/training-server/idr_data.yml b/omero/training-server/idr_data.yml index 7d3c8db3..24ae8131 100644 --- a/omero/training-server/idr_data.yml +++ b/omero/training-server/idr_data.yml @@ -11,7 +11,7 @@ loop: "{{ studies | default([]) }}" - name: Check existence of study data directory - stat: + ansible.builtin.stat: path: /uod/idr/filesets/{{ item.name }} register: stat_results loop: "{{ studies | default([]) }}" diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index 2645ac61..04a54089 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -413,7 +413,7 @@ - name: Check if minio admin credentials exists become: true - stat: + ansible.builtin.stat: path: /etc/minio/docker-minio.env register: _minio_docker_env_st diff --git a/release/release-acceptance.yml b/release/release-acceptance.yml index f49c8ec1..b7c91be3 100644 --- a/release/release-acceptance.yml +++ b/release/release-acceptance.yml @@ -8,7 +8,7 @@ when: product is not defined and version is not defined - name: Check the release component exist - stat: + ansible.builtin.stat: path: "{{ item }}/{{ product }}/{{ version }}/" register: s with_items: "{{ www_folders }}" diff --git a/www/playbook.yml b/www/playbook.yml index 7e86ef50..140297e1 100644 --- a/www/playbook.yml +++ b/www/playbook.yml @@ -73,7 +73,7 @@ - name: Check_MK logwatch plugin | check for plugin existence tags: monitoring - stat: + ansible.builtin.stat: path: "{{ check_mk_agent_plugin_path }}/mk_logwatch" register: check_mk_logwatch_plugin_st @@ -88,7 +88,7 @@ - name: Check_MK logwatch plugin | check for default config file tags: monitoring - stat: + ansible.builtin.stat: path: "{{ check_mk_agent_config_example_path }}/logwatch.cfg" register: check_mk_logwatch_plugin_conf_st diff --git a/www/www-static.yml b/www/www-static.yml index 175c0df6..379b0ddd 100644 --- a/www/www-static.yml +++ b/www/www-static.yml @@ -4,12 +4,12 @@ pre_tasks: - name: Check if phpbbforum already unzipped - stat: + ansible.builtin.stat: path: "{{ phpbbforum_style_file }}" register: _phpbbforum_style_file_st - name: Check if schemas_documentation already unzipped - stat: + ansible.builtin.stat: path: "{{ schemas_doc_file }}" register: _schemas_doc_file_st From 52677ce6d1ffa7f22e9ba3a8c7618b96e2cdeed4 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 15:58:48 +0100 Subject: [PATCH 075/142] file to ansible.builtin --- molecule/release/prepare.yml | 14 +++++++------- omedev/docker-prod-apps.yml | 8 ++++---- omero/nightshade-webclients.yml | 2 +- omero/ome-demoserver.yml | 6 +++--- omero/ome-dundeeomero.yml | 8 ++++---- omero/training-server/letsencrypt.yml | 2 +- .../maintenance/omero-restoredb.yml | 2 +- omero/training-server/playbook.yml | 12 ++++++------ release/permissions.yml | 6 +++--- release/public-images.yml | 4 ++-- release/release-acceptance.yml | 10 +++++----- 11 files changed, 37 insertions(+), 37 deletions(-) diff --git a/molecule/release/prepare.yml b/molecule/release/prepare.yml index 741ed391..94acb338 100644 --- a/molecule/release/prepare.yml +++ b/molecule/release/prepare.yml @@ -9,7 +9,7 @@ - 3.2.0-rc1 tasks: - name: Create existing released components - file: + ansible.builtin.file: path: "{{ item }}/component/3.1.8" state: directory owner: root @@ -17,7 +17,7 @@ mode: 01555 with_items: "{{ www_folders }}" - name: Create minor version directory - file: + ansible.builtin.file: path: "{{ item }}/component/3.1" state: directory with_items: "{{ www_folders }}" @@ -27,7 +27,7 @@ content: "Redirect 301 /component/3.1 /component/3.1.8" with_items: "{{ www_folders }}" - name: Create major version directory - file: + ansible.builtin.file: path: "{{ item }}/component/3" state: directory with_items: "{{ www_folders }}" @@ -37,7 +37,7 @@ content: "Redirect 301 /component/3 /component/3.1.8" with_items: "{{ www_folders }}" - name: Create latest version directory - file: + ansible.builtin.file: path: "{{ item }}/component/latest" state: directory with_items: "{{ www_folders }}" @@ -47,7 +47,7 @@ content: "Redirect 301 /component/latest /component/3.1.8" with_items: "{{ www_folders }}" - name: Create new release components - file: + ansible.builtin.file: path: "{{ item[0] }}/component/{{ item[1] }}" state: directory mode: 01777 @@ -55,14 +55,14 @@ - "{{ www_folders }}" - "{{ releases }}" - name: Create .htaccess file - file: + ansible.builtin.file: path: "{{ item[0] }}/component/{{ item[1] }}/.htaccess" state: touch with_nested: - "{{ www_folders }}" - "{{ releases }}" - name: Create mock content - file: + ansible.builtin.file: path: "{{ item[0] }}/component/{{ item[1] }}/test" state: touch mode: 01777 diff --git a/omedev/docker-prod-apps.yml b/omedev/docker-prod-apps.yml index de09cfe2..6f23b2af 100644 --- a/omedev/docker-prod-apps.yml +++ b/omedev/docker-prod-apps.yml @@ -8,7 +8,7 @@ - name: Create Prometheus data directory become: true - file: + ansible.builtin.file: path: "{{ prometheus_docker_data_volume }}" owner: "{{ prometheus_docker_user }}" group: root @@ -17,7 +17,7 @@ - name: Create Minio data directory become: true - file: + ansible.builtin.file: path: "{{ nfs_minio_data_volume }}" owner: root group: root @@ -26,7 +26,7 @@ - name: Create Redmine data directory become: true - file: + ansible.builtin.file: path: "{{ redmine_tracker_docker_data_volume }}" owner: "{{ redmine_docker_user }}" group: "{{ redmine_docker_user }}" @@ -268,7 +268,7 @@ - name: prometheus htpasswd parent directory become: true - file: + ansible.builtin.file: path: /etc/nginx state: directory mode: 0755 diff --git a/omero/nightshade-webclients.yml b/omero/nightshade-webclients.yml index be420658..f400ec1e 100644 --- a/omero/nightshade-webclients.yml +++ b/omero/nightshade-webclients.yml @@ -74,7 +74,7 @@ - name: NGINX - create nested includes directory become: true - file: + ansible.builtin.file: path: /etc/nginx/conf.d-nested-includes state: directory mode: 0755 diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index 30a6000a..4d4fc658 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -187,7 +187,7 @@ - name: NGINX - create nested includes directory become: true - file: + ansible.builtin.file: path: /etc/nginx/conf.d-nested-includes state: directory mode: 0755 @@ -302,13 +302,13 @@ - name: PostgreSQL Nightly Backups | Remove old cron job become: true - file: + ansible.builtin.file: path: /etc/cron.daily/nightly-pg_dump-omero.sh state: absent - name: Create a figure scripts directory become: true - file: + ansible.builtin.file: path: >- "{{ omero_server_basedir }}/OMERO.server/lib/ scripts/omero/figure_scripts" diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index f1fa22af..c717ce75 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -114,7 +114,7 @@ # thus we need to create another tmp - name: Create another temporary directory become: true - file: + ansible.builtin.file: path: "{{ omero_server_systemd_environment.OMERO_TMPDIR }}" state: directory mode: 0700 @@ -150,7 +150,7 @@ - name: NGINX - create nested includes directory become: true - file: + ansible.builtin.file: path: /etc/nginx/conf.d-nested-includes state: directory mode: 0755 @@ -167,13 +167,13 @@ - name: PostgreSQL Nightly Backups | Remove old cron job become: true - file: + ansible.builtin.file: path: /etc/cron.daily/nightly-pg_dump-omero.sh state: absent - name: Create a figure scripts directory become: true - file: + ansible.builtin.file: path: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts state: directory mode: 0755 diff --git a/omero/training-server/letsencrypt.yml b/omero/training-server/letsencrypt.yml index 5a071618..a98fad71 100644 --- a/omero/training-server/letsencrypt.yml +++ b/omero/training-server/letsencrypt.yml @@ -7,7 +7,7 @@ - name: letsencrypt challenge directory become: true - file: + ansible.builtin.file: path: /srv/www/letsencrypt/.well-known/ recurse: true state: directory diff --git a/omero/training-server/maintenance/omero-restoredb.yml b/omero/training-server/maintenance/omero-restoredb.yml index d7c701e7..f9cbf605 100644 --- a/omero/training-server/maintenance/omero-restoredb.yml +++ b/omero/training-server/maintenance/omero-restoredb.yml @@ -76,7 +76,7 @@ state: started - name: Delete temporary files - file: + ansible.builtin.file: path: "/tmp/{{ item | basename }}" state: absent with_items: diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index 04a54089..02387d7e 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -37,7 +37,7 @@ # the directories are created in advance - name: Create nginx include directories become: true - file: + ansible.builtin.file: path: "{{ item }}" state: directory mode: 0755 @@ -233,7 +233,7 @@ - name: Create a figure scripts directory become: true - file: + ansible.builtin.file: path: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts state: directory mode: 0755 @@ -283,7 +283,7 @@ - name: Create a workshop_scripts directory become: true - file: + ansible.builtin.file: path: "/opt/omero/server/OMERO.server/lib/scripts\ /omero/workshop_scripts" state: directory @@ -333,7 +333,7 @@ - name: Create a directory for ldap scripts become: true - file: + ansible.builtin.file: path: /home/ldap state: directory mode: 0755 @@ -351,7 +351,7 @@ - name: Add DropBox folder for trainer-1 become: true - file: + ansible.builtin.file: path: /home/DropBox/trainer-1 state: directory mode: 0755 @@ -406,7 +406,7 @@ - name: Create minio config directory become: true - file: + ansible.builtin.file: path: /etc/minio state: directory mode: 0755 diff --git a/release/permissions.yml b/release/permissions.yml index c16e91cd..f12d8584 100644 --- a/release/permissions.yml +++ b/release/permissions.yml @@ -3,7 +3,7 @@ become: true tasks: - name: set perms /uod/idr/www - file: + ansible.builtin.file: path: /uod/idr/www state: directory owner: root @@ -11,7 +11,7 @@ mode: 0755 - name: set perms2 - file: + ansible.builtin.file: path: "{{ item }}" state: directory owner: root @@ -27,7 +27,7 @@ register: "products" - name: set perms3 - file: + ansible.builtin.file: path: "{{ item }}" state: directory owner: root diff --git a/release/public-images.yml b/release/public-images.yml index 41f99437..44cca523 100644 --- a/release/public-images.yml +++ b/release/public-images.yml @@ -3,7 +3,7 @@ become: true tasks: - name: create symlinks for public images - file: + ansible.builtin.file: force: true src: "../../../repos/curated/{{ item.key }}/public/" dest: > @@ -13,7 +13,7 @@ state: link with_dict: "{{ public_folders }}" - name: check public images - file: + ansible.builtin.file: force: true src: "{{ item.src }}" dest: > diff --git a/release/release-acceptance.yml b/release/release-acceptance.yml index b7c91be3..0c00eef0 100644 --- a/release/release-acceptance.yml +++ b/release/release-acceptance.yml @@ -29,13 +29,13 @@ majorversion: "{{ version.split('.')[:1] | join('.') }}" - name: Remove .htaccess file - file: + ansible.builtin.file: path: "{{ item }}/{{ product }}/{{ version }}/.htaccess" state: absent with_items: "{{ www_folders }}" - name: Make release folders read-only and owned by root - file: + ansible.builtin.file: path: "{{ item }}/{{ product }}/{{ version }}" state: directory owner: root @@ -45,7 +45,7 @@ with_items: "{{ www_folders }}" - name: Create minor version directory - file: + ansible.builtin.file: path: "{{ item }}/{{ product }}/{{ minorversion }}" state: directory mode: 0755 @@ -62,7 +62,7 @@ when: not prerelease - name: Create minor version directory - file: + ansible.builtin.file: path: "{{ item }}/{{ product }}/{{ majorversion }}" state: directory mode: 0755 @@ -79,7 +79,7 @@ when: not prerelease - name: Create latest version directory - file: + ansible.builtin.file: path: "{{ item }}/{{ product }}/latest" state: directory mode: 0755 From 65fa39016ccf75137bc6f3cb90d71f3677512ecb Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 16:05:19 +0100 Subject: [PATCH 076/142] command to ansible.builtin --- omero/ome-demoserver.yml | 6 +++--- omero/training-server/maintenance/omero-restoredb.yml | 4 ++-- www/playbook.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index 4d4fc658..f639bf8c 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -264,7 +264,7 @@ - name: Check_MK postgres plugin | activate the plugin tags: monitoring become: true - command: > + ansible.builtin.command: > cp "{{ check_mk_agent_plugin_path }}/mk_postgres" /usr/share/check-mk-agent/plugins/ creates=/usr/share/check-mk-agent/plugins/mk_postgres @@ -279,7 +279,7 @@ - name: Check_MK logwatch plugin | activate the plugin tags: monitoring become: true - command: > + ansible.builtin.command: > cp "{{ check_mk_agent_plugin_path }}/mk_logwatch" /usr/share/check-mk-agent/plugins/ creates=/usr/share/check-mk-agent/plugins/mk_logwatch @@ -294,7 +294,7 @@ - name: Check_MK logwatch plugin | copy the default config tags: monitoring become: true - command: > + ansible.builtin.command: > cp "{{ check_mk_agent_config_example_path }}/logwatch.cfg" "{{ check_mk_agent_config_path }}/logwatch.cfg" creates="{{ check_mk_agent_config_path }}/logwatch.cfg" diff --git a/omero/training-server/maintenance/omero-restoredb.yml b/omero/training-server/maintenance/omero-restoredb.yml index f9cbf605..376cf28c 100644 --- a/omero/training-server/maintenance/omero-restoredb.yml +++ b/omero/training-server/maintenance/omero-restoredb.yml @@ -59,13 +59,13 @@ - name: Restore OMERO database become: true become_user: postgres - command: >- + ansible.builtin.command: >- pg_restore --clean -d omero "/tmp/{{ omero_restore_db_dump_file | basename }}" - name: Upgrade OMERO database become: omero-server - command: >- + ansible.builtin.command: >- /opt/omero/omego/bin/omego db upgrade --serverdir /opt/omero/server/OMERO.server diff --git a/www/playbook.yml b/www/playbook.yml index 140297e1..fc613792 100644 --- a/www/playbook.yml +++ b/www/playbook.yml @@ -80,7 +80,7 @@ - name: Check_MK logwatch plugin | activate the plugin tags: monitoring become: true - command: >- + ansible.builtin.command: >- cp "{{ check_mk_agent_plugin_path }}/mk_logwatch" /usr/share/check-mk-agent/plugins/ creates=/usr/share/check-mk-agent/plugins/mk_logwatch @@ -95,7 +95,7 @@ - name: Check_MK logwatch plugin | copy the default config tags: monitoring become: true - command: >- + ansible.builtin.command: >- cp "{{ check_mk_agent_config_example_path }}/logwatch.cfg" "{{ check_mk_agent_config_path }}/logwatch.cfg" creates="{{ check_mk_agent_config_path }}/logwatch.cfg" From 5692e878a59abb2ca955d273a504eb250a2aad19 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 16:19:48 +0100 Subject: [PATCH 077/142] get_url to ansible.builtin --- omero/ome-demoserver.yml | 2 +- omero/ome-dundeeomero.yml | 6 +++--- omero/training-server/playbook.yml | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index f639bf8c..cb0d3aea 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -319,7 +319,7 @@ - name: Download the Figure_To_Pdf.py script become: true - get_url: + ansible.builtin.get_url: ansible.builtin.url: >- https://raw.githubusercontent.com/ome/omero-figure/ {{ omero_figure_script_release }}/omero_figure/scripts/omero/ diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index c717ce75..aad9bfd2 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -182,7 +182,7 @@ - name: Download the Figure_To_Pdf.py script become: true - get_url: + ansible.builtin.get_url: ansible.builtin.url: "https://raw.githubusercontent.com/ome/omero-figure\ /v{{ omero_figure_release }}/omero_figure/scripts\ /omero/figure_scripts/Figure_To_Pdf.py" @@ -194,7 +194,7 @@ - name: Download the Dataset_Images_To_New_Figure.py script become: true - get_url: + ansible.builtin.get_url: ansible.builtin.url: "https://raw.githubusercontent.com/ome/omero-guide-figure /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Dataset\ _Images_To_New_Figure.py" @@ -206,7 +206,7 @@ - name: Download the Figure_Images_To_Dataset.py script become: true - get_url: + ansible.builtin.get_url: ansible.builtin.url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Figure\ _Images_To_Dataset.py" diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index 02387d7e..d9ce7895 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -243,7 +243,7 @@ - name: Download the Figure_To_Pdf.py script become: true - get_url: + ansible.builtin.get_url: ansible.builtin.url: >- https://raw.githubusercontent.com/ome/omero-figure/v{{ omero_figure_release @@ -257,7 +257,7 @@ - name: Download the Dataset_Images_To_New_Figure.py script become: true - get_url: + ansible.builtin.get_url: ansible.builtin.url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts\ /Dataset_Images_To_New_Figure.py" @@ -270,7 +270,7 @@ - name: Download the Figure_Images_To_Dataset.py script become: true - get_url: + ansible.builtin.get_url: ansible.builtin.url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts\ /Figure_Images_To_Dataset.py" @@ -294,7 +294,7 @@ - name: Download the Scipy_Gaussian_Filter.py script become: true - get_url: + ansible.builtin.get_url: ansible.builtin.url: >- https://raw.githubusercontent.com/ome/omero-guide-python/v{{ ome_training_scripts_release }}/scripts/scipy_gaussian_filter.py @@ -307,7 +307,7 @@ - name: Download the simple_frap.py script become: true - get_url: + ansible.builtin.get_url: ansible.builtin.url: >- https://raw.githubusercontent.com/ome/omero-guide-python/v{{ ome_training_scripts_release }}/scripts/simple_frap.py @@ -320,7 +320,7 @@ - name: Download the simple_frap_with_figure.py script become: true - get_url: + ansible.builtin.get_url: ansible.builtin.url: >- https://raw.githubusercontent.com/ome/omero-guide-python/v{{ ome_training_scripts_release }}/scripts/simple_frap_with_figure.py @@ -341,7 +341,7 @@ - name: Download the ldap scripts become: true - get_url: + ansible.builtin.get_url: ansible.builtin.url: >- https://raw.githubusercontent.com/openmicroscopy/apacheds-docker/{{ apache_docker_release }}/bin/ldapmanager @@ -484,7 +484,7 @@ # blob/0.1.0/tasks/minio-client.yml - name: Download minio client become: true - get_url: + ansible.builtin.get_url: ansible.builtin.url: "https://dl.min.io/client/mc/release\ /linux-amd64/archive/mc.RELEASE.2020-11-25T23-04-07Z" checksum: "sha256:985c43f9bec8fdc4ef2ee44c63\ From 8c27dc240d5cbfff4929ba4df060554afab6ca84 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 16:21:07 +0100 Subject: [PATCH 078/142] find to ansible.builtin --- omero/learning.yml | 2 +- omero/sls-gallery.yml | 2 +- release/permissions.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/omero/learning.yml b/omero/learning.yml index 602cdc9f..6a33beb3 100644 --- a/omero/learning.yml +++ b/omero/learning.yml @@ -148,7 +148,7 @@ tasks: - name: find OMERO.server log configuration become: true - find: + ansible.builtin.find: paths: /opt/omero/server/OMERO.server/etc/ patterns: "logback*.xml" register: logbacks diff --git a/omero/sls-gallery.yml b/omero/sls-gallery.yml index 543aa1d8..b89243d4 100644 --- a/omero/sls-gallery.yml +++ b/omero/sls-gallery.yml @@ -130,7 +130,7 @@ tasks: - name: find OMERO.server log configuration become: true - find: + ansible.builtin.find: paths: /opt/omero/server/OMERO.server/etc/ patterns: "logback*.xml" register: logbacks diff --git a/release/permissions.yml b/release/permissions.yml index f12d8584..d65b448c 100644 --- a/release/permissions.yml +++ b/release/permissions.yml @@ -20,7 +20,7 @@ with_items: "{{ www_folders }}" - name: set perms3 www_folders - find: + ansible.builtin.find: paths: "{{ www_folders }}" file_type: "directory" recurse: "no" From 1c54aba418960715b303a9a1e1021a8c1668cd68 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 16:24:35 +0100 Subject: [PATCH 079/142] user to ansible.builtin --- omero/training-server/playbook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index d9ce7895..a78a6e3d 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -361,7 +361,7 @@ - name: Add operating system user "importer1" become: true - user: + ansible.builtin.user: name: "importer1" state: present groups: "{{ omero_server_system_managedrepo_group }}" From 0a89cd7ed9dbdd9ba29d7fdabf4e8274f8791460 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 16:25:53 +0100 Subject: [PATCH 080/142] cron to ansible.builtin --- www/www-static.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/www-static.yml b/www/www-static.yml index 379b0ddd..b90e05d8 100644 --- a/www/www-static.yml +++ b/www/www-static.yml @@ -50,7 +50,7 @@ - name: Add cron job updating the website become: true - cron: + ansible.builtin.cron: name: "Deploy the website" special_time: hourly job: >- From dc4e1934117323339ba891815dedddcf4feff18c Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 16:26:48 +0100 Subject: [PATCH 081/142] systemd to ansible.builtin systemd --- omero/ome-dundeeomero.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index aad9bfd2..b3e5aff8 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -122,7 +122,7 @@ - name: NGINX - enable service / start on boot become: true - systemd: + ansible.builtin.systemd: name: nginx enabled: true From 33ece070c1f81c61a0e559739112411a0fb3dcf7 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 16:35:58 +0100 Subject: [PATCH 082/142] git to ansible.builtin --- omero/training-server/idr_data.yml | 2 +- release/presentations.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/omero/training-server/idr_data.yml b/omero/training-server/idr_data.yml index 24ae8131..989b6a83 100644 --- a/omero/training-server/idr_data.yml +++ b/omero/training-server/idr_data.yml @@ -3,7 +3,7 @@ tasks: - name: Clone study metadata become: true - git: + ansible.builtin.git: dest: /uod/idr/metadata/{{ item.name }} repo: https://github.com/IDR/{{ item.name }} update: true diff --git a/release/presentations.yml b/release/presentations.yml index b067a99c..66d863e7 100644 --- a/release/presentations.yml +++ b/release/presentations.yml @@ -3,7 +3,7 @@ become: true tasks: - name: update presentations - git: + ansible.builtin.git: repo: https://github.com/ome/presentations force: false update: true From 5e0b6ab7ddeaf3455542f62e4c12eb663923c3b2 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 16:38:23 +0100 Subject: [PATCH 083/142] unarchive to ansible.builtin --- omero/training-server/maintenance/omero-restoredb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/training-server/maintenance/omero-restoredb.yml b/omero/training-server/maintenance/omero-restoredb.yml index 376cf28c..3dca12f7 100644 --- a/omero/training-server/maintenance/omero-restoredb.yml +++ b/omero/training-server/maintenance/omero-restoredb.yml @@ -51,7 +51,7 @@ # Assumes the owner and group information in the archive is correct - name: Restore OMERO data directory become: true - unarchive: + ansible.builtin.unarchive: src: "/tmp/{{ omero_restore_data_dump_file | basename }}" dest: / remote_src: true From 8baa340d537e4618a58b73a88f1a3d21b514100f Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 16:40:35 +0100 Subject: [PATCH 084/142] lineinfile to ansible.builtin --- omero/training-server/playbook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index a78a6e3d..6727017f 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -370,7 +370,7 @@ - name: Allow managed repo group to login become: true - lineinfile: + ansible.builtin.lineinfile: path: /etc/security/access.conf regexp: "{{ omero_server_system_managedrepo_group }}" insertbefore: BOF From b548d38ad74ac2264c06e985f2276267b15783a7 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 16:42:10 +0100 Subject: [PATCH 085/142] blockinfile to ansible.builtin --- www/www-static.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/www-static.yml b/www/www-static.yml index b90e05d8..15934e3a 100644 --- a/www/www-static.yml +++ b/www/www-static.yml @@ -59,7 +59,7 @@ - name: Update static phpbb stylesheet become: true - blockinfile: + ansible.builtin.blockinfile: block: | form, .quick-login, From e662f1013849ba78c9206f8090067bddde46fb29 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 16:48:51 +0100 Subject: [PATCH 086/142] fix yaml[comments] --- molecule/omero-training-server/molecule.yml | 2 +- omero/ome-demoserver.yml | 2 +- omero/training-server/letsencrypt.yml | 8 ++++---- omero/training-server/playbook.yml | 8 ++++---- site.yml | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/molecule/omero-training-server/molecule.yml b/molecule/omero-training-server/molecule.yml index 6add4d5c..a9737f23 100644 --- a/molecule/omero-training-server/molecule.yml +++ b/molecule/omero-training-server/molecule.yml @@ -52,7 +52,7 @@ scenario: - prepare - converge # FIXME: Some tasks are not idempotent - #- idempotence + # - idempotence - verify - destroy verifier: diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index cb0d3aea..be8b490b 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -99,7 +99,7 @@ nginx_version: 1.16.1 - role: ome.postgresql - #no_log: true + # no_log: true postgresql_databases: - name: omero postgresql_users: diff --git a/omero/training-server/letsencrypt.yml b/omero/training-server/letsencrypt.yml index a98fad71..da819438 100644 --- a/omero/training-server/letsencrypt.yml +++ b/omero/training-server/letsencrypt.yml @@ -38,12 +38,12 @@ - systemctl reload nginx certbot_auto_renew_args: --webroot --webroot-path /srv/www/letsencrypt/ # May be useful for testing: - #certbot_create_args: --test-cert - #certbot_auto_renew_args: --test-cert --force-renewal - #--webroot --webroot-path /srv/www/letsencrypt/ + # certbot_create_args: --test-cert + # certbot_auto_renew_args: --test-cert --force-renewal + # --webroot --webroot-path /srv/www/letsencrypt/ # WARNING: If you have a test certificate and need to convert it to a # real certificate you may need to run - # rm -rf /etc/letsencrypt/* + # rm -rf /etc/letsencrypt/* when: https_letsencrypt_enabled | default(False) tasks: diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index 6727017f..c3b8bfcf 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -496,9 +496,9 @@ # https://docs.ansible.com/ansible/latest/reference_appendices/ # faq.html#how-do-i-generate-crypted-passwords-for-the-user-module vars: - #omero_server_datadir_chown: true - #temporal upgrade force for omero server workaround - #omero_server_checkupgrade_comparator: '!=' + # omero_server_datadir_chown: true + # temporal upgrade force for omero server workaround + # omero_server_checkupgrade_comparator: '!=' postgresql_version: "13" omero_server_selfsigned_certificates: true omero_server_system_managedrepo_group: managed_repo_group @@ -555,7 +555,7 @@ default('RELEASE.2020-11-25T22-36-25Z') }} ldap_password: "{{ ldap_password_override | default ('secret') }}" omero_server_config_set: - #omero.fs.importUsers: "fm1" + # omero.fs.importUsers: "fm1" omero.certificates.owner: "/C=UK/ST=Scotland/L=Dundee/O=OME" omero.client.icetransports: ssl,wss,tcp omero.fs.watchDir: "/home/DropBox" diff --git a/site.yml b/site.yml index 8505a1f8..10bf0d04 100644 --- a/site.yml +++ b/site.yml @@ -3,7 +3,7 @@ # For new hosts you may also need to run the bootstrap playbook to setup # networking and initial partitions: -#- import_playbook: bootstrap/playbook.yml +# - import_playbook: bootstrap/playbook.yml # deployment of two OMERO.web instances for hosting Dundee's production OMERO. # One of the two instances is for publication data ("ns-web-pub"). From 3e8592b4c6bf442375f16b7c47a1a4c5cab0fb73 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 16:56:45 +0100 Subject: [PATCH 087/142] try to disable yamllint check on the line in presentations --- release/presentations.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/release/presentations.yml b/release/presentations.yml index 66d863e7..c79bebf3 100644 --- a/release/presentations.yml +++ b/release/presentations.yml @@ -2,6 +2,7 @@ - hosts: idr0-slot3.openmicroscopy.org become: true tasks: + # yamllint disable-line rule:latest - name: update presentations ansible.builtin.git: repo: https://github.com/ome/presentations From 1c725920f6e37064fb2ae9668948282264723e78 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 17:03:51 +0100 Subject: [PATCH 088/142] Try to configure ansible-lint --- .config/ansible-lint.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .config/ansible-lint.yml diff --git a/.config/ansible-lint.yml b/.config/ansible-lint.yml new file mode 100644 index 00000000..aa924194 --- /dev/null +++ b/.config/ansible-lint.yml @@ -0,0 +1,5 @@ +# .config/ansible-lint.yml +skip_list: # or 'skip_list' to silence them completely + - experimental # all rules tagged as experimental + - latest[git] # Result of the command may vary on subsequent runs. + - no-changed-when # Commands should not change things if nothing needs doing. \ No newline at end of file From e37e46078817bfdd5853289344282bbc6cd795d8 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 17:19:06 +0100 Subject: [PATCH 089/142] Fix line lenghts (introduced due to ansible.builtin) and adjust config --- .config/ansible-lint.yml | 4 ++-- omero/ome-dundeeomero.yml | 9 ++++++--- omero/training-server/playbook.yml | 6 ++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.config/ansible-lint.yml b/.config/ansible-lint.yml index aa924194..59c89da2 100644 --- a/.config/ansible-lint.yml +++ b/.config/ansible-lint.yml @@ -1,5 +1,5 @@ # .config/ansible-lint.yml -skip_list: # or 'skip_list' to silence them completely +warn_list: # or 'skip_list' to silence them completely - experimental # all rules tagged as experimental - latest[git] # Result of the command may vary on subsequent runs. - - no-changed-when # Commands should not change things if nothing needs doing. \ No newline at end of file + - no-changed-when # Commands should not change things if nothing needs doing. diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index b3e5aff8..cebe9d7d 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -183,7 +183,8 @@ - name: Download the Figure_To_Pdf.py script become: true ansible.builtin.get_url: - ansible.builtin.url: "https://raw.githubusercontent.com/ome/omero-figure\ + ansible.builtin.url: "https://raw.githubusercontent.com/ome\ + /omero-figure\ /v{{ omero_figure_release }}/omero_figure/scripts\ /omero/figure_scripts/Figure_To_Pdf.py" dest: "/opt/omero/server/OMERO.server/lib/scripts\ @@ -195,7 +196,8 @@ - name: Download the Dataset_Images_To_New_Figure.py script become: true ansible.builtin.get_url: - ansible.builtin.url: "https://raw.githubusercontent.com/ome/omero-guide-figure + ansible.builtin.url: "https://raw.githubusercontent.com/ome\ + /omero-guide-figure /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Dataset\ _Images_To_New_Figure.py" dest: "/opt/omero/server/OMERO.server/lib/scripts\ @@ -207,7 +209,8 @@ - name: Download the Figure_Images_To_Dataset.py script become: true ansible.builtin.get_url: - ansible.builtin.url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ + ansible.builtin.url: "https://raw.githubusercontent.com/ome\ + /omero-guide-figure\ /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Figure\ _Images_To_Dataset.py" dest: "/opt/omero/server/OMERO.server/lib/scripts\ diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index c3b8bfcf..9318e305 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -258,7 +258,8 @@ - name: Download the Dataset_Images_To_New_Figure.py script become: true ansible.builtin.get_url: - ansible.builtin.url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ + ansible.builtin.url: "https://raw.githubusercontent.com/ome/\ + omero-guide-figure\ /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts\ /Dataset_Images_To_New_Figure.py" dest: "/opt/omero/server/OMERO.server/lib/scripts\ @@ -271,7 +272,8 @@ - name: Download the Figure_Images_To_Dataset.py script become: true ansible.builtin.get_url: - ansible.builtin.url: "https://raw.githubusercontent.com/ome/omero-guide-figure\ + ansible.builtin.url: "https://raw.githubusercontent.com\ + /ome/omero-guide-figure\ /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts\ /Figure_Images_To_Dataset.py" dest: "/opt/omero/server/OMERO.server/lib/scripts\ From aa680e982f4e26ba211e5777611cb3fe4215c27e Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 17:33:46 +0100 Subject: [PATCH 090/142] try to disable git checking on a specific paragraph --- release/presentations.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/release/presentations.yml b/release/presentations.yml index c79bebf3..ac27251a 100644 --- a/release/presentations.yml +++ b/release/presentations.yml @@ -2,10 +2,11 @@ - hosts: idr0-slot3.openmicroscopy.org become: true tasks: - # yamllint disable-line rule:latest +# yamllint disable rule:latest - name: update presentations ansible.builtin.git: repo: https://github.com/ome/presentations force: false update: true dest: "/uod/idr/www/downloads.openmicroscopy.org/presentations" +# yamllint disable rule:latest \ No newline at end of file From 81a55c881289391fb27a864a65a9e903b1b8635c Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 19:02:08 +0100 Subject: [PATCH 091/142] Fixes capitalization, missing names, missing url params, jinja syntax and one more try to config out the git idempotence --- bootstrap/playbook.yml | 7 ++-- k8s/bootstrap/playbook.yml | 3 +- k8s/prerequisites/playbook.yml | 3 +- molecule/docker-prod/converge.yml | 4 +-- molecule/docker-prod/prepare.yml | 3 +- molecule/ome-pg-prod/prepare.yml | 3 +- molecule/release/prepare.yml | 3 +- molecule/resources/prepare-iproute.yml | 3 +- omedev/docker-prod-apps.yml | 3 +- omedev/playbook.yml | 4 +-- omero/nightshade-webclients.yml | 5 +-- omero/ome-demoserver.yml | 12 +++---- omero/ome-dundeeomero.yml | 13 ++++---- omero/omero-firewall.yml | 5 +-- omero/omero-monitoring-agents.yml | 24 +++++++------- omero/sls-gallery.yml | 5 +-- omero/training-server/idr_data.yml | 3 +- omero/training-server/letsencrypt.yml | 9 +++--- .../maintenance/omero-restoredb.yml | 6 ++-- omero/training-server/playbook.yml | 32 +++++++++++-------- postgres/ome-pg-prod.yml | 3 +- release/permissions.yml | 11 ++++--- release/presentations.yml | 7 ++-- release/public-images.yml | 7 ++-- release/release-acceptance.yml | 3 +- web-proxy/playbook.yml | 5 +-- www/playbook.yml | 15 +++++---- www/www-deploy.yml | 9 +++--- www/www-static.yml | 5 +-- 29 files changed, 122 insertions(+), 93 deletions(-) diff --git a/bootstrap/playbook.yml b/bootstrap/playbook.yml index 1fe0e458..1dc43c86 100644 --- a/bootstrap/playbook.yml +++ b/bootstrap/playbook.yml @@ -1,7 +1,8 @@ --- # Playbook which runs the necessary root-level steps # so that a host can be managed by others -- hosts: omedev +- name: Boot1 + hosts: omedev roles: - role: ome.network @@ -29,7 +30,7 @@ - role: ome.upgrade_distpackages upgrade_distpackages_reboot_kernel: true - -- hosts: vlan-10ge-servers, vlan-ome-idr-docker +- name: Network + hosts: vlan-10ge-servers, vlan-ome-idr-docker roles: - role: ome.network diff --git a/k8s/bootstrap/playbook.yml b/k8s/bootstrap/playbook.yml index b14f28d2..c31b457f 100644 --- a/k8s/bootstrap/playbook.yml +++ b/k8s/bootstrap/playbook.yml @@ -1,4 +1,5 @@ --- -- hosts: vlan-10ge-servers +- name: Bootkub + hosts: vlan-10ge-servers roles: - role: ome.network diff --git a/k8s/prerequisites/playbook.yml b/k8s/prerequisites/playbook.yml index e9fc9217..9eec5c17 100644 --- a/k8s/prerequisites/playbook.yml +++ b/k8s/prerequisites/playbook.yml @@ -1,5 +1,6 @@ --- -- hosts: kubernetes-lochy-k8s +- name: Kuberneteslochy + hosts: kubernetes-lochy-k8s roles: # No mounts are configured, this just installs required packages - role: ome.nfs_mount diff --git a/molecule/docker-prod/converge.yml b/molecule/docker-prod/converge.yml index 53129fa5..1473ee9c 100644 --- a/molecule/docker-prod/converge.yml +++ b/molecule/docker-prod/converge.yml @@ -15,5 +15,5 @@ ansible.builtin.set_fact: redmine_tracker_db_host: "{{ hostname_ip.stdout }}" - -- import_playbook: ../../omedev/docker-prod-apps.yml +- name: Import-playbook + import_playbook: ../../omedev/docker-prod-apps.yml diff --git a/molecule/docker-prod/prepare.yml b/molecule/docker-prod/prepare.yml index 2592df82..d869f31a 100644 --- a/molecule/docker-prod/prepare.yml +++ b/molecule/docker-prod/prepare.yml @@ -18,4 +18,5 @@ - redmine postgresql_server_listen: "'*'" -- import_playbook: ../../omedev/playbook.yml +- name: Import playbook + import_playbook: ../../omedev/playbook.yml diff --git a/molecule/ome-pg-prod/prepare.yml b/molecule/ome-pg-prod/prepare.yml index 8d02fff8..04a5e83f 100644 --- a/molecule/ome-pg-prod/prepare.yml +++ b/molecule/ome-pg-prod/prepare.yml @@ -1,5 +1,6 @@ # Workaround lack of cron on Docker -- hosts: ome-pg-prod1.openmicroscopy.org +- name: Prepare pg prod + hosts: ome-pg-prod1.openmicroscopy.org tasks: - name: Install cron become: true diff --git a/molecule/release/prepare.yml b/molecule/release/prepare.yml index 94acb338..7f4743fd 100644 --- a/molecule/release/prepare.yml +++ b/molecule/release/prepare.yml @@ -1,5 +1,6 @@ --- -- hosts: all +- name: Prepare release + hosts: all vars: www_folders: - /uod/idr/www/docs.openmicroscopy.org diff --git a/molecule/resources/prepare-iproute.yml b/molecule/resources/prepare-iproute.yml index 6d086bd9..1730ad08 100644 --- a/molecule/resources/prepare-iproute.yml +++ b/molecule/resources/prepare-iproute.yml @@ -1,5 +1,6 @@ # Install iproute for ansible network vars -- hosts: all +- name: Prepare iproute in resources + hosts: all tasks: - name: Install iproute become: true diff --git a/omedev/docker-prod-apps.yml b/omedev/docker-prod-apps.yml index 6f23b2af..dbcef69f 100644 --- a/omedev/docker-prod-apps.yml +++ b/omedev/docker-prod-apps.yml @@ -2,7 +2,8 @@ # Production Docker applications # May want to change this to a hostgroup -- hosts: ome-dockr-prod1.openmicroscopy.org +- name: Docker production applications + hosts: ome-dockr-prod1.openmicroscopy.org pre_tasks: diff --git a/omedev/playbook.yml b/omedev/playbook.yml index 2d1b48b2..744030a3 100644 --- a/omedev/playbook.yml +++ b/omedev/playbook.yml @@ -1,7 +1,7 @@ --- # OMEDEV servers - -- hosts: omedev-docker +- name: Ome dev + hosts: omedev-docker roles: diff --git a/omero/nightshade-webclients.yml b/omero/nightshade-webclients.yml index f400ec1e..981bacfb 100644 --- a/omero/nightshade-webclients.yml +++ b/omero/nightshade-webclients.yml @@ -1,6 +1,7 @@ # Install OMERO.web with a public user on localhost -- hosts: ns-webclients +- name: Ns webclients + hosts: ns-webclients roles: @@ -31,7 +32,7 @@ when: "'10.1.255.216' in ansible_dns.nameservers" handlers: - - name: reload nginx + - name: Reload nginx listen: ssl certificate changed become: true ansible.builtin.service: diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index be8b490b..12062628 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -3,7 +3,8 @@ # To allow the OMERO.web plugins to upgrade # also pass `--extra-vars upgrade_webapps=True` -- hosts: ome-demoservers +- name: Demo server playbook + hosts: ome-demoservers pre_tasks: - name: Install open-vm-tools if system is a VMware vm become: true @@ -20,7 +21,7 @@ - name: Resize root FS without altering mount options tags: lvm become: true - lvol: + community.general.system.lvol: lv: root vg: VolGroup00 size: "{{ provision_root_lvsize }}" @@ -158,7 +159,7 @@ postgresql_backup_minimum_expected_size: 100000000 handlers: - - name: reload web server + - name: Reload web server listen: ssl certificate changed become: true ansible.builtin.service: @@ -173,8 +174,7 @@ path: "/etc/nginx/nginx.conf" regexp: '^worker_processes\s+\d+;' replace: >- - "worker_processes {{ ((ansible_processor_count * - ansible_processor_cores) / 2) |round|int }};" + "worker_processes {{ ((ansible_processor_count * ansible_processor_cores) / 2) | round | int }};" # cf https://www.digitalocean.com/community/tutorials/ # how-to-optimize-nginx-configuration @@ -320,7 +320,7 @@ - name: Download the Figure_To_Pdf.py script become: true ansible.builtin.get_url: - ansible.builtin.url: >- + url: >- https://raw.githubusercontent.com/ome/omero-figure/ {{ omero_figure_script_release }}/omero_figure/scripts/omero/ figure_scripts/Figure_To_Pdf.py diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index cebe9d7d..1905ae35 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -1,6 +1,7 @@ # Install OMERO.server and prepare the OME (UoD/SLS) prerequisites -- hosts: ome-dundeeomero.openmicroscopy.org +- name: Dundeeomero server aka nightshade + hosts: ome-dundeeomero.openmicroscopy.org pre_tasks: - name: Install open-vm-tools if system is a VMware vm become: true @@ -18,7 +19,7 @@ - name: Resize root FS without altering mount options tags: lvm become: true - lvol: + community.general.system.lvol: lv: root vg: rhel size: "{{ provision_root_lvsize }}" @@ -101,7 +102,7 @@ handlers: - - name: reload nginx + - name: Reload nginx listen: ssl certificate changed become: true ansible.builtin.service: @@ -183,7 +184,7 @@ - name: Download the Figure_To_Pdf.py script become: true ansible.builtin.get_url: - ansible.builtin.url: "https://raw.githubusercontent.com/ome\ + url: "https://raw.githubusercontent.com/ome\ /omero-figure\ /v{{ omero_figure_release }}/omero_figure/scripts\ /omero/figure_scripts/Figure_To_Pdf.py" @@ -196,7 +197,7 @@ - name: Download the Dataset_Images_To_New_Figure.py script become: true ansible.builtin.get_url: - ansible.builtin.url: "https://raw.githubusercontent.com/ome\ + url: "https://raw.githubusercontent.com/ome\ /omero-guide-figure /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Dataset\ _Images_To_New_Figure.py" @@ -209,7 +210,7 @@ - name: Download the Figure_Images_To_Dataset.py script become: true ansible.builtin.get_url: - ansible.builtin.url: "https://raw.githubusercontent.com/ome\ + url: "https://raw.githubusercontent.com/ome\ /omero-guide-figure\ /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Figure\ _Images_To_Dataset.py" diff --git a/omero/omero-firewall.yml b/omero/omero-firewall.yml index c3949d41..07f198d7 100644 --- a/omero/omero-firewall.yml +++ b/omero/omero-firewall.yml @@ -1,6 +1,7 @@ # Setup up iptables firewall on OMERO servers -- hosts: monitored +- name: Firewall + hosts: monitored roles: @@ -61,7 +62,7 @@ {% for s in gpfs_cluster_source | default([]) %} -A INPUT -p tcp -m tcp --dport 1191 -s {{ s }} -j ACCEPT {% endfor %} - {% if (checkmk_server_source | default('')) %} + {% if (checkmk_server_source | default('')) %} -A INPUT -p tcp -m tcp --dport 6556 -s {{ checkmk_server_source }} -j ACCEPT {% endif %} diff --git a/omero/omero-monitoring-agents.yml b/omero/omero-monitoring-agents.yml index 65533204..96d1a88e 100644 --- a/omero/omero-monitoring-agents.yml +++ b/omero/omero-monitoring-agents.yml @@ -1,6 +1,7 @@ # Setup prometheus agents -- hosts: omero-server +- name: Monitoring agents + hosts: omero-server roles: @@ -21,7 +22,7 @@ tasks: - - name: omero-server prometheus jmx agents + - name: Omero-server prometheus jmx agents become: true ansible.builtin.copy: dest: "{{ omero_common_basedir }}/server/config/prometheus.omero" @@ -30,8 +31,8 @@ notify: - restart omero-server - -- hosts: omero-web +- name: OMERO web + hosts: omero-web roles: @@ -40,7 +41,8 @@ # NOTE: This assumes omero-web.conf is present and includes # /etc/nginx/conf.d-nested-includes -- hosts: monitored +- name: Monitoring + hosts: monitored roles: @@ -51,9 +53,9 @@ tasks: - - name: nginx selinux allow network connect + - name: Nginx selinux allow network connect become: true - seboolean: + ansible.posix.seboolean: name: httpd_can_network_connect state: true persistent: true @@ -81,7 +83,7 @@ - restart nginx handlers: - - name: restart nginx + - name: Restart nginx become: true ansible.builtin.service: name: nginx @@ -92,8 +94,8 @@ monitoring_nginx_htpasswd: | monitoring:$apr1$njrafrtU$19wf/I15zPuSudlM5Y50Z0 - -- hosts: omero-web +- name: OMERO-web + hosts: omero-web tasks: - name: Create nginx proxy for prometheus web exporters @@ -106,7 +108,7 @@ - restart nginx handlers: - - name: restart nginx + - name: Restart nginx become: true ansible.builtin.service: name: nginx diff --git a/omero/sls-gallery.yml b/omero/sls-gallery.yml index b89243d4..68869bcc 100644 --- a/omero/sls-gallery.yml +++ b/omero/sls-gallery.yml @@ -8,7 +8,8 @@ # - bin/omero db password for root user. # - systemctl start omero-{server,web} -- hosts: omero-sls-gallery +- name: Sls gallery + hosts: omero-sls-gallery roles: - role: ome.lvm_partition lvm_vgname: VolGroup00 @@ -128,7 +129,7 @@ - "omero-py>={{ omero_py_release }}" tasks: - - name: find OMERO.server log configuration + - name: Find OMERO.server log configuration become: true ansible.builtin.find: paths: /opt/omero/server/OMERO.server/etc/ diff --git a/omero/training-server/idr_data.yml b/omero/training-server/idr_data.yml index 989b6a83..cc80eef0 100644 --- a/omero/training-server/idr_data.yml +++ b/omero/training-server/idr_data.yml @@ -1,5 +1,6 @@ --- -- hosts: ome-outreach +- name: IDR data + hosts: ome-outreach tasks: - name: Clone study metadata become: true diff --git a/omero/training-server/letsencrypt.yml b/omero/training-server/letsencrypt.yml index da819438..ca24dd82 100644 --- a/omero/training-server/letsencrypt.yml +++ b/omero/training-server/letsencrypt.yml @@ -1,11 +1,12 @@ # Additional Nginx configuration including Let's Encrypt # Should be run when less than 30 days remain on the certificate -- hosts: ome-outreach +- name: Letsencrypt playbook + hosts: ome-outreach pre_tasks: - - name: letsencrypt challenge directory + - name: Letsencrypt challenge directory become: true ansible.builtin.file: path: /srv/www/letsencrypt/.well-known/ @@ -48,7 +49,7 @@ tasks: - - name: letsencrypt nginx configuration + - name: Letsencrypt nginx configuration become: true ansible.builtin.template: src: templates/nginx-letsencrypt-conf.j2 @@ -58,7 +59,7 @@ - reload nginx handlers: - - name: reload nginx + - name: Reload nginx become: true ansible.builtin.service: name: nginx diff --git a/omero/training-server/maintenance/omero-restoredb.yml b/omero/training-server/maintenance/omero-restoredb.yml index 3dca12f7..88483390 100644 --- a/omero/training-server/maintenance/omero-restoredb.yml +++ b/omero/training-server/maintenance/omero-restoredb.yml @@ -19,8 +19,8 @@ # -e omero_restore_host=ome-training-1.openmicroscopy.org # -e omero_restore_data_host=example.openmicroscopy.org - -- hosts: "{{ omero_restore_host | default('localhost') }}" +- name: Restore DB + hosts: "{{ omero_restore_host | default('localhost') }}" vars: omero_restore_data_dump_file: "/uod/idr/repos/outreach/outreach\ @@ -33,7 +33,7 @@ # This may take a long time with no output - name: Copy files # Don't become root, this should ensure ssh forwarding works - synchronize: + ansible.posix.synchronize: src: "{{ item }}" dest: "/tmp/{{ item | basename }}" partial: true diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index 9318e305..ad413288 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -3,7 +3,8 @@ # Set https_letsencrypt_enabled to True in production to ensure certbot # handles the letsencrypt certificate setup -- hosts: ome-outreach +- name: Outreach servers deployment and upgrade + hosts: ome-outreach pre_tasks: - name: Install Make Movie script Prerequisite | MEncoder - Repo @@ -244,7 +245,7 @@ - name: Download the Figure_To_Pdf.py script become: true ansible.builtin.get_url: - ansible.builtin.url: >- + url: >- https://raw.githubusercontent.com/ome/omero-figure/v{{ omero_figure_release }}/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py @@ -258,7 +259,7 @@ - name: Download the Dataset_Images_To_New_Figure.py script become: true ansible.builtin.get_url: - ansible.builtin.url: "https://raw.githubusercontent.com/ome/\ + url: "https://raw.githubusercontent.com/ome/\ omero-guide-figure\ /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts\ /Dataset_Images_To_New_Figure.py" @@ -272,7 +273,7 @@ - name: Download the Figure_Images_To_Dataset.py script become: true ansible.builtin.get_url: - ansible.builtin.url: "https://raw.githubusercontent.com\ + url: "https://raw.githubusercontent.com\ /ome/omero-guide-figure\ /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts\ /Figure_Images_To_Dataset.py" @@ -297,7 +298,7 @@ - name: Download the Scipy_Gaussian_Filter.py script become: true ansible.builtin.get_url: - ansible.builtin.url: >- + url: >- https://raw.githubusercontent.com/ome/omero-guide-python/v{{ ome_training_scripts_release }}/scripts/scipy_gaussian_filter.py dest: "/opt/omero/server/OMERO.server/lib/scripts\ @@ -310,7 +311,7 @@ - name: Download the simple_frap.py script become: true ansible.builtin.get_url: - ansible.builtin.url: >- + url: >- https://raw.githubusercontent.com/ome/omero-guide-python/v{{ ome_training_scripts_release }}/scripts/simple_frap.py dest: "/opt/omero/server/OMERO.server/lib/scripts\ @@ -323,7 +324,7 @@ - name: Download the simple_frap_with_figure.py script become: true ansible.builtin.get_url: - ansible.builtin.url: >- + url: >- https://raw.githubusercontent.com/ome/omero-guide-python/v{{ ome_training_scripts_release }}/scripts/simple_frap_with_figure.py dest: "/opt/omero/server/OMERO.server/lib/scripts\ @@ -344,7 +345,7 @@ - name: Download the ldap scripts become: true ansible.builtin.get_url: - ansible.builtin.url: >- + url: >- https://raw.githubusercontent.com/openmicroscopy/apacheds-docker/{{ apache_docker_release }}/bin/ldapmanager dest: /home/ldap/ldapmanager @@ -380,7 +381,7 @@ - name: Run docker for ldap become: true - docker_container: + community.docker.docker_container: image: openmicroscopy/apacheds:{{ apache_docker_release }} name: ldap published_ports: @@ -390,7 +391,7 @@ - name: Run docker for omero-ms-zarr become: true - docker_container: + community.docker.docker_container: image: openmicroscopy/omero-ms-zarr:{{ omero_ms_zarr_release }} name: omero_ms_zarr env: @@ -431,7 +432,7 @@ - name: Run docker for minio become: true - docker_container: + community.docker.docker_container: image: minio/minio:{{ minio_docker_release }} name: minio command: server /srv/minio @@ -487,7 +488,7 @@ - name: Download minio client become: true ansible.builtin.get_url: - ansible.builtin.url: "https://dl.min.io/client/mc/release\ + url: "https://dl.min.io/client/mc/release\ /linux-amd64/archive/mc.RELEASE.2020-11-25T23-04-07Z" checksum: "sha256:985c43f9bec8fdc4ef2ee44c63\ c9657e10c4cfeb5cb949179d6d693f7428c314" @@ -592,5 +593,8 @@ external_nic: "{{ ansible_default_ipv4.interface }}" -- import_playbook: letsencrypt.yml -- import_playbook: idr_data.yml +- name: Import letsencrypt + import_playbook: letsencrypt.yml + +- name: Import idr data + import_playbook: idr_data.yml diff --git a/postgres/ome-pg-prod.yml b/postgres/ome-pg-prod.yml index 2e362292..ae6f095e 100644 --- a/postgres/ome-pg-prod.yml +++ b/postgres/ome-pg-prod.yml @@ -1,5 +1,6 @@ --- -- hosts: ome-pg-prod1.openmicroscopy.org +- name: Ome pg production + hosts: ome-pg-prod1.openmicroscopy.org roles: - role: ome.postgresql diff --git a/release/permissions.yml b/release/permissions.yml index d65b448c..400bddfe 100644 --- a/release/permissions.yml +++ b/release/permissions.yml @@ -1,8 +1,9 @@ --- -- hosts: idr0-slot3.openmicroscopy.org +- name: Permissions + hosts: idr0-slot3.openmicroscopy.org become: true tasks: - - name: set perms /uod/idr/www + - name: Set perms /uod/idr/www ansible.builtin.file: path: /uod/idr/www state: directory @@ -10,7 +11,7 @@ group: root mode: 0755 - - name: set perms2 + - name: Set perms2 ansible.builtin.file: path: "{{ item }}" state: directory @@ -19,14 +20,14 @@ mode: 0755 with_items: "{{ www_folders }}" - - name: set perms3 www_folders + - name: Set perms3 www_folders ansible.builtin.find: paths: "{{ www_folders }}" file_type: "directory" recurse: "no" register: "products" - - name: set perms3 + - name: Set perms3 ansible.builtin.file: path: "{{ item }}" state: directory diff --git a/release/presentations.yml b/release/presentations.yml index ac27251a..0273995d 100644 --- a/release/presentations.yml +++ b/release/presentations.yml @@ -1,9 +1,10 @@ --- -- hosts: idr0-slot3.openmicroscopy.org +- name: Presentations playbook + hosts: idr0-slot3.openmicroscopy.org become: true - tasks: # yamllint disable rule:latest - - name: update presentations + tasks: + - name: Update presentations ansible.builtin.git: repo: https://github.com/ome/presentations force: false diff --git a/release/public-images.yml b/release/public-images.yml index 44cca523..ce649a69 100644 --- a/release/public-images.yml +++ b/release/public-images.yml @@ -1,8 +1,9 @@ --- -- hosts: idr0-slot3.openmicroscopy.org +- name: Public images + hosts: idr0-slot3.openmicroscopy.org become: true tasks: - - name: create symlinks for public images + - name: Create symlinks for public images ansible.builtin.file: force: true src: "../../../repos/curated/{{ item.key }}/public/" @@ -12,7 +13,7 @@ images/{{ item.value }}" state: link with_dict: "{{ public_folders }}" - - name: check public images + - name: Check public images ansible.builtin.file: force: true src: "{{ item.src }}" diff --git a/release/release-acceptance.yml b/release/release-acceptance.yml index 0c00eef0..05487633 100644 --- a/release/release-acceptance.yml +++ b/release/release-acceptance.yml @@ -1,5 +1,6 @@ --- -- hosts: idr0-slot3.openmicroscopy.org +- name: Release acceptance + hosts: idr0-slot3.openmicroscopy.org become: true tasks: - name: Check mandatory variables are defined diff --git a/web-proxy/playbook.yml b/web-proxy/playbook.yml index cb6f9874..84a0fe8a 100644 --- a/web-proxy/playbook.yml +++ b/web-proxy/playbook.yml @@ -1,7 +1,8 @@ --- # Playbook for maintaining OME production web proxies -- hosts: web-proxies +- name: Web proxy + hosts: web-proxies roles: - role: ome.network tags: network @@ -21,7 +22,7 @@ - role: ome.nginx_proxy handlers: - - name: reload nginx + - name: Reload nginx listen: ssl certificate changed become: true ansible.builtin.service: diff --git a/www/playbook.yml b/www/playbook.yml index fc613792..6156bf56 100644 --- a/www/playbook.yml +++ b/www/playbook.yml @@ -1,6 +1,7 @@ # Install NGINX, and prepare the OME (UoD/SLS) prerequisites -- hosts: www +- name: Playbook www + hosts: www environment: PATH: /usr/local/bin:{{ ansible_env.PATH }} pre_tasks: @@ -39,17 +40,17 @@ - name: storage | Resize var_log LV tags: lvm become: true - lvol: + community.general.system.lvol: lv: var_log - vg: "{{ lvm_vgname }}" + vg: "{{ lvm_vgname }}" size: "{{ provision_varlog_lvsize }}" shrink: false # Grow the filesystem to fill the LV - - name: storage | Resize var_log FS + - name: Storage | Resize var_log FS tags: lvm become: true - filesystem: + community.general.system.filesystem: fstype: "{{ filesystem }}" dev: /dev/mapper/{{ lvm_vgname }}-var_log resizefs: true @@ -110,6 +111,6 @@ filesystem: "ext4" - -- import_playbook: www-deploy.yml +- name: Import www deploy + import_playbook: www-deploy.yml # www-deploy.yml includes www-jekyll.yml diff --git a/www/www-deploy.yml b/www/www-deploy.yml index fd524508..0a205a4d 100644 --- a/www/www-deploy.yml +++ b/www/www-deploy.yml @@ -1,6 +1,7 @@ # Install NGINX -- hosts: www +- name: Www deploy + hosts: www roles: - role: ome.ssl_certificate @@ -8,7 +9,7 @@ tags: nginxconf handlers: - - name: reload nginx + - name: Reload nginx listen: ssl certificate changed become: true ansible.builtin.service: @@ -352,5 +353,5 @@ =404 - default_type text/html - -- import_playbook: www-static.yml +- name: Import www-static playbook + import_playbook: www-static.yml diff --git a/www/www-static.yml b/www/www-static.yml index 15934e3a..786c09c6 100644 --- a/www/www-static.yml +++ b/www/www-static.yml @@ -1,6 +1,7 @@ # Update the static website -- hosts: www +- name: Www static + hosts: www pre_tasks: - name: Check if phpbbforum already unzipped @@ -35,7 +36,7 @@ when: not _schemas_doc_file_st.stat.exists tasks: - - name: install deployment script + - name: Install deployment script become: true ansible.builtin.template: src: files/deploy From a53381d17ac4342b96873055a336946a16e1e8f8 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 19:30:08 +0100 Subject: [PATCH 092/142] Further fixes --- omedev/docker-prod-apps.yml | 10 +++++----- omero/learning.yml | 7 ++++--- omero/nightshade-webclients.yml | 4 ++-- omero/ome-demoserver.yml | 3 ++- release/presentations.yml | 2 +- www/playbook.yml | 12 ++++++------ 6 files changed, 20 insertions(+), 18 deletions(-) diff --git a/omedev/docker-prod-apps.yml b/omedev/docker-prod-apps.yml index dbcef69f..4e390872 100644 --- a/omedev/docker-prod-apps.yml +++ b/omedev/docker-prod-apps.yml @@ -253,7 +253,7 @@ - name: Run docker grafana become: true - docker_container: + community.docker.docker_container: image: grafana/grafana:7.2.0 env: GF_SERVER_ROOT_URL: '%(protocol)s://%(domain)s:%(http_port)s/grafana/' @@ -267,14 +267,14 @@ - grafana-data:/var/lib/grafana register: _grafana_container - - name: prometheus htpasswd parent directory + - name: Prometheus htpasswd parent directory become: true ansible.builtin.file: path: /etc/nginx state: directory mode: 0755 - - name: prometheus htpasswd file + - name: Prometheus htpasswd file become: true ansible.builtin.copy: dest: /etc/nginx/prometheus.htpasswd @@ -289,7 +289,7 @@ # This is a dev Minio server so expose the port directly - name: Run docker minio dev server become: true - docker_container: + community.docker.docker_container: image: minio/minio:RELEASE.2020-10-18T21-54-12Z command: gateway nas /data env: @@ -307,7 +307,7 @@ - name: Run docker nginx proxy become: true - docker_container: + community.docker.docker_container: image: library/nginx:{{ nginx_version }} name: nginx networks: diff --git a/omero/learning.yml b/omero/learning.yml index 6a33beb3..e9e536f3 100644 --- a/omero/learning.yml +++ b/omero/learning.yml @@ -13,7 +13,8 @@ # - bin/omero db password for root and public users. # - systemctl start omero-{server,web} -- hosts: omero-learning +- name: Learning Virtual Microscope playbook + hosts: omero-learning roles: - role: ome.lvm_partition lvm_vgname: VolGroup00 @@ -146,7 +147,7 @@ tasks: - - name: find OMERO.server log configuration + - name: Find OMERO.server log configuration become: true ansible.builtin.find: paths: /opt/omero/server/OMERO.server/etc/ @@ -165,7 +166,7 @@ - name: TLS certificate is installed for JVM become: true - java_cert: + community.general.system.java_cert: cert_url: "{{ ldap_host }}" cert_port: 636 keystore_path: "/etc/pki/java/cacerts" diff --git a/omero/nightshade-webclients.yml b/omero/nightshade-webclients.yml index 981bacfb..e80e2b0b 100644 --- a/omero/nightshade-webclients.yml +++ b/omero/nightshade-webclients.yml @@ -60,8 +60,8 @@ dest: "/etc/nginx/nginx.conf" regexp: '^worker_processes\s+\d+;' replace: >- - "worker_processes {{ ((ansible_processor_count * - ansible_processor_cores) / 2) |round|int }};" + worker_processes {{ ((ansible_processor_count * + ansible_processor_cores) / 2) | round | int }}; # post 2.3 'dest' should be renamed 'path' # cf https://www.digitalocean.com/community/tutorials/ diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index 12062628..02aa1f60 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -174,7 +174,8 @@ path: "/etc/nginx/nginx.conf" regexp: '^worker_processes\s+\d+;' replace: >- - "worker_processes {{ ((ansible_processor_count * ansible_processor_cores) / 2) | round | int }};" + worker_processes {{ ((ansible_processor_count * + ansible_processor_cores) / 2) | round | int }}; # cf https://www.digitalocean.com/community/tutorials/ # how-to-optimize-nginx-configuration diff --git a/release/presentations.yml b/release/presentations.yml index 0273995d..f953a14a 100644 --- a/release/presentations.yml +++ b/release/presentations.yml @@ -10,4 +10,4 @@ force: false update: true dest: "/uod/idr/www/downloads.openmicroscopy.org/presentations" -# yamllint disable rule:latest \ No newline at end of file +# yamllint disable rule:latest diff --git a/www/playbook.yml b/www/playbook.yml index 6156bf56..8d0affa1 100644 --- a/www/playbook.yml +++ b/www/playbook.yml @@ -19,25 +19,25 @@ # but that role # will change the device name to symlinks rather than # existing device ID. - - name: storage | Resize root LV + - name: Storage | Resize root LV tags: lvm become: true - lvol: + community.general.system.lvol: lv: root - vg: "{{ lvm_vgname }}" + vg: "{{ lvm_vgname }}" size: "{{ provision_root_lvsize }}" shrink: false # Grow the filesystem to fill the LV - - name: storage | Resize root FS + - name: Storage | Resize root FS tags: lvm become: true - filesystem: + community.general.system.filesystem: fstype: "{{ filesystem }}" dev: /dev/mapper/{{ lvm_vgname }}-root resizefs: true - - name: storage | Resize var_log LV + - name: Storage | Resize var_log LV tags: lvm become: true community.general.system.lvol: From 7558802d8d2961a34c038ad0e99be59b82dc244f Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 20:46:29 +0100 Subject: [PATCH 093/142] try to fix long lines in python --- www/tests/check_redirects.py | 71 +++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/www/tests/check_redirects.py b/www/tests/check_redirects.py index 32c803da..c359cc36 100644 --- a/www/tests/check_redirects.py +++ b/www/tests/check_redirects.py @@ -33,8 +33,10 @@ ('/site/community/mailing-lists', '/support'), ('/site/events', '/events'), ('/site/community/minutes/conference-calls', '/on-the-web'), - ('/site/community/minutes/meetings/12th-annual-users-meeting-2017', '/events/12th-annual-users-meeting-2017.html'), - ('/site/community/minutes/meetings/11th-annual-users-meeting-2016', '/events/11th-annual-users-meeting-2016.html'), + ('/site/community/minutes/meetings/12th-annual-users-meeting-2017', + '/events/12th-annual-users-meeting-2017.html'), + ('/site/community/minutes/meetings/11th-annual-users-meeting-2016', + '/events/11th-annual-users-meeting-2016.html'), ('/site/community/minutes/meetings/10th-annual-users-meeting-june-2015', '/events/10th-annual-users-meeting-june-2015.html'), ('/site/community/minutes/meetings/9th-annual-users-meeting-june-2014', '/events/9th-annual-users-meeting-june-2014.html'), ('/site/community/jobs', '/careers'), @@ -66,40 +68,43 @@ ] external_uris = [ ('/omero-blog', 'http://blog.openmicroscopy.org'), - ('/site/about/development-teams/glencoe-software', 'https://www.glencoesoftware.com/team.html'), - ('/site/community/scripts', 'https://docs.openmicroscopy.org/latest/omero/developers/scripts/index.html'), - ('/site/support/bio-formats', 'https://docs.openmicroscopy.org/latest/bio-formats/'), - ('/site/support/bio-formats5', 'https://docs.openmicroscopy.org/latest/bio-formats5/'), - ('/site/support/bio-formats5.3', 'https://docs.openmicroscopy.org/latest/bio-formats5.3/'), - ('/site/support/bio-formats5.4', 'https://docs.openmicroscopy.org/latest/bio-formats5.4/'), - ('/site/support/bio-formats5.5', 'https://docs.openmicroscopy.org/latest/bio-formats5.5/'), - ('/site/support/omero', 'https://docs.openmicroscopy.org/latest/omero/'), - ('/site/support/omero5', 'https://docs.openmicroscopy.org/latest/omero5/'), - ('/site/support/omero5.0', 'https://docs.openmicroscopy.org/latest/omero5.0/'), - ('/site/support/omero5.1', 'https://docs.openmicroscopy.org/latest/omero5.1/'), - ('/site/support/omero5.2', 'https://docs.openmicroscopy.org/latest/omero5.2/'), - ('/site/support/omero5.3', 'https://docs.openmicroscopy.org/latest/omero5.3/'), - ('/site/support/ome-model', 'https://docs.openmicroscopy.org/latest/ome-model/'), - ('/site/support/file-formats', 'https://docs.openmicroscopy.org/latest/ome-model/'), - ('/site/support/file-formats/schemas/specifications/compliant-file-specification', 'https://docs.openmicroscopy.org/latest/ome-model/specifications/'), - ('/site/support/ome-tiff', 'https://docs.openmicroscopy.org/latest/ome-model/ome-tiff/'), - ('/site/support/ome-files-cpp', 'https://docs.openmicroscopy.org/latest/ome-files-cpp/'), - ('/site/support/contributing', 'https://docs.openmicroscopy.org/contributing/'), + ('/site/about/development-teams/glencoe-software', + 'https://www.glencoesoftware.com/team.html'), + ('/site/community/scripts', + 'https://docs.openmicroscopy.org/latest/omero/developers/scripts/index.html'),# noqa + ('/site/support/bio-formats', + 'https://docs.openmicroscopy.org/latest/bio-formats/'), + ('/site/support/bio-formats5', 'https://docs.openmicroscopy.org/latest/bio-formats5/'),# noqa + ('/site/support/bio-formats5.3', 'https://docs.openmicroscopy.org/latest/bio-formats5.3/'),# noqa + ('/site/support/bio-formats5.4', 'https://docs.openmicroscopy.org/latest/bio-formats5.4/'),# noqa + ('/site/support/bio-formats5.5', 'https://docs.openmicroscopy.org/latest/bio-formats5.5/'),# noqa + ('/site/support/omero', 'https://docs.openmicroscopy.org/latest/omero/'),# noqa + ('/site/support/omero5', 'https://docs.openmicroscopy.org/latest/omero5/'),# noqa + ('/site/support/omero5.0', 'https://docs.openmicroscopy.org/latest/omero5.0/'),# noqa + ('/site/support/omero5.1', 'https://docs.openmicroscopy.org/latest/omero5.1/'),# noqa + ('/site/support/omero5.2', 'https://docs.openmicroscopy.org/latest/omero5.2/'),# noqa + ('/site/support/omero5.3', 'https://docs.openmicroscopy.org/latest/omero5.3/'),# noqa + ('/site/support/ome-model', 'https://docs.openmicroscopy.org/latest/ome-model/'),# noqa + ('/site/support/file-formats', 'https://docs.openmicroscopy.org/latest/ome-model/'),# noqa + ('/site/support/file-formats/schemas/specifications/compliant-file-specification', 'https://docs.openmicroscopy.org/latest/ome-model/specifications/'),# noqa + ('/site/support/ome-tiff', 'https://docs.openmicroscopy.org/latest/ome-model/ome-tiff/'),# noqa + ('/site/support/ome-files-cpp', 'https://docs.openmicroscopy.org/latest/ome-files-cpp/'),# noqa + ('/site/support/contributing', 'https://docs.openmicroscopy.org/contributing/'),# noqa ('/site/support/previous', 'https://docs.openmicroscopy.org'), - ('/info/OMERO.insight', 'https://docs.openmicroscopy.org/latest/omero/users/index.html'), - ('/info/OMERO.importer', 'https://docs.openmicroscopy.org/latest/omero/users/index.html'), - ('/info/OMERO.editor', 'https://docs.openmicroscopy.org/latest/omero/users/index.html'), - ('/info/OMERO.web', 'https://docs.openmicroscopy.org/latest/omero/users/index.html'), - ('/info/OMERO.server', 'https://docs.openmicroscopy.org/latest/omero/users/index.html'), - ('/info/permissions', 'https://docs.openmicroscopy.org/latest/omero/sysadmins/server-permissions.html'), + ('/info/OMERO.insight', 'https://docs.openmicroscopy.org/latest/omero/users/index.html'),# noqa + ('/info/OMERO.importer', 'https://docs.openmicroscopy.org/latest/omero/users/index.html'),# noqa + ('/info/OMERO.editor', 'https://docs.openmicroscopy.org/latest/omero/users/index.html'),# noqa + ('/info/OMERO.web', 'https://docs.openmicroscopy.org/latest/omero/users/index.html'),# noqa + ('/info/OMERO.server', 'https://docs.openmicroscopy.org/latest/omero/users/index.html'),# noqa + ('/info/permissions', 'https://docs.openmicroscopy.org/latest/omero/sysadmins/server-permissions.html'),# noqa ('/info/demo', 'http://help.openmicroscopy.org/demo-server.html'), ('/info/lists', 'http://lists.openmicroscopy.org.uk/mailman/listinfo/'), - ('/info/videos', 'https://www.youtube.com/channel/UCyySB9ZzNi8aBGYqcxSrauQ'), - ('/info/downgrade', 'https://docs.openmicroscopy.org/latest/omero/developers/Model/XsltTransformations.html'), - ('/info/flimfit', 'http://flimfit.org'), - ('/info/scripts', 'https://docs.openmicroscopy.org/latest/omero/developers/scripts/index.html'), - ('/info/bio-formats', 'https://docs.openmicroscopy.org/latest/bio-formats/'), - ('/info/slidebook', 'https://www.intelligent-imaging.com/technical-answers'), + ('/info/videos', 'https://www.youtube.com/channel/UCyySB9ZzNi8aBGYqcxSrauQ'),# noqa + ('/info/downgrade', 'https://docs.openmicroscopy.org/latest/omero/developers/Model/XsltTransformations.html'),# noqa + ('/info/flimfit', 'http://flimfit.org'),# noqa + ('/info/scripts', 'https://docs.openmicroscopy.org/latest/omero/developers/scripts/index.html'),# noqa + ('/info/bio-formats', 'https://docs.openmicroscopy.org/latest/bio-formats/'),# noqa + ('/info/slidebook', 'https://www.intelligent-imaging.com/technical-answers'),# noqa ] content_uris = [ ('/community', 'This page was generated by phpBB'), From 804a1a57d0233785863580dffa762d985124b9b3 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 8 Jun 2023 20:52:32 +0100 Subject: [PATCH 094/142] more python line length fixes --- www/tests/check_redirects.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/www/tests/check_redirects.py b/www/tests/check_redirects.py index c359cc36..2e45aa1d 100644 --- a/www/tests/check_redirects.py +++ b/www/tests/check_redirects.py @@ -37,8 +37,8 @@ '/events/12th-annual-users-meeting-2017.html'), ('/site/community/minutes/meetings/11th-annual-users-meeting-2016', '/events/11th-annual-users-meeting-2016.html'), - ('/site/community/minutes/meetings/10th-annual-users-meeting-june-2015', '/events/10th-annual-users-meeting-june-2015.html'), - ('/site/community/minutes/meetings/9th-annual-users-meeting-june-2014', '/events/9th-annual-users-meeting-june-2014.html'), + ('/site/community/minutes/meetings/10th-annual-users-meeting-june-2015', '/events/10th-annual-users-meeting-june-2015.html'),# noqa + ('/site/community/minutes/meetings/9th-annual-users-meeting-june-2014', '/events/9th-annual-users-meeting-june-2014.html'),# noqa ('/site/community/jobs', '/careers'), ('/site/products', '/products'), @@ -68,12 +68,9 @@ ] external_uris = [ ('/omero-blog', 'http://blog.openmicroscopy.org'), - ('/site/about/development-teams/glencoe-software', - 'https://www.glencoesoftware.com/team.html'), - ('/site/community/scripts', - 'https://docs.openmicroscopy.org/latest/omero/developers/scripts/index.html'),# noqa - ('/site/support/bio-formats', - 'https://docs.openmicroscopy.org/latest/bio-formats/'), + ('/site/about/development-teams/glencoe-software', 'https://www.glencoesoftware.com/team.html'),# noqa + ('/site/community/scripts', 'https://docs.openmicroscopy.org/latest/omero/developers/scripts/index.html'),# noqa + ('/site/support/bio-formats', 'https://docs.openmicroscopy.org/latest/bio-formats/'),# noqa ('/site/support/bio-formats5', 'https://docs.openmicroscopy.org/latest/bio-formats5/'),# noqa ('/site/support/bio-formats5.3', 'https://docs.openmicroscopy.org/latest/bio-formats5.3/'),# noqa ('/site/support/bio-formats5.4', 'https://docs.openmicroscopy.org/latest/bio-formats5.4/'),# noqa From a5fd5ebdb0b508c499d43b558b9434d0650089a1 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 9 Jun 2023 12:24:00 +0100 Subject: [PATCH 095/142] Remove inverted commas to test if molecule passes --- omero/nightshade-webclients.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/nightshade-webclients.yml b/omero/nightshade-webclients.yml index e80e2b0b..8521e587 100644 --- a/omero/nightshade-webclients.yml +++ b/omero/nightshade-webclients.yml @@ -112,7 +112,7 @@ omero_web_release: "{{ omero_web_release_override | default('5.16.0') }}" omero_py_release: "{{ omero_py_release_override | default('5.13.1') }}" omero_figure_release: >- - "{{ omero_figure_release_override | default('5.1.0') }}" + {{ omero_figure_release_override | default('5.1.0') }} omero_fpbioimage_release: >- "{{ omero_fpbioimage_release_override | default('0.4.0') }}" omero_iviewer_release: >- From b153dd304d3c90bd4f6632907f1df6b95f5fe4eb Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 9 Jun 2023 16:58:52 +0100 Subject: [PATCH 096/142] First batch of quotes removal --- omero/learning.yml | 4 ++-- omero/nightshade-webclients.yml | 10 +++++----- omero/ome-demoserver.yml | 32 +++++++++++++++---------------- omero/omero-monitoring-agents.yml | 2 +- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/omero/learning.yml b/omero/learning.yml index e9e536f3..94a1bb2c 100644 --- a/omero/learning.yml +++ b/omero/learning.yml @@ -126,10 +126,10 @@ omero.web.viewer.view: omero_iviewer.views.index omero.web.public.enabled: true omero.web.public.password: >- - "{{ omero_web_public_password | default('public') }}" + {{ omero_web_public_password | default('public') }} omero.web.public.url_filter: "/(webgateway|gallery)/" omero.web.public.user: >- - "{{ omero_web_public_user | default('public') }}" + {{ omero_web_public_user | default('public') }} omero_web_apps_packages: - omero-gallery=={{ omero_web_apps_release.omero_gallery }} - omero-iviewer=={{ omero_web_apps_release.omero_iviewer }} diff --git a/omero/nightshade-webclients.yml b/omero/nightshade-webclients.yml index 8521e587..98733452 100644 --- a/omero/nightshade-webclients.yml +++ b/omero/nightshade-webclients.yml @@ -114,15 +114,15 @@ omero_figure_release: >- {{ omero_figure_release_override | default('5.1.0') }} omero_fpbioimage_release: >- - "{{ omero_fpbioimage_release_override | default('0.4.0') }}" + {{ omero_fpbioimage_release_override | default('0.4.0') }} omero_iviewer_release: >- - "{{ omero_iviewer_release_override | default('0.12.0') }}" + {{ omero_iviewer_release_override | default('0.12.0') }} omero_parade_release: >- - "{{ omero_parade_release_override | default('0.2.3') }}" + {{ omero_parade_release_override | default('0.2.3') }} omero_webtagging_autotag_release: >- - "{{ omero_webtagging_autotag_release_override | default('3.2.0') }}" + {{ omero_webtagging_autotag_release_override | default('3.2.0') }} omero_webtagging_tagsearch_release: >- - "{{ omero_webtagging_tagsearch_release_override | default('3.2.0') }}" + {{ omero_webtagging_tagsearch_release_override | default('3.2.0') }} omero_web_apps_names: - omero_figure diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index 02aa1f60..b7bb256e 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -146,7 +146,7 @@ firstname: Public lastname: User password: >- - "{{ secret_omero_web_public_password | default('public') }}" + {{ secret_omero_web_public_password | default('public') }} groups: "--group-name public" - role: ome.ssl_certificate @@ -225,7 +225,7 @@ ansible.builtin.template: src: templates/omero-web-config-for-webapps.j2 dest: >- - "{{ omero_web_basedir }}/config/omero-web-config-for-webapps.omero" + {{ omero_web_basedir }}/config/omero-web-config-for-webapps.omero owner: "root" group: "root" mode: "u=rw,go=r" @@ -335,24 +335,24 @@ vars: omero_figure_release: >- - "{{ omero_figure_release_override | default('5.1.0') }}" + {{ omero_figure_release_override | default('5.1.0') }} omero_figure_script_release: >- - "{{ omero_figure_script_release_override | default('v5.1.0') }}" + {{ omero_figure_script_release_override | default('v5.1.0') }} omero_fpbioimage_release: >- - "{{ omero_fpbioimage_release_override | default('0.4.0') }}" + {{ omero_fpbioimage_release_override | default('0.4.0') }} omero_iviewer_release: >- - "{{ omero_iviewer_release_override | default('0.12.0') }}" + {{ omero_iviewer_release_override | default('0.12.0') }} omero_parade_release: >- - "{{ omero_parade_release_override | default('0.2.3') }}" + {{ omero_parade_release_override | default('0.2.3') }} omero_webtagging_autotag_release: >- - "{{ omero_webtagging_autotag_release_override | default('3.2.0') }}" + {{ omero_webtagging_autotag_release_override | default('3.2.0') }} omero_webtagging_tagsearch_release: >- - "{{ omero_webtagging_tagsearch_release_override | default('3.2.0') }}" + {{ omero_webtagging_tagsearch_release_override | default('3.2.0') }} omero_signup_release: >- - "{{ omero_signup_release_override | default('0.3.2') }}" + {{ omero_signup_release_override | default('0.3.2') }} omero_server_release: >- - "{{ omero_server_release_override | default('5.6.6') }}" + {{ omero_server_release_override | default('5.6.6') }} omero_web_release: "{{ omero_web_release_override | default('5.16.0') }}" omero_py_release: "{{ omero_py_release_override | default('5.13.1') }}" # For https://github.com/openmicroscopy/ansible-role-java, @@ -366,11 +366,11 @@ # Pip versions omero_cli_duplicate_release: >- - "{{ omero_cli_duplicate_release_override | default('0.4.0') }}" + {{ omero_cli_duplicate_release_override | default('0.4.0') }} omero_cli_render_release: >- - "{{ omero_cli_render_release_override | default('0.8.0') }}" + {{ omero_cli_render_release_override | default('0.8.0') }} omero_metadata_release: >- - "{{ omero_cli_metadata_release_override | default('0.10.0') }}" + {{ omero_cli_metadata_release_override | default('0.10.0') }} # Signup omero_signup_email_body: >- @@ -440,9 +440,9 @@ # https://www.openmicroscopy.org/site/support # /omero5.3/sysadmins/public.html omero.web.public.user: >- - "{{ secret_omero_web_public_user | default('public') }}" + {{ secret_omero_web_public_user | default('public') }} omero.web.public.password: >- - "{{ secret_omero_web_public_password | default('public') }}" + {{ secret_omero_web_public_password | default('public') }} omero.web.public.enabled: true omero.web.public.server_id: 1 omero.web.public.url_filter: >- diff --git a/omero/omero-monitoring-agents.yml b/omero/omero-monitoring-agents.yml index 96d1a88e..3652c29f 100644 --- a/omero/omero-monitoring-agents.yml +++ b/omero/omero-monitoring-agents.yml @@ -15,7 +15,7 @@ - role: ome.omero_prometheus_exporter omero_prometheus_exporter_omero_user: >- - "{{ secret_omero_prometheus_exporter_omero_user | default('root') }}" + {{ secret_omero_prometheus_exporter_omero_user | default('root') }} omero_prometheus_exporter_omero_password: >- "{{ secret_omero_prometheus_exporter_omero_password | default('omero') }}" From 7e5b2c02bc28839df0a81e7ed2a2d751ce812b3c Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Sat, 10 Jun 2023 14:23:54 +0100 Subject: [PATCH 097/142] Further quotation fixes --- omero/ome-demoserver.yml | 22 +++++++++------------ omero/omero-monitoring-agents.yml | 8 ++++---- www/www-deploy.yml | 33 ++++++++++++------------------- 3 files changed, 26 insertions(+), 37 deletions(-) diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index b7bb256e..6d5f7be7 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -310,8 +310,7 @@ - name: Create a figure scripts directory become: true ansible.builtin.file: - path: >- - "{{ omero_server_basedir }}/OMERO.server/lib/ + path: "{{ omero_server_basedir }}/OMERO.server/lib/\ scripts/omero/figure_scripts" state: directory mode: 0755 @@ -321,12 +320,10 @@ - name: Download the Figure_To_Pdf.py script become: true ansible.builtin.get_url: - url: >- - https://raw.githubusercontent.com/ome/omero-figure/ - {{ omero_figure_script_release }}/omero_figure/scripts/omero/ - figure_scripts/Figure_To_Pdf.py - dest: >- - "{{ omero_server_basedir }}/OMERO.server/lib/ + url: "https://raw.githubusercontent.com/ome/omero-figure/\ + {{ omero_figure_script_release }}/omero_figure/scripts/omero/\ + figure_scripts/Figure_To_Pdf.py" + dest: "{{ omero_server_basedir }}/OMERO.server/lib/\ scripts/omero/figure_scripts/Figure_To_Pdf.py" mode: 0755 owner: "omero-server" @@ -445,14 +442,13 @@ {{ secret_omero_web_public_password | default('public') }} omero.web.public.enabled: true omero.web.public.server_id: 1 - omero.web.public.url_filter: >- - "^/(webgateway/(?!(archived_files|download_as))| webclient - /annotation/([0-9]+)/)" + omero.web.public.url_filter: "^/(webgateway/(?!(archived_files|down\ + load_as))|webclient/annotation/([0-9]+)/)" omero.web.server_list: [["localhost", 4064, "omero"]] # Advice is (2*cores + 1) from OME docs. omero.web.wsgi_workers: >- - "{{ (2 * (ansible_processor_count * - ansible_processor_cores)) + 1 }}" + {{ (2 * (ansible_processor_count * + ansible_processor_cores)) + 1 }} omero.web.admins: "{{ omero_web_admins }}" # https://pypi.org/project/omero-iviewer/ - set iviewer to default viewer omero.web.viewer.view: omero_iviewer.views.index diff --git a/omero/omero-monitoring-agents.yml b/omero/omero-monitoring-agents.yml index 3652c29f..e3fdc9d8 100644 --- a/omero/omero-monitoring-agents.yml +++ b/omero/omero-monitoring-agents.yml @@ -17,8 +17,8 @@ omero_prometheus_exporter_omero_user: >- {{ secret_omero_prometheus_exporter_omero_user | default('root') }} omero_prometheus_exporter_omero_password: >- - "{{ secret_omero_prometheus_exporter_omero_password - | default('omero') }}" + {{ secret_omero_prometheus_exporter_omero_password + | default('omero') }} tasks: @@ -65,8 +65,8 @@ become: true ansible.builtin.copy: content: >- - "{{ secret_monitoring_nginx_htpasswd | - default(monitoring_nginx_htpasswd) }}" + {{ secret_monitoring_nginx_htpasswd | + default(monitoring_nginx_htpasswd) }} dest: /etc/nginx/monitoring.htpasswd mode: 0644 diff --git a/www/www-deploy.yml b/www/www-deploy.yml index 0a205a4d..29c9f2c1 100644 --- a/www/www-deploy.yml +++ b/www/www-deploy.yml @@ -18,8 +18,8 @@ vars: nginx_proxy_worker_processes: >- - "{{ ((ansible_processor_count * ansible_processor_cores) - / 2) |round|int }}" + {{ ((ansible_processor_count * ansible_processor_cores) + / 2) |round|int }} nginx_proxy_worker_connections: 65000 nginx_proxy_ssl: true nginx_proxy_ssl_certificate: "{{ ssl_certificate_bundled_path }}" @@ -133,20 +133,17 @@ - match: "~/site/community/minutes/meetings\ /11th-annual-users-meeting-2016" dest: /events/11th-annual-users-meeting-2016.html - - match: >- - "~/site/community/minutes/meetings/ + - match: "~/site/community/minutes/meetings/\ 10th-annual-users-meeting-june-2015" dest: /events/10th-annual-users-meeting-june-2015.html - - match: >- - "~/site/community/minutes/meetings/ + - match: "~/site/community/minutes/meetings/\ 9th-annual-users-meeting-june-2014" dest: /events/9th-annual-users-meeting-june-2014.html - match: "~/site/community/jobs/?$" dest: /careers - match: "~/site/community/scripts/?$" - dest: >- - https://docs.openmicroscopy.org/ - latest/omero/developers/scripts/index.html + dest: "https://docs.openmicroscopy.org/\ + latest/omero/developers/scripts/index.html" - match: "~/site/community/(?.*)$" dest: /support @@ -206,8 +203,7 @@ dest: https://docs.openmicroscopy.org/latest/ome-model/$link - match: "~/site/support/file-formats/?$" dest: https://docs.openmicroscopy.org/latest/ome-model/ - - match: >- - "~/site/support/file-formats/schemas + - match: "~/site/support/file-formats/schemas\ /specifications/compliant-file-specification/?$" dest: https://docs.openmicroscopy.org/latest/ome-model/specifications/ - match: "~/site/support/ome-tiff/?$" @@ -257,9 +253,8 @@ - match: "~/info/OMERO.server" dest: https://docs.openmicroscopy.org/latest/omero/users/index.html - match: "~/info/permissions" - dest: >- - https://docs.openmicroscopy.org/latest - /omero/sysadmins/server-permissions.html + dest: "https://docs.openmicroscopy.org/latest\ + /omero/sysadmins/server-permissions.html" - match: "~/info/demo" dest: http://help.openmicroscopy.org/demo-server.html - match: "~/info/cls" @@ -275,15 +270,13 @@ - match: "~/info/attribution" dest: /licensing/ - match: "~/info/downgrade" - dest: >- - https://docs.openmicroscopy.org/latest/ - omero/developers/Model/XsltTransformations.html + dest: "https://docs.openmicroscopy.org/latest/\ + omero/developers/Model/XsltTransformations.html" - match: "~/info/flimfit" dest: http://flimfit.org - match: "~/info/scripts" - dest: >- - https://docs.openmicroscopy.org/latest/ - omero/developers/scripts/index.html + dest: "https://docs.openmicroscopy.org/latest/\ + omero/developers/scripts/index.html" - match: "~/info/bio-formats(/.*)?$" dest: https://docs.openmicroscopy.org/latest/bio-formats/ - match: "~/info/slidebook" From 68408d285ffc9d24812c6836a8083a04dd14fc25 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Sat, 10 Jun 2023 15:14:36 +0100 Subject: [PATCH 098/142] Use lowercase restart nginx to match the handler name --- omero/omero-monitoring-agents.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/omero/omero-monitoring-agents.yml b/omero/omero-monitoring-agents.yml index e3fdc9d8..ddf93bd3 100644 --- a/omero/omero-monitoring-agents.yml +++ b/omero/omero-monitoring-agents.yml @@ -83,7 +83,7 @@ - restart nginx handlers: - - name: Restart nginx + - name: restart nginx become: true ansible.builtin.service: name: nginx @@ -108,7 +108,7 @@ - restart nginx handlers: - - name: Restart nginx + - name: restart nginx become: true ansible.builtin.service: name: nginx From bee1c9a7d967ba4e4a866cc8fba0c559317bb8b3 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Sat, 10 Jun 2023 16:55:25 +0100 Subject: [PATCH 099/142] try to fix postgres failure by going for psql 13 --- molecule/docker-prod/prepare.yml | 2 +- molecule/omero-training-server/molecule.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/molecule/docker-prod/prepare.yml b/molecule/docker-prod/prepare.yml index d869f31a..7bb8ba41 100644 --- a/molecule/docker-prod/prepare.yml +++ b/molecule/docker-prod/prepare.yml @@ -3,7 +3,7 @@ hosts: ome-dockr-prod1.openmicroscopy.org roles: - role: ome.postgresql - postgresql_version: "12" + postgresql_version: "13" postgresql_server_auth: - database: redmine user: redmine diff --git a/molecule/omero-training-server/molecule.yml b/molecule/omero-training-server/molecule.yml index a9737f23..af145c55 100644 --- a/molecule/omero-training-server/molecule.yml +++ b/molecule/omero-training-server/molecule.yml @@ -25,7 +25,7 @@ provisioner: group_vars: all: molecule_test: true - postgresql_version: "9.6" + postgresql_version: "13" docker-hosts: # This should allow docker-in-docker to work docker_storage_driver: vfs From 8a563f29d00401d921d58d5c18a30f36fe22eba3 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Sat, 10 Jun 2023 17:16:52 +0100 Subject: [PATCH 100/142] Try updating yum --- .github/workflows/molecule.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index fbd88966..c53a68ed 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -36,5 +36,6 @@ jobs: pip install "ansible<8" "ansible-lint<6.13" flake8 pip install "molecule<5" "ansible-compat<4" pip install molecule-plugins[docker] pytest-testinfra + yum update - name: Run molecule run: molecule test -s "${{ matrix.scenario }}" From 81bce77bb9e3d8770eda278479371243a4fcaea1 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Sat, 10 Jun 2023 17:19:49 +0100 Subject: [PATCH 101/142] Revert "Try updating yum" This reverts commit 8a563f29d00401d921d58d5c18a30f36fe22eba3. --- .github/workflows/molecule.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index c53a68ed..fbd88966 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -36,6 +36,5 @@ jobs: pip install "ansible<8" "ansible-lint<6.13" flake8 pip install "molecule<5" "ansible-compat<4" pip install molecule-plugins[docker] pytest-testinfra - yum update - name: Run molecule run: molecule test -s "${{ matrix.scenario }}" From 1255befdfeae032d58961589d8d3a88cdf0888c2 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Sat, 10 Jun 2023 20:43:56 +0100 Subject: [PATCH 102/142] Try to return the dockerfile --- molecule/resources/Dockerfile.j2 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 molecule/resources/Dockerfile.j2 diff --git a/molecule/resources/Dockerfile.j2 b/molecule/resources/Dockerfile.j2 new file mode 100644 index 00000000..00b7fd61 --- /dev/null +++ b/molecule/resources/Dockerfile.j2 @@ -0,0 +1,22 @@ +# Molecule managed + +{% if item.registry is defined %} +FROM {{ item.registry.url }}/{{ item.image }} +{% else %} +FROM {{ item.image }} +{% endif %} + +{% if item.env is defined %} +{% for var, value in item.env.items() %} +{% if value %} +ENV {{ var }} {{ value }} +{% endif %} +{% endfor %} +{% endif %} + +RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates iproute2 && apt-get clean; \ + elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash iproute && dnf clean all; \ + elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash iproute ca-certificates && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ + elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml iproute2 && zypper clean -a; \ + elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \ + elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates iproute2 && xbps-remove -O; fi From 0eb719858c0595b3e38d406be1dd8bb8b67aecbf Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Sat, 10 Jun 2023 21:00:15 +0100 Subject: [PATCH 103/142] Remove lingering flake8 lint --- molecule/ome-pg-prod/molecule.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/molecule/ome-pg-prod/molecule.yml b/molecule/ome-pg-prod/molecule.yml index 638ee7a0..b2feddfb 100644 --- a/molecule/ome-pg-prod/molecule.yml +++ b/molecule/ome-pg-prod/molecule.yml @@ -26,5 +26,3 @@ scenario: name: ome-pg-prod verifier: name: testinfra - lint: - name: flake8 From bf4d6ebdedb4a7548118709de454d753e1797292 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Sun, 11 Jun 2023 13:45:03 +0100 Subject: [PATCH 104/142] try to fix dundeeomero python molecule problem - add quotes as per https://github.com/ansible-community/molecule/issues/3065 --- molecule/ome-dundeeomero/molecule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/molecule/ome-dundeeomero/molecule.yml b/molecule/ome-dundeeomero/molecule.yml index 588452cd..2ac38987 100644 --- a/molecule/ome-dundeeomero/molecule.yml +++ b/molecule/ome-dundeeomero/molecule.yml @@ -23,7 +23,7 @@ provisioner: options: diff: true skip-tags: - - skip_molecule + - "skip_molecule" inventory: group_vars: all: From c04a648411bbb7f897622c248fcab8de46a97a7c Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Sun, 11 Jun 2023 13:52:03 +0100 Subject: [PATCH 105/142] comment the skip-tags completely out --- molecule/ome-dundeeomero/molecule.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/molecule/ome-dundeeomero/molecule.yml b/molecule/ome-dundeeomero/molecule.yml index 2ac38987..8260f968 100644 --- a/molecule/ome-dundeeomero/molecule.yml +++ b/molecule/ome-dundeeomero/molecule.yml @@ -22,8 +22,8 @@ provisioner: name: ansible options: diff: true - skip-tags: - - "skip_molecule" + # skip-tags: + # - "skip_molecule" inventory: group_vars: all: From 45bdc473a69a40e3a2c1d4177a0cb4d0d73d5561 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Sun, 11 Jun 2023 14:08:24 +0100 Subject: [PATCH 106/142] try ubuntu 20.04 as per IDR --- .github/workflows/molecule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index fbd88966..443eac50 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -8,7 +8,7 @@ on: jobs: list-scenarios: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 outputs: matrix: ${{ steps.listscenarios.outputs.scenarios }} steps: From 6b74563a1a2380a1646444dc7e25519ff0708c5d Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Sun, 11 Jun 2023 14:18:39 +0100 Subject: [PATCH 107/142] try python 3.9 like in idr --- .github/workflows/molecule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 443eac50..bdf8f2ce 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.8' + python-version: '3.9' - name: Install Ansible & Molecule run: | pip install "ansible<8" "ansible-lint<6.13" flake8 From 31226ec1438aca8265060bb815b84e2115991ccf Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Sun, 11 Jun 2023 14:25:12 +0100 Subject: [PATCH 108/142] Revert "try python 3.9 like in idr" This reverts commit 6b74563a1a2380a1646444dc7e25519ff0708c5d. --- .github/workflows/molecule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index bdf8f2ce..443eac50 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: '3.8' - name: Install Ansible & Molecule run: | pip install "ansible<8" "ansible-lint<6.13" flake8 From f4a611d1cfe1639cceb2b37a7867c92f10193389 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Mon, 12 Jun 2023 15:47:20 +0100 Subject: [PATCH 109/142] Revert "Rename molecule_disabled.yml -> molecule.yml" This reverts commit 0dcc6e99902cd0b3525cd85f4b2286448890b265. --- molecule/ome-pg-prod/{molecule.yml => molecule_disabled.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename molecule/ome-pg-prod/{molecule.yml => molecule_disabled.yml} (100%) diff --git a/molecule/ome-pg-prod/molecule.yml b/molecule/ome-pg-prod/molecule_disabled.yml similarity index 100% rename from molecule/ome-pg-prod/molecule.yml rename to molecule/ome-pg-prod/molecule_disabled.yml From 05e1ed6906de1f7d3c3fdf3b61c2a8527ad4bece Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Mon, 12 Jun 2023 16:18:34 +0100 Subject: [PATCH 110/142] Replace ansible.builtin.yum with ansible.builtin.dnf --- molecule/ome-pg-prod/prepare.yml | 2 +- molecule/resources/prepare-iproute.yml | 4 ++-- omero/nightshade-webclients.yml | 2 +- omero/ome-demoserver.yml | 8 ++++---- omero/ome-dundeeomero.yml | 6 +++--- omero/training-server/playbook.yml | 8 ++++---- www/playbook.yml | 2 +- www/www-static.yml | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/molecule/ome-pg-prod/prepare.yml b/molecule/ome-pg-prod/prepare.yml index 04a5e83f..6362a665 100644 --- a/molecule/ome-pg-prod/prepare.yml +++ b/molecule/ome-pg-prod/prepare.yml @@ -4,6 +4,6 @@ tasks: - name: Install cron become: true - ansible.builtin.yum: + ansible.builtin.dnf: name: cronie state: present diff --git a/molecule/resources/prepare-iproute.yml b/molecule/resources/prepare-iproute.yml index 1730ad08..40ca5708 100644 --- a/molecule/resources/prepare-iproute.yml +++ b/molecule/resources/prepare-iproute.yml @@ -4,12 +4,12 @@ tasks: - name: Install iproute become: true - ansible.builtin.yum: + ansible.builtin.dnf: name: iproute state: present - name: Install cron become: true - ansible.builtin.yum: + ansible.builtin.dnf: name: cronie state: present diff --git a/omero/nightshade-webclients.yml b/omero/nightshade-webclients.yml index 98733452..93537732 100644 --- a/omero/nightshade-webclients.yml +++ b/omero/nightshade-webclients.yml @@ -44,7 +44,7 @@ - name: Install open-vm-tools if system is a VMware vm become: true - ansible.builtin.yum: + ansible.builtin.dnf: name: open-vm-tools state: present when: > diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index 6d5f7be7..a1ccdc34 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -8,7 +8,7 @@ pre_tasks: - name: Install open-vm-tools if system is a VMware vm become: true - ansible.builtin.yum: + ansible.builtin.dnf: name: open-vm-tools state: installed when: > @@ -29,20 +29,20 @@ - name: Install Make Movie script Prerequisite | MEncoder - Repo become: true - ansible.builtin.yum: + ansible.builtin.dnf: name: "http://li.nux.ro/download/nux/dextop/el7\ /x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm" state: present - name: Install Make Movie script Prerequisite | MEncoder - Package become: true - ansible.builtin.yum: + ansible.builtin.dnf: name: mencoder state: present - name: Server-side script prerequisites become: true - ansible.builtin.yum: + ansible.builtin.dnf: name: "{{ item }}" state: present with_items: diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index 1905ae35..3923fc4d 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -5,7 +5,7 @@ pre_tasks: - name: Install open-vm-tools if system is a VMware vm become: true - ansible.builtin.yum: + ansible.builtin.dnf: name: open-vm-tools state: present when: > @@ -27,7 +27,7 @@ - name: Install Make Movie script Prerequisite | MEncoder - Repo become: true - ansible.builtin.yum: + ansible.builtin.dnf: name: "http://li.nux.ro/download/nux/dextop/el7\ /x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm" state: present @@ -35,7 +35,7 @@ # web server is included for decoupled OMERO.web - name: OMERO.figure server-side&script prerequisites & web server become: true - ansible.builtin.yum: + ansible.builtin.dnf: name: "{{ item }}" state: present with_items: diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index ad413288..34e9129a 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -9,7 +9,7 @@ - name: Install Make Movie script Prerequisite | MEncoder - Repo become: true - ansible.builtin.yum: + ansible.builtin.dnf: name: "http://li.nux.ro/download/nux/dextop/el7/x86_64\ /nux-dextop-release-0-5.el7.nux.noarch.rpm" state: present @@ -17,7 +17,7 @@ # web server is included for decoupled OMERO.web - name: OMERO.figure server-side&script prerequisites & web server become: true - ansible.builtin.yum: + ansible.builtin.dnf: name: "{{ item }}" state: present with_items: @@ -25,7 +25,7 @@ - name: Prerequisites for ldap become: true - ansible.builtin.yum: + ansible.builtin.dnf: name: "{{ item }}" state: present with_items: @@ -228,7 +228,7 @@ tasks: - name: Docker | python client become: true - ansible.builtin.yum: + ansible.builtin.dnf: name: docker-python state: present diff --git a/www/playbook.yml b/www/playbook.yml index 8d0affa1..6d72fb98 100644 --- a/www/playbook.yml +++ b/www/playbook.yml @@ -7,7 +7,7 @@ pre_tasks: - name: Install open-vm-tools if system is a VMware vm become: true - ansible.builtin.yum: + ansible.builtin.dnf: name: open-vm-tools state: installed when: > diff --git a/www/www-static.yml b/www/www-static.yml index 786c09c6..c018e283 100644 --- a/www/www-static.yml +++ b/www/www-static.yml @@ -45,7 +45,7 @@ - name: Install Cron daemon become: true - ansible.builtin.yum: + ansible.builtin.dnf: name: cronie state: installed From 877c4b680e4b4204be421204a6a315031c8061cf Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Mon, 12 Jun 2023 16:37:55 +0100 Subject: [PATCH 111/142] Revert "Replace ansible.builtin.yum with ansible.builtin.dnf" This reverts commit 05e1ed6906de1f7d3c3fdf3b61c2a8527ad4bece. --- molecule/ome-pg-prod/prepare.yml | 2 +- molecule/resources/prepare-iproute.yml | 4 ++-- omero/nightshade-webclients.yml | 2 +- omero/ome-demoserver.yml | 8 ++++---- omero/ome-dundeeomero.yml | 6 +++--- omero/training-server/playbook.yml | 8 ++++---- www/playbook.yml | 2 +- www/www-static.yml | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/molecule/ome-pg-prod/prepare.yml b/molecule/ome-pg-prod/prepare.yml index 6362a665..04a5e83f 100644 --- a/molecule/ome-pg-prod/prepare.yml +++ b/molecule/ome-pg-prod/prepare.yml @@ -4,6 +4,6 @@ tasks: - name: Install cron become: true - ansible.builtin.dnf: + ansible.builtin.yum: name: cronie state: present diff --git a/molecule/resources/prepare-iproute.yml b/molecule/resources/prepare-iproute.yml index 40ca5708..1730ad08 100644 --- a/molecule/resources/prepare-iproute.yml +++ b/molecule/resources/prepare-iproute.yml @@ -4,12 +4,12 @@ tasks: - name: Install iproute become: true - ansible.builtin.dnf: + ansible.builtin.yum: name: iproute state: present - name: Install cron become: true - ansible.builtin.dnf: + ansible.builtin.yum: name: cronie state: present diff --git a/omero/nightshade-webclients.yml b/omero/nightshade-webclients.yml index 93537732..98733452 100644 --- a/omero/nightshade-webclients.yml +++ b/omero/nightshade-webclients.yml @@ -44,7 +44,7 @@ - name: Install open-vm-tools if system is a VMware vm become: true - ansible.builtin.dnf: + ansible.builtin.yum: name: open-vm-tools state: present when: > diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index a1ccdc34..6d5f7be7 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -8,7 +8,7 @@ pre_tasks: - name: Install open-vm-tools if system is a VMware vm become: true - ansible.builtin.dnf: + ansible.builtin.yum: name: open-vm-tools state: installed when: > @@ -29,20 +29,20 @@ - name: Install Make Movie script Prerequisite | MEncoder - Repo become: true - ansible.builtin.dnf: + ansible.builtin.yum: name: "http://li.nux.ro/download/nux/dextop/el7\ /x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm" state: present - name: Install Make Movie script Prerequisite | MEncoder - Package become: true - ansible.builtin.dnf: + ansible.builtin.yum: name: mencoder state: present - name: Server-side script prerequisites become: true - ansible.builtin.dnf: + ansible.builtin.yum: name: "{{ item }}" state: present with_items: diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index 3923fc4d..1905ae35 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -5,7 +5,7 @@ pre_tasks: - name: Install open-vm-tools if system is a VMware vm become: true - ansible.builtin.dnf: + ansible.builtin.yum: name: open-vm-tools state: present when: > @@ -27,7 +27,7 @@ - name: Install Make Movie script Prerequisite | MEncoder - Repo become: true - ansible.builtin.dnf: + ansible.builtin.yum: name: "http://li.nux.ro/download/nux/dextop/el7\ /x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm" state: present @@ -35,7 +35,7 @@ # web server is included for decoupled OMERO.web - name: OMERO.figure server-side&script prerequisites & web server become: true - ansible.builtin.dnf: + ansible.builtin.yum: name: "{{ item }}" state: present with_items: diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index 34e9129a..ad413288 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -9,7 +9,7 @@ - name: Install Make Movie script Prerequisite | MEncoder - Repo become: true - ansible.builtin.dnf: + ansible.builtin.yum: name: "http://li.nux.ro/download/nux/dextop/el7/x86_64\ /nux-dextop-release-0-5.el7.nux.noarch.rpm" state: present @@ -17,7 +17,7 @@ # web server is included for decoupled OMERO.web - name: OMERO.figure server-side&script prerequisites & web server become: true - ansible.builtin.dnf: + ansible.builtin.yum: name: "{{ item }}" state: present with_items: @@ -25,7 +25,7 @@ - name: Prerequisites for ldap become: true - ansible.builtin.dnf: + ansible.builtin.yum: name: "{{ item }}" state: present with_items: @@ -228,7 +228,7 @@ tasks: - name: Docker | python client become: true - ansible.builtin.dnf: + ansible.builtin.yum: name: docker-python state: present diff --git a/www/playbook.yml b/www/playbook.yml index 6d72fb98..8d0affa1 100644 --- a/www/playbook.yml +++ b/www/playbook.yml @@ -7,7 +7,7 @@ pre_tasks: - name: Install open-vm-tools if system is a VMware vm become: true - ansible.builtin.dnf: + ansible.builtin.yum: name: open-vm-tools state: installed when: > diff --git a/www/www-static.yml b/www/www-static.yml index c018e283..786c09c6 100644 --- a/www/www-static.yml +++ b/www/www-static.yml @@ -45,7 +45,7 @@ - name: Install Cron daemon become: true - ansible.builtin.dnf: + ansible.builtin.yum: name: cronie state: installed From 29a2984918c43b63768a3ded321391867782f7d9 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Mon, 12 Jun 2023 16:43:29 +0100 Subject: [PATCH 112/142] Try to upgrade to fix the psql link problem --- omero/ome-dundeeomero.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index 1905ae35..0554e238 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -30,7 +30,7 @@ ansible.builtin.yum: name: "http://li.nux.ro/download/nux/dextop/el7\ /x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm" - state: present + state: latest # web server is included for decoupled OMERO.web - name: OMERO.figure server-side&script prerequisites & web server From 866a962140db2955b50fd132d7766ac63ffab057 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 14 Jun 2023 14:15:11 +0100 Subject: [PATCH 113/142] Add update of ca-certs for dundeeomero --- molecule/ome-dundeeomero/prepare.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 molecule/ome-dundeeomero/prepare.yml diff --git a/molecule/ome-dundeeomero/prepare.yml b/molecule/ome-dundeeomero/prepare.yml new file mode 100644 index 00000000..c440f23f --- /dev/null +++ b/molecule/ome-dundeeomero/prepare.yml @@ -0,0 +1,7 @@ +# Make url downloaded from r +- name: Prepare ome-dundeeomero + hosts: ome-dundeeomero.openmicroscopy.org + tasks: + - name: Update ca-certificates + become: true + ansible.builtin.command: update-ca-certificates From da5649ba52e54d774a6fbdeae246363640de427b Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 14 Jun 2023 14:39:23 +0100 Subject: [PATCH 114/142] Return dockerfile --- molecule/ome-dundeeomero/Dockerfile.j2 | 1 + 1 file changed, 1 insertion(+) create mode 100644 molecule/ome-dundeeomero/Dockerfile.j2 diff --git a/molecule/ome-dundeeomero/Dockerfile.j2 b/molecule/ome-dundeeomero/Dockerfile.j2 new file mode 100644 index 00000000..0e9184b4 --- /dev/null +++ b/molecule/ome-dundeeomero/Dockerfile.j2 @@ -0,0 +1 @@ +../resources/Dockerfile.j2 \ No newline at end of file From b6643f8be853ef0be5d95cb311432a9e666783d2 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 14 Jun 2023 14:46:14 +0100 Subject: [PATCH 115/142] Do not use path alias for dockerfile --- molecule/ome-dundeeomero/Dockerfile.j2 | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/molecule/ome-dundeeomero/Dockerfile.j2 b/molecule/ome-dundeeomero/Dockerfile.j2 index 0e9184b4..00b7fd61 100644 --- a/molecule/ome-dundeeomero/Dockerfile.j2 +++ b/molecule/ome-dundeeomero/Dockerfile.j2 @@ -1 +1,22 @@ -../resources/Dockerfile.j2 \ No newline at end of file +# Molecule managed + +{% if item.registry is defined %} +FROM {{ item.registry.url }}/{{ item.image }} +{% else %} +FROM {{ item.image }} +{% endif %} + +{% if item.env is defined %} +{% for var, value in item.env.items() %} +{% if value %} +ENV {{ var }} {{ value }} +{% endif %} +{% endfor %} +{% endif %} + +RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates iproute2 && apt-get clean; \ + elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash iproute && dnf clean all; \ + elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash iproute ca-certificates && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ + elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml iproute2 && zypper clean -a; \ + elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \ + elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates iproute2 && xbps-remove -O; fi From 5a44b0efae6489a06007a8b030ccbf4e469fa96e Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 14 Jun 2023 14:54:16 +0100 Subject: [PATCH 116/142] Revert "Add update of ca-certs for dundeeomero" This reverts commit 866a962140db2955b50fd132d7766ac63ffab057. --- molecule/ome-dundeeomero/prepare.yml | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 molecule/ome-dundeeomero/prepare.yml diff --git a/molecule/ome-dundeeomero/prepare.yml b/molecule/ome-dundeeomero/prepare.yml deleted file mode 100644 index c440f23f..00000000 --- a/molecule/ome-dundeeomero/prepare.yml +++ /dev/null @@ -1,7 +0,0 @@ -# Make url downloaded from r -- name: Prepare ome-dundeeomero - hosts: ome-dundeeomero.openmicroscopy.org - tasks: - - name: Update ca-certificates - become: true - ansible.builtin.command: update-ca-certificates From 74c07fbb28778e857dcde19c9695e7f81beaa051 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 14 Jun 2023 15:14:38 +0100 Subject: [PATCH 117/142] Insert missing slash to format url correctly --- omero/ome-dundeeomero.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index 0554e238..1c8ef537 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -198,7 +198,7 @@ become: true ansible.builtin.get_url: url: "https://raw.githubusercontent.com/ome\ - /omero-guide-figure + /omero-guide-figure\ /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Dataset\ _Images_To_New_Figure.py" dest: "/opt/omero/server/OMERO.server/lib/scripts\ From 8c460711af1c14be2bb585d76bd1c27d73070eea Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 14 Jun 2023 15:21:21 +0100 Subject: [PATCH 118/142] Add the other 2 dockerfiles back --- molecule/docker-prod/Dockerfile.j2 | 22 ++++++++++++++++++++ molecule/omero-training-server/Dockerfile.j2 | 22 ++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 molecule/docker-prod/Dockerfile.j2 create mode 100644 molecule/omero-training-server/Dockerfile.j2 diff --git a/molecule/docker-prod/Dockerfile.j2 b/molecule/docker-prod/Dockerfile.j2 new file mode 100644 index 00000000..00b7fd61 --- /dev/null +++ b/molecule/docker-prod/Dockerfile.j2 @@ -0,0 +1,22 @@ +# Molecule managed + +{% if item.registry is defined %} +FROM {{ item.registry.url }}/{{ item.image }} +{% else %} +FROM {{ item.image }} +{% endif %} + +{% if item.env is defined %} +{% for var, value in item.env.items() %} +{% if value %} +ENV {{ var }} {{ value }} +{% endif %} +{% endfor %} +{% endif %} + +RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates iproute2 && apt-get clean; \ + elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash iproute && dnf clean all; \ + elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash iproute ca-certificates && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ + elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml iproute2 && zypper clean -a; \ + elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \ + elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates iproute2 && xbps-remove -O; fi diff --git a/molecule/omero-training-server/Dockerfile.j2 b/molecule/omero-training-server/Dockerfile.j2 new file mode 100644 index 00000000..00b7fd61 --- /dev/null +++ b/molecule/omero-training-server/Dockerfile.j2 @@ -0,0 +1,22 @@ +# Molecule managed + +{% if item.registry is defined %} +FROM {{ item.registry.url }}/{{ item.image }} +{% else %} +FROM {{ item.image }} +{% endif %} + +{% if item.env is defined %} +{% for var, value in item.env.items() %} +{% if value %} +ENV {{ var }} {{ value }} +{% endif %} +{% endfor %} +{% endif %} + +RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates iproute2 && apt-get clean; \ + elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash iproute && dnf clean all; \ + elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash iproute ca-certificates && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ + elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml iproute2 && zypper clean -a; \ + elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \ + elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates iproute2 && xbps-remove -O; fi From 96c2d98967267b65f13e91659580a0a335143cc4 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 14 Jun 2023 16:06:14 +0100 Subject: [PATCH 119/142] Try to fix syntax error in web config --- omero/training-server/playbook.yml | 78 +++++++++--------------------- 1 file changed, 22 insertions(+), 56 deletions(-) diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index ad413288..6a541837 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -114,59 +114,28 @@ omero_web_config_set: omero.web.apps: - - "omero_iviewer" - - "omero_figure" - - "omero_fpbioimage" - - "omero_webtagging_autotag" - - "omero_webtagging_tagsearch" - - "omero_parade" - - "omero_mapr" + - "omero_iviewer" + - "omero_figure" + - "omero_fpbioimage" + - "omero_webtagging_autotag" + - "omero_webtagging_tagsearch" + - "omero_parade" + - "omero_mapr" omero.web.ui.center_plugins: - - - "Auto Tag" - - "omero_webtagging_autotag/auto_tag_init.js.html" - - "auto_tag_panel" - - - "Parade" - - "omero_parade/init.js.html" - - "omero_parade" + - ["Auto Tag", "omero_webtagging_autotag/auto_tag_init.js.html", "auto_tag_panel"] + - ["Parade", "omero_parade/init.js.html", "omero_parade"] omero.web.ui.top_links: - - - "Data" - - "webindex" - - title: "Browse Data via Projects, Tags etc" - - - "History" - - "history" - - title: "History" - - - "Help" - - "https://help.openmicroscopy.org/" - - title: "Open OMERO user guide in a new tab" - target: "new" - - - "Figure" - - "figure_index" - - title: "Open Figure in new tab" - target: "_blank" - - - "Tag Search" - - "tagsearch" - - - "Genes" - - query_string: {"experimenter": -1} - viewname: "maprindex_gene" - - title": "Find Gene annotations" - - - "Key-Value" - - viewname: "maprindex_keyvalue" - - title: "Search for manually-added Key-Value pairs" + - ["Data", "webindex", {"title": "Browse Data via Projects, Tags etc"}] + - ["History", "history", {"title": "History"}] + - ["Help", "https://help.openmicroscopy.org/", {"title": "Open OMERO user guide in a new tab", "target": "new"}] + - ["Figure", "figure_index", {"title": "Open Figure in new tab", "target": "_blank"}] + - ["Tag Search", "tagsearch"] + - ["Genes", {"query_string": {"experimenter": -1}, "viewname": "maprindex_gene"}, {"title": "Find Gene annotations"}] + - ["Key-Value", {"viewname": "maprindex_keyvalue"}, {"title": "Search for manually-added Key-Value pairs"}] omero.web.open_with: - - - "Image viewer" - - "webgateway" - - supported_objects: ["image"] - script_url: "webclient/javascript/ome.openwith_viewer.js" - - - omero_figure - - new_figure - - supported_objects: ["images"] - target: "_blank" - label: "OMERO.figure" - - - omero_fpbioimage - - fpbioimage_index - - supported_objects: ["image"] - script_url: "fpbioimage/openwith.js" - label: "FPBioimage" + - ["Image viewer", "webgateway", {"supported_objects": ["image"], "script_url": "webclient/javascript/ome.openwith_viewer.js"}] + - ["omero_figure", "new_figure", {"supported_objects":["images"], "target": "_blank", "label": "OMERO.figure"}] + - ["omero_fpbioimage", "fpbioimage_index", {"supported_objects":["image"], "script_url": "fpbioimage/openwith.js", "label": "FPBioimage"}] - - omero_iviewer - omero_iviewer_index - supported_objects: @@ -209,12 +178,9 @@ } omero.web.public.enabled: true - omero.web.public.password: >- - {{ omero_web_public_password_override | default('secret') }} - omero.web.public.url_filter: >- - ^/({{ idr_omero_web_public_url_filters | join('|') }}) - omero.web.public.user: >- - {{ omero_web_public_user_override | default('secret') }} + omero.web.public.password: "{{ omero_web_public_password_override | default('secret') }}" + omero.web.public.url_filter: "^/({{ idr_omero_web_public_url_filters | join('|') }})" + omero.web.public.user: "{{ omero_web_public_user_override | default('secret') }}" - role: ome.iptables_raw From 3dd562c58fc1b741bd635d885ca798fc4192792f Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 14 Jun 2023 16:19:37 +0100 Subject: [PATCH 120/142] Try to fix syntax error introductions in docker-prod-apps --- omedev/docker-prod-apps.yml | 112 ++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 63 deletions(-) diff --git a/omedev/docker-prod-apps.yml b/omedev/docker-prod-apps.yml index 4e390872..f47dbf6e 100644 --- a/omedev/docker-prod-apps.yml +++ b/omedev/docker-prod-apps.yml @@ -2,14 +2,13 @@ # Production Docker applications # May want to change this to a hostgroup -- name: Docker production applications - hosts: ome-dockr-prod1.openmicroscopy.org +- hosts: ome-dockr-prod1.openmicroscopy.org pre_tasks: - name: Create Prometheus data directory become: true - ansible.builtin.file: + file: path: "{{ prometheus_docker_data_volume }}" owner: "{{ prometheus_docker_user }}" group: root @@ -18,7 +17,7 @@ - name: Create Minio data directory become: true - ansible.builtin.file: + file: path: "{{ nfs_minio_data_volume }}" owner: root group: root @@ -27,7 +26,7 @@ - name: Create Redmine data directory become: true - ansible.builtin.file: + file: path: "{{ redmine_tracker_docker_data_volume }}" owner: "{{ redmine_docker_user }}" group: "{{ redmine_docker_user }}" @@ -74,7 +73,7 @@ metrics_path: /metrics/9100 scheme: https static_configs: - - targets: "{{ monitored_node_exporter_hosts }}" + - targets: "{{ monitored_node_exporter_hosts }}" - job_name: omero-web basic_auth: @@ -83,7 +82,7 @@ metrics_path: /django_prometheus/metrics scheme: https static_configs: - - targets: "{{ monitored_omero_web_hosts }}" + - targets: "{{ monitored_omero_web_hosts }}" - job_name: jmx-blitz basic_auth: @@ -92,7 +91,7 @@ metrics_path: /metrics/9180 scheme: https static_configs: - - targets: "{{ monitored_omero_server_hosts }}" + - targets: "{{ monitored_omero_server_hosts }}" - job_name: jmx-indexer basic_auth: @@ -101,7 +100,7 @@ metrics_path: /metrics/9181 scheme: https static_configs: - - targets: "{{ monitored_omero_server_hosts }}" + - targets: "{{ monitored_omero_server_hosts }}" - job_name: jmx-pixeldata basic_auth: @@ -110,7 +109,7 @@ metrics_path: /metrics/9182 scheme: https static_configs: - - targets: "{{ monitored_omero_server_hosts }}" + - targets: "{{ monitored_omero_server_hosts }}" - job_name: postgres-exporter basic_auth: @@ -119,7 +118,7 @@ metrics_path: /metrics/9187 scheme: https static_configs: - - targets: "{{ monitored_postgres_hosts }}" + - targets: "{{ monitored_postgres_hosts }}" - job_name: omero-server basic_auth: @@ -128,12 +127,11 @@ metrics_path: /metrics/9449 scheme: https static_configs: - - targets: "{{ monitored_omero_server_hosts }}" + - targets: "{{ monitored_omero_server_hosts }}" # Federated metrics from the IDR # To get all federated metrics so you can decide what to fetch: -# curl -G https://idr.openmicroscopy.org/prometheus/federate \ -# --data-urlencode 'match[]={__name__=~".+"}' +# curl -G https://idr.openmicroscopy.org/prometheus/federate --data-urlencode 'match[]={__name__=~".+"}' - job_name: federate-{{ idr_internal_1 }} honor_labels: true @@ -145,10 +143,10 @@ - '{job="omero-server"}' scheme: https static_configs: - - targets: - - "{{ idr_internal_1 }}.openmicroscopy.org" - labels: - prometheussrc: "{{ idr_internal_1 }}" + - targets: + - "{{ idr_internal_1 }}.openmicroscopy.org" + labels: + prometheussrc: "{{ idr_internal_1 }}" - job_name: federate-{{ idr_internal_2 }} honor_labels: true @@ -160,10 +158,10 @@ - '{job="omero-server"}' scheme: https static_configs: - - targets: - - "{{ idr_internal_2 }}.openmicroscopy.org" - labels: - prometheussrc: "{{ idr_internal_2 }}" + - targets: + - "{{ idr_internal_2 }}.openmicroscopy.org" + labels: + prometheussrc: "{{ idr_internal_2 }}" - job_name: federate-idr-production honor_labels: true @@ -175,10 +173,10 @@ - '{job="omero-server"}' scheme: https static_configs: - - targets: - - idr.openmicroscopy.org - labels: - prometheussrc: idr-production + - targets: + - idr.openmicroscopy.org + labels: + prometheussrc: idr-production - job_name: federate-idr-analysis basic_auth: @@ -196,10 +194,10 @@ - '{__name__="container_memory_rss"}' scheme: https static_configs: - - targets: - - idr-analysis.openmicroscopy.org - labels: - prometheussrc: idr-analysis + - targets: + - idr-analysis.openmicroscopy.org + labels: + prometheussrc: idr-analysis # The prometheus role sets the prometheus_internal_ip variable that is # used later @@ -219,7 +217,7 @@ nginx_proxy_http2: true nginx_proxy_ssl_certificate: "{{ ssl_certificate_bundled_path }}" nginx_proxy_ssl_certificate_key: "{{ ssl_certificate_key_path }}" - nginx_proxy_force_ssl: true + nginx_proxy_force_ssl: True nginx_proxy_conf_http: - "client_max_body_size 128m" nginx_proxy_sites: @@ -253,7 +251,7 @@ - name: Run docker grafana become: true - community.docker.docker_container: + docker_container: image: grafana/grafana:7.2.0 env: GF_SERVER_ROOT_URL: '%(protocol)s://%(domain)s:%(http_port)s/grafana/' @@ -267,16 +265,16 @@ - grafana-data:/var/lib/grafana register: _grafana_container - - name: Prometheus htpasswd parent directory + - name: prometheus htpasswd parent directory become: true - ansible.builtin.file: + file: path: /etc/nginx state: directory mode: 0755 - - name: Prometheus htpasswd file + - name: prometheus htpasswd file become: true - ansible.builtin.copy: + copy: dest: /etc/nginx/prometheus.htpasswd # default: admin:monitoring content: >- @@ -289,14 +287,12 @@ # This is a dev Minio server so expose the port directly - name: Run docker minio dev server become: true - community.docker.docker_container: + docker_container: image: minio/minio:RELEASE.2020-10-18T21-54-12Z command: gateway nas /data env: - MINIO_ACCESS_KEY: "{{ ome_miniodev_access_key \ - | default('minio') }}" - MINIO_SECRET_KEY: "{{ ome_miniodev_secret_key \ - | default('minio123') }}" + MINIO_ACCESS_KEY: "{{ ome_miniodev_access_key | default('minio') }}" + MINIO_SECRET_KEY: "{{ ome_miniodev_secret_key | default('minio123') }}" name: miniodev state: started published_ports: @@ -307,7 +303,7 @@ - name: Run docker nginx proxy become: true - community.docker.docker_container: + docker_container: image: library/nginx:{{ nginx_version }} name: nginx networks: @@ -327,31 +323,21 @@ vars: - monitored_node_exporter_hosts: "{{ ome_monitored_node_exporter_hosts\ - | default([]) }}" - monitored_postgres_hosts: "{{ ome_monitored_postgres_hosts\ - | default([]) }}" - monitored_omero_server_hosts: "{{ ome_monitored_omero_server_hosts\ - | default([]) }}" - monitored_omero_web_hosts: "{{ ome_monitored_omero_web_hosts\ - | default([]) }}" + monitored_node_exporter_hosts: "{{ ome_monitored_node_exporter_hosts | default([]) }}" + monitored_postgres_hosts: "{{ ome_monitored_postgres_hosts | default([]) }}" + monitored_omero_server_hosts: "{{ ome_monitored_omero_server_hosts | default([]) }}" + monitored_omero_web_hosts: "{{ ome_monitored_omero_web_hosts | default([]) }}" prometheus_docker_user: 909 redmine_docker_user: 999 - idr_internal_1: "{{ ome_monitored_idr_internal_1\ - | default('idr1') }}" - idr_internal_2: "{{ ome_monitored_idr_internal_2\ - | default('idr2') }}" - - scrape_username: "{{ ome_monitored_scrape_username\ - | default('monitoring') }}" - scrape_password: "{{ ome_monitored_scrape_password\ - | default('monitoring') }}" - scrape_idr_username: "{{ ome_monitored_scrape_idr_username\ - | default('monitoring') }}" - scrape_idr_password: "{{ ome_monitored_scrape_idr_password\ - | default('monitoring') }}" + idr_internal_1: "{{ ome_monitored_idr_internal_1 | default('idr1') }}" + idr_internal_2: "{{ ome_monitored_idr_internal_2 | default('idr2') }}" + + scrape_username: "{{ ome_monitored_scrape_username | default('monitoring') }}" + scrape_password: "{{ ome_monitored_scrape_password | default('monitoring') }}" + scrape_idr_username: "{{ ome_monitored_scrape_idr_username | default('monitoring') }}" + scrape_idr_password: "{{ ome_monitored_scrape_idr_password | default('monitoring') }}" nginx_version: 1.18.0 From d906ef0c89f877cb4e5cb615c8b4e62879e5412c Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 14 Jun 2023 16:47:53 +0100 Subject: [PATCH 121/142] try to fix the jmespath error by installing in docker --- molecule/docker-prod/Dockerfile.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/molecule/docker-prod/Dockerfile.j2 b/molecule/docker-prod/Dockerfile.j2 index 00b7fd61..7e2d467d 100644 --- a/molecule/docker-prod/Dockerfile.j2 +++ b/molecule/docker-prod/Dockerfile.j2 @@ -14,9 +14,9 @@ ENV {{ var }} {{ value }} {% endfor %} {% endif %} -RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates iproute2 && apt-get clean; \ +RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo python-jmespath bash ca-certificates iproute2 && apt-get clean; \ elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash iproute && dnf clean all; \ - elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash iproute ca-certificates && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ + elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo python36-jmespath python38-jmespath yum-plugin-ovl bash iproute ca-certificates && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml iproute2 && zypper clean -a; \ elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \ elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates iproute2 && xbps-remove -O; fi From c9c04af4e14b537d974f301247437f54c68d0952 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 14 Jun 2023 16:51:10 +0100 Subject: [PATCH 122/142] Reject all changes in training playbook to exclude error --- omero/training-server/playbook.yml | 334 ++++++++++++----------------- 1 file changed, 138 insertions(+), 196 deletions(-) diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index 6a541837..40d7cf8d 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -3,29 +3,26 @@ # Set https_letsencrypt_enabled to True in production to ensure certbot # handles the letsencrypt certificate setup -- name: Outreach servers deployment and upgrade - hosts: ome-outreach +- hosts: ome-outreach pre_tasks: - name: Install Make Movie script Prerequisite | MEncoder - Repo - become: true - ansible.builtin.yum: - name: "http://li.nux.ro/download/nux/dextop/el7/x86_64\ - /nux-dextop-release-0-5.el7.nux.noarch.rpm" + become: yes + yum: + name: http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm state: present - # web server is included for decoupled OMERO.web - - name: OMERO.figure server-side&script prerequisites & web server - become: true - ansible.builtin.yum: + - name: OMERO.figure server-side prerequisites, script prerequisites + web server for decoupled OMERO.web + become: yes + yum: name: "{{ item }}" state: present with_items: - mencoder # For the 'make movie' script - name: Prerequisites for ldap - become: true - ansible.builtin.yum: + become: yes + yum: name: "{{ item }}" state: present with_items: @@ -34,11 +31,10 @@ - gcc - python-ldap - # Since Nginx isn't installed until later - # the directories are created in advance + # Since Nginx isn't installed until later the directories are created in advance - name: Create nginx include directories - become: true - ansible.builtin.file: + become: yes + file: path: "{{ item }}" state: directory mode: 0755 @@ -47,8 +43,8 @@ - /etc/nginx/conf.d-nested-includes - name: NGINX - websocket proxy support - become: true - ansible.builtin.template: + become: yes + template: src: templates/nginx-confd-websockets-conf.j2 dest: /etc/nginx/conf.d/websockets.conf mode: 0644 @@ -58,11 +54,11 @@ - role: ome.postgresql postgresql_databases: - - name: omero + - name: omero postgresql_users: - - user: omero - password: omero - databases: [omero] + - user: omero + password: omero + databases: [omero] - role: ome.postgresql_backup postgresql_backup_compress: true @@ -105,22 +101,20 @@ - gallery_settings/ - cell/ - tissue/ - - > - webclient/(?!({{ idr_omero_web_public_url_filters_webclient_exclude - | join('|') }})) + - webclient/(?!({{ idr_omero_web_public_url_filters_webclient_exclude | join('|') }})) - webgateway/(?!(archived_files|download_as)) omero_web_python_addons: - "omero-py>={{ omero_py_release }}" omero_web_config_set: omero.web.apps: - - "omero_iviewer" - - "omero_figure" - - "omero_fpbioimage" - - "omero_webtagging_autotag" - - "omero_webtagging_tagsearch" - - "omero_parade" - - "omero_mapr" + - "omero_iviewer" + - "omero_figure" + - "omero_fpbioimage" + - "omero_webtagging_autotag" + - "omero_webtagging_tagsearch" + - "omero_parade" + - "omero_mapr" omero.web.ui.center_plugins: - ["Auto Tag", "omero_webtagging_autotag/auto_tag_init.js.html", "auto_tag_panel"] - ["Parade", "omero_parade/init.js.html", "omero_parade"] @@ -186,178 +180,153 @@ - role: ome.docker docker_additional_options: - # Manually configure to avoid conflicts betw Docker and system rules + # Manually configure to avoid conflicts between Docker and system rules iptables: false - role: ome.cli_utils tasks: - name: Docker | python client - become: true - ansible.builtin.yum: + become: yes + yum: name: docker-python state: present - name: Create a figure scripts directory - become: true - ansible.builtin.file: + become: yes + file: path: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts state: directory mode: 0755 - recurse: true + recurse: yes owner: "omero-server" group: "omero-server" - name: Download the Figure_To_Pdf.py script - become: true - ansible.builtin.get_url: - url: >- - https://raw.githubusercontent.com/ome/omero-figure/v{{ - omero_figure_release - }}/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py - dest: "/opt/omero/server/OMERO.server/lib/scripts\ - /omero/figure_scripts/Figure_To_Pdf.py" + become: yes + get_url: + url: https://raw.githubusercontent.com/ome/omero-figure/v{{ omero_figure_release }}/omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py + dest: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts/Figure_To_Pdf.py mode: 0755 owner: "omero-server" group: "omero-server" - force: true + force: yes - name: Download the Dataset_Images_To_New_Figure.py script - become: true - ansible.builtin.get_url: - url: "https://raw.githubusercontent.com/ome/\ - omero-guide-figure\ - /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts\ - /Dataset_Images_To_New_Figure.py" - dest: "/opt/omero/server/OMERO.server/lib/scripts\ - /omero/figure_scripts/Dataset_Images_To_New_Figure.py" + become: yes + get_url: + url: https://raw.githubusercontent.com/ome/omero-guide-figure/f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Dataset_Images_To_New_Figure.py + dest: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts/Dataset_Images_To_New_Figure.py mode: 0755 owner: "omero-server" group: "omero-server" - force: true + force: yes - name: Download the Figure_Images_To_Dataset.py script - become: true - ansible.builtin.get_url: - url: "https://raw.githubusercontent.com\ - /ome/omero-guide-figure\ - /f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts\ - /Figure_Images_To_Dataset.py" - dest: "/opt/omero/server/OMERO.server/lib/scripts\ - /omero/figure_scripts/Figure_Images_To_Dataset.py" + become: yes + get_url: + url: https://raw.githubusercontent.com/ome/omero-guide-figure/f45f733a16852ae8b3c52ec93aef480d26b8e9f9/scripts/Figure_Images_To_Dataset.py + dest: /opt/omero/server/OMERO.server/lib/scripts/omero/figure_scripts/Figure_Images_To_Dataset.py mode: 0755 owner: "omero-server" group: "omero-server" - force: true + force: yes - name: Create a workshop_scripts directory - become: true - ansible.builtin.file: - path: "/opt/omero/server/OMERO.server/lib/scripts\ - /omero/workshop_scripts" + become: yes + file: + path: /opt/omero/server/OMERO.server/lib/scripts/omero/workshop_scripts state: directory mode: 0755 - recurse: true + recurse: yes owner: "omero-server" group: "omero-server" - name: Download the Scipy_Gaussian_Filter.py script - become: true - ansible.builtin.get_url: - url: >- - https://raw.githubusercontent.com/ome/omero-guide-python/v{{ - ome_training_scripts_release }}/scripts/scipy_gaussian_filter.py - dest: "/opt/omero/server/OMERO.server/lib/scripts\ - /omero/workshop_scripts/Scipy_Gaussian_Filter.py" + become: yes + get_url: + url: https://raw.githubusercontent.com/ome/omero-guide-python/v{{ ome_training_scripts_release }}/scripts/scipy_gaussian_filter.py + dest: /opt/omero/server/OMERO.server/lib/scripts/omero/workshop_scripts/Scipy_Gaussian_Filter.py mode: 0755 owner: "omero-server" group: "omero-server" - force: true + force: yes - name: Download the simple_frap.py script - become: true - ansible.builtin.get_url: - url: >- - https://raw.githubusercontent.com/ome/omero-guide-python/v{{ - ome_training_scripts_release }}/scripts/simple_frap.py - dest: "/opt/omero/server/OMERO.server/lib/scripts\ - /omero/workshop_scripts/simple_frap.py" + become: yes + get_url: + url: https://raw.githubusercontent.com/ome/omero-guide-python/v{{ ome_training_scripts_release }}/scripts/simple_frap.py + dest: /opt/omero/server/OMERO.server/lib/scripts/omero/workshop_scripts/simple_frap.py mode: 0755 owner: "omero-server" group: "omero-server" - force: true + force: yes - name: Download the simple_frap_with_figure.py script - become: true - ansible.builtin.get_url: - url: >- - https://raw.githubusercontent.com/ome/omero-guide-python/v{{ - ome_training_scripts_release }}/scripts/simple_frap_with_figure.py - dest: "/opt/omero/server/OMERO.server/lib/scripts\ - /omero/workshop_scripts/simple_frap_with_figure.py" + become: yes + get_url: + url: https://raw.githubusercontent.com/ome/omero-guide-python/v{{ ome_training_scripts_release }}/scripts/simple_frap_with_figure.py + dest: /opt/omero/server/OMERO.server/lib/scripts/omero/workshop_scripts/simple_frap_with_figure.py mode: 0755 owner: "omero-server" group: "omero-server" - force: true + force: yes - name: Create a directory for ldap scripts - become: true - ansible.builtin.file: + become: yes + file: path: /home/ldap state: directory mode: 0755 - recurse: true + recurse: yes - name: Download the ldap scripts - become: true - ansible.builtin.get_url: - url: >- - https://raw.githubusercontent.com/openmicroscopy/apacheds-docker/{{ - apache_docker_release }}/bin/ldapmanager + become: yes + get_url: + url: https://raw.githubusercontent.com/openmicroscopy/apacheds-docker/{{ apache_docker_release }}/bin/ldapmanager dest: /home/ldap/ldapmanager mode: 0755 - force: true + force: yes - name: Add DropBox folder for trainer-1 - become: true - ansible.builtin.file: + become: yes + file: path: /home/DropBox/trainer-1 state: directory mode: 0755 - recurse: true + recurse: yes owner: "omero-server" group: "omero-server" - name: Add operating system user "importer1" become: true - ansible.builtin.user: - name: "importer1" - state: present - groups: "{{ omero_server_system_managedrepo_group }}" - password: >- - {{ os_system_users_password | password_hash('sha512', 'ome') }} + user: + name: "importer1" + state: present + groups: "{{ omero_server_system_managedrepo_group }}" + password: "{{ os_system_users_password | password_hash('sha512', 'ome') }}" - name: Allow managed repo group to login - become: true - ansible.builtin.lineinfile: + become: yes + lineinfile: path: /etc/security/access.conf regexp: "{{ omero_server_system_managedrepo_group }}" insertbefore: BOF line: "+:{{ omero_server_system_managedrepo_group }}:ALL" - name: Run docker for ldap - become: true - community.docker.docker_container: + become: yes + docker_container: image: openmicroscopy/apacheds:{{ apache_docker_release }} name: ldap published_ports: - - "10389:10389" + - "10389:10389" state: started restart_policy: always - name: Run docker for omero-ms-zarr - become: true - community.docker.docker_container: + become: yes + docker_container: image: openmicroscopy/omero-ms-zarr:{{ omero_ms_zarr_release }} name: omero_ms_zarr env: @@ -369,26 +338,26 @@ network_mode: host restart_policy: always state: started - pull: true + pull: yes volumes: - "/OMERO:/OMERO:ro" - name: Create minio config directory - become: true - ansible.builtin.file: + become: yes + file: path: /etc/minio state: directory mode: 0755 - name: Check if minio admin credentials exists - become: true - ansible.builtin.stat: + become: yes + stat: path: /etc/minio/docker-minio.env register: _minio_docker_env_st - name: Create random minio admin credentials file - become: true - ansible.builtin.copy: + become: yes + copy: content: | MINIO_ACCESS_KEY={{ lookup('password', '/dev/null length=12') }} MINIO_SECRET_KEY={{ lookup('password', '/dev/null length=24') }} @@ -397,22 +366,22 @@ when: not _minio_docker_env_st.stat.exists - name: Run docker for minio - become: true - community.docker.docker_container: + become: yes + docker_container: image: minio/minio:{{ minio_docker_release }} name: minio command: server /srv/minio env_file: /etc/minio/docker-minio.env published_ports: - - "9000:9000" + - "9000:9000" state: started restart_policy: always volumes: - "/srv/minio:/srv/minio" - name: Nginx - docker webservices support - become: true - ansible.builtin.template: + become: yes + template: src: templates/nginx-confdnestedincludes-{{ item }}.j2 dest: /etc/nginx/conf.d-nested-includes/{{ item }}.conf mode: 0644 @@ -429,7 +398,7 @@ # - incoming from host localhost - name: Iptables Docker forward rules - become: true + become: yes iptables_raw_25: name: docker_outreach_rules rules: | @@ -438,7 +407,7 @@ state: present - name: Iptables Docker nat rules - become: true + become: yes iptables_raw_25: name: docker_outreach_nat table: nat @@ -449,46 +418,36 @@ state: present # TODO: Move to an independent role, currently bundled in - # https://github.com/manics/ansible-role-minio-s3-gateway/ - # blob/0.1.0/tasks/minio-client.yml + # https://github.com/manics/ansible-role-minio-s3-gateway/blob/0.1.0/tasks/minio-client.yml - name: Download minio client become: true - ansible.builtin.get_url: - url: "https://dl.min.io/client/mc/release\ - /linux-amd64/archive/mc.RELEASE.2020-11-25T23-04-07Z" - checksum: "sha256:985c43f9bec8fdc4ef2ee44c63\ - c9657e10c4cfeb5cb949179d6d693f7428c314" + get_url: + url: + https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2020-11-25T23-04-07Z + checksum: + sha256:985c43f9bec8fdc4ef2ee44c63c9657e10c4cfeb5cb949179d6d693f7428c314 dest: /usr/local/bin/mc mode: u=rwx,g=rx,o=rx # Crypted passwords generated using - # https://docs.ansible.com/ansible/latest/reference_appendices/ - # faq.html#how-do-i-generate-crypted-passwords-for-the-user-module + # https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-generate-crypted-passwords-for-the-user-module vars: - # omero_server_datadir_chown: true - # temporal upgrade force for omero server workaround - # omero_server_checkupgrade_comparator: '!=' + #omero_server_datadir_chown: True + #temporal upgrade force for omero server workaround + #omero_server_checkupgrade_comparator: '!=' postgresql_version: "13" - omero_server_selfsigned_certificates: true + omero_server_selfsigned_certificates: True omero_server_system_managedrepo_group: managed_repo_group omero_server_datadir_managedrepo_mode: u=rwX,g=srwX,o=rX,+t - omero_server_datadir_chown: false - omero_server_release: >- - {{ omero_server_release_override | default('5.6.6') }} - omero_web_release: >- - {{ omero_web_release_override | default('5.16.0') }} - omero_figure_release: >- - {{ omero_figure_release_override | default('5.1.0') }} - omero_fpbioimage_release: >- - {{ omero_fpbioimage_release_override | default('0.4.0') }} - omero_iviewer_release: >- - {{ omero_iviewer_release_override | default('0.12.0') }} - omero_mapr_release: >- - {{ omero_mapr_release_override | default('0.5.0') }} - omero_parade_release: >- - {{ omero_parade_release_override | default('0.2.3') }} - omero_py_release: >- - {{ omero_py_release_override | default('5.13.1') }} + omero_server_datadir_chown: False + omero_server_release: "{{ omero_server_release_override | default('5.6.6') }}" + omero_web_release: "{{ omero_web_release_override | default('5.16.0') }}" + omero_figure_release: "{{ omero_figure_release_override | default('5.1.0') }}" + omero_fpbioimage_release: "{{ omero_fpbioimage_release_override | default('0.4.0') }}" + omero_iviewer_release: "{{ omero_iviewer_release_override | default('0.12.0') }}" + omero_mapr_release: "{{ omero_mapr_release_override | default('0.5.0') }}" + omero_parade_release: "{{ omero_parade_release_override | default('0.2.3') }}" + omero_py_release: "{{ omero_py_release_override | default('5.13.1') }}" # The omero_web_apps_* vars are used by the ome.omero_web role under # Python 3 otherwise ignored @@ -501,30 +460,19 @@ - "omero-webtagging-autotag=={{ omero_webtagging_autotag_release }}" - "omero-webtagging-tagsearch=={{ omero_webtagging_tagsearch_release }}" - ome_training_scripts_release: >- - {{ ome_training_scripts_release_override | default('0.2.0') }} - omero_webtagging_autotag_release: >- - {{ omero_webtagging_autotag_release_override | default('3.2.0') }} - omero_webtagging_tagsearch_release: >- - {{ omero_webtagging_tagsearch_release_override | default('3.2.0') }} - omero_cli_duplicate_release: >- - {{ omero_cli_duplicate_release_override | default('0.4.0') }} - omero_metadata_release: >- - {{ omero_metadata_release_overrride | default('0.8.0') }} - omero_cli_render_release: >- - {{ omero_cli_render_release_override | default('0.7.0') }} - os_system_users_password: >- - {{ os_system_users_password_override | default('ome') }} - apache_docker_release: >- - {{ apache_docker_release_override | default('0.6.0') }} - omero_ms_zarr_release: >- - {{ omero_ms_zarr_release_override | default('latest') }} - minio_docker_release: >- - {{ minio_docker_release_override | - default('RELEASE.2020-11-25T22-36-25Z') }} + ome_training_scripts_release: "{{ ome_training_scripts_release_override | default('0.2.0') }}" + omero_webtagging_autotag_release: "{{ omero_webtagging_autotag_release_override | default('3.2.0') }}" + omero_webtagging_tagsearch_release: "{{ omero_webtagging_tagsearch_release_override | default('3.2.0') }}" + omero_cli_duplicate_release: "{{ omero_cli_duplicate_release_override | default('0.4.0') }}" + omero_metadata_release: "{{ omero_metadata_release_overrride | default('0.8.0') }}" + omero_cli_render_release: "{{ omero_cli_render_release_override | default('0.7.0') }}" + os_system_users_password: "{{ os_system_users_password_override | default('ome') }}" + apache_docker_release: "{{ apache_docker_release_override | default('0.6.0') }}" + omero_ms_zarr_release: "{{ omero_ms_zarr_release_override | default('latest') }}" + minio_docker_release: "{{ minio_docker_release_override | default('RELEASE.2020-11-25T22-36-25Z') }}" ldap_password: "{{ ldap_password_override | default ('secret') }}" omero_server_config_set: - # omero.fs.importUsers: "fm1" + #omero.fs.importUsers: "fm1" omero.certificates.owner: "/C=UK/ST=Scotland/L=Dundee/O=OME" omero.client.icetransports: ssl,wss,tcp omero.fs.watchDir: "/home/DropBox" @@ -539,8 +487,7 @@ omero.glacier2.IceSSL.CertFile: server.p12 # This password doesn't need to be secret omero.glacier2.IceSSL.Password: secret - omero.fs.repo.path: >- - %user%_%userId%/%thread%//%year%-%month%/%day%/%time% + omero.fs.repo.path: "%user%_%userId%/%thread%//%year%-%month%/%day%/%time%" omero.ldap.config: "true" omero.ldap.urls: "ldap://localhost:10389" omero.ldap.base: "dc=openmicroscopy,dc=org" @@ -551,16 +498,11 @@ omero.ldap.password: "{{ ldap_password }}" omero.ldap.sync_on_login: "true" omero.ldap.user_filter: "(objectClass=person)" - omero.ldap.user_mapping: >- - omeName=uid,firstName=givenName,lastName=sn,email=mail + omero.ldap.user_mapping: "omeName=uid,firstName=givenName,lastName=sn,email=mail" omero.ldap.username: "uid=admin,ou=system" - omero.server.nodedescriptors: >- - master:Blitz-0,Indexer-0,Processor-0,Storm,Tables-0 + omero.server.nodedescriptors: "master:Blitz-0,Indexer-0,Processor-0,Storm,Tables-0" external_nic: "{{ ansible_default_ipv4.interface }}" -- name: Import letsencrypt - import_playbook: letsencrypt.yml - -- name: Import idr data - import_playbook: idr_data.yml +- include: letsencrypt.yml +- include: idr_data.yml From ee12402c8db293fd24eb7de76b9d3bb20c0b6abf Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 14 Jun 2023 17:13:02 +0100 Subject: [PATCH 123/142] Further fixes of training playbook --- omero/training-server/playbook.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/omero/training-server/playbook.yml b/omero/training-server/playbook.yml index 40d7cf8d..622fb50a 100644 --- a/omero/training-server/playbook.yml +++ b/omero/training-server/playbook.yml @@ -108,13 +108,13 @@ omero_web_config_set: omero.web.apps: - - "omero_iviewer" - - "omero_figure" - - "omero_fpbioimage" - - "omero_webtagging_autotag" - - "omero_webtagging_tagsearch" - - "omero_parade" - - "omero_mapr" + - "omero_iviewer" + - "omero_figure" + - "omero_fpbioimage" + - "omero_webtagging_autotag" + - "omero_webtagging_tagsearch" + - "omero_parade" + - "omero_mapr" omero.web.ui.center_plugins: - ["Auto Tag", "omero_webtagging_autotag/auto_tag_init.js.html", "auto_tag_panel"] - ["Parade", "omero_parade/init.js.html", "omero_parade"] @@ -504,5 +504,8 @@ external_nic: "{{ ansible_default_ipv4.interface }}" -- include: letsencrypt.yml -- include: idr_data.yml +- name: Import letsencrypt + import_playbook: letsencrypt.yml + +- name: Import idr data + import_playbook: idr_data.yml From f318046010c8d2c4cb95b9fbe38af1ee73fc7959 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 14 Jun 2023 17:45:06 +0100 Subject: [PATCH 124/142] Fix Reload nginx capitalization --- omero/training-server/letsencrypt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/training-server/letsencrypt.yml b/omero/training-server/letsencrypt.yml index ca24dd82..1c98cc65 100644 --- a/omero/training-server/letsencrypt.yml +++ b/omero/training-server/letsencrypt.yml @@ -56,7 +56,7 @@ dest: /etc/nginx/conf.d-nested-includes/https.conf mode: 0644 notify: - - reload nginx + - Reload nginx handlers: - name: Reload nginx From c9a7d073c74b7373330233b7c1aed8f5db888527 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Wed, 14 Jun 2023 18:23:45 +0100 Subject: [PATCH 125/142] Try to fix jmespath error --- .github/workflows/molecule.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 443eac50..a422025a 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -36,5 +36,6 @@ jobs: pip install "ansible<8" "ansible-lint<6.13" flake8 pip install "molecule<5" "ansible-compat<4" pip install molecule-plugins[docker] pytest-testinfra + pip3.8 install jmespath - name: Run molecule run: molecule test -s "${{ matrix.scenario }}" From 60682df9da31b33e66c13cf6f548f32f3d0b807a Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 30 Jun 2023 12:11:42 +0100 Subject: [PATCH 126/142] Reject all changes in letsencrypt.yml to fix the error found in training --- omero/training-server/letsencrypt.yml | 55 ++++++++++++--------------- 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/omero/training-server/letsencrypt.yml b/omero/training-server/letsencrypt.yml index 1c98cc65..c9893927 100644 --- a/omero/training-server/letsencrypt.yml +++ b/omero/training-server/letsencrypt.yml @@ -1,16 +1,15 @@ # Additional Nginx configuration including Let's Encrypt # Should be run when less than 30 days remain on the certificate -- name: Letsencrypt playbook - hosts: ome-outreach +- hosts: ome-outreach pre_tasks: - - name: Letsencrypt challenge directory - become: true - ansible.builtin.file: + - name: letsencrypt challenge directory + become: yes + file: path: /srv/www/letsencrypt/.well-known/ - recurse: true + recurse: yes state: directory mode: 0755 @@ -19,8 +18,7 @@ # Assume Nginx is already installed # - role: ome.nginx - # If we're not using letsencrypt assume this is CI - # so use a self-signed cert + # If we're not using letsencrypt assume this is CI so use a self-signed cert - role: ome.ssl_certificate when: not (https_letsencrypt_enabled | default(False)) @@ -28,8 +26,8 @@ # This will stop nginx when the certificate is first created # For renewals we configure Nginx to serve the challenge - role: ome.certbot - become: true - certbot_create_if_missing: true + become: yes + certbot_create_if_missing: yes certbot_admin_email: "{{ letsencrypt_email }}" certbot_domains: - "{{ https_certificate_domain }}" @@ -39,39 +37,36 @@ - systemctl reload nginx certbot_auto_renew_args: --webroot --webroot-path /srv/www/letsencrypt/ # May be useful for testing: - # certbot_create_args: --test-cert - # certbot_auto_renew_args: --test-cert --force-renewal - # --webroot --webroot-path /srv/www/letsencrypt/ + #certbot_create_args: --test-cert + #certbot_auto_renew_args: --test-cert --force-renewal --webroot --webroot-path /srv/www/letsencrypt/ # WARNING: If you have a test certificate and need to convert it to a # real certificate you may need to run - # rm -rf /etc/letsencrypt/* + # rm -rf /etc/letsencrypt/* when: https_letsencrypt_enabled | default(False) tasks: - - name: Letsencrypt nginx configuration - become: true - ansible.builtin.template: - src: templates/nginx-letsencrypt-conf.j2 - dest: /etc/nginx/conf.d-nested-includes/https.conf - mode: 0644 - notify: - - Reload nginx + - name: letsencrypt nginx configuration + become: yes + template: + src: templates/nginx-letsencrypt-conf.j2 + dest: /etc/nginx/conf.d-nested-includes/https.conf + mode: 0644 + notify: + - reload nginx handlers: - - name: Reload nginx - become: true - ansible.builtin.service: - name: nginx - state: reloaded + - name: reload nginx + become: yes + service: + name: nginx + state: reloaded vars: # Must be defined somewhere # https_certificate_domain: letsencrypt_email: sysadmin@openmicroscopy.org # This must match the expectations of certbot, do not change this: - https_letsencrypt_cert_path: >- - /etc/letsencrypt/live/{{ https_certificate_domain - | default('localhost') }} + https_letsencrypt_cert_path: "/etc/letsencrypt/live/{{ https_certificate_domain | default('localhost') }}" # In production set this to True: # https_letsencrypt_enabled: From 9c42aeec83c3ad66aae5fef95b230af4d9d68b48 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 30 Jun 2023 16:33:19 +0100 Subject: [PATCH 127/142] Remove community... from lvol to make playbook work --- omero/ome-demoserver.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index 6d5f7be7..6392dc69 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -21,7 +21,7 @@ - name: Resize root FS without altering mount options tags: lvm become: true - community.general.system.lvol: + lvol: lv: root vg: VolGroup00 size: "{{ provision_root_lvsize }}" From c4cccb120f2b95c801851ad6358651c9fb2f5a9a Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Fri, 30 Jun 2023 16:47:09 +0100 Subject: [PATCH 128/142] Do not use ansible.builtin.template --- omero/nightshade-webclients.yml | 4 ++-- omero/ome-demoserver.yml | 12 ++++++------ omero/ome-dundeeomero.yml | 2 +- www/www-static.yml | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/omero/nightshade-webclients.yml b/omero/nightshade-webclients.yml index 98733452..7df479ef 100644 --- a/omero/nightshade-webclients.yml +++ b/omero/nightshade-webclients.yml @@ -82,7 +82,7 @@ - name: NGINX - SSL Configuration become: true - ansible.builtin.template: + template: src: templates/nginx-confdnestedincludes-ssl-conf.j2 dest: /etc/nginx/conf.d-nested-includes/ssl.conf mode: 0644 @@ -91,7 +91,7 @@ - name: NGINX - Custom Paper Redirect become: true - ansible.builtin.template: + template: src: templates/nginx-confdnestedincludes-ns-pub-redirects-conf.j2 dest: /etc/nginx/conf.d-nested-includes/ns-pub-redirects.conf mode: 0644 diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index 6392dc69..fb555c5a 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -195,7 +195,7 @@ - name: NGINX - SSL Configuration become: true - ansible.builtin.template: + template: src: templates/nginx-confdnestedincludes-ssl-conf.j2 dest: /etc/nginx/conf.d-nested-includes/ssl.conf mode: 0644 @@ -204,7 +204,7 @@ - name: NGINX - OMERO websockets become: true - ansible.builtin.template: + template: src: templates/nginx-confdnestedincludes-omerows-conf.j2 dest: /etc/nginx/conf.d-nested-includes/omerows.conf mode: 0644 @@ -213,7 +213,7 @@ - name: NGINX - websocket proxy support become: true - ansible.builtin.template: + template: src: templates/nginx-confd-websockets-conf.j2 dest: /etc/nginx/conf.d/websockets.conf mode: 0644 @@ -222,7 +222,7 @@ - name: Config for OMERO.web plugins become: true - ansible.builtin.template: + template: src: templates/omero-web-config-for-webapps.j2 dest: >- {{ omero_web_basedir }}/config/omero-web-config-for-webapps.omero @@ -234,7 +234,7 @@ - name: OMERO.web config for CORS become: true - ansible.builtin.template: + template: src: templates/omero-web-config-for-cors.j2 dest: "{{ omero_web_basedir }}/config/omero-web-config-for-cors.omero" owner: "root" @@ -245,7 +245,7 @@ - name: OMERO.web config for signup app become: true - ansible.builtin.template: + template: src: templates/omero-web-config-signup.j2 dest: "{{ omero_web_basedir }}/config/omero-web-config-signup.omero" # Contains sensitive info diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index 1c8ef537..cc66ac66 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -159,7 +159,7 @@ # post 2.3 'destfile' should be renamed 'path' - name: NGINX - Configuration become: true - ansible.builtin.template: + template: src: nginx-omero.conf.j2 dest: /etc/nginx/conf.d/omero-web.conf mode: 0644 diff --git a/www/www-static.yml b/www/www-static.yml index 786c09c6..f3c511c3 100644 --- a/www/www-static.yml +++ b/www/www-static.yml @@ -38,7 +38,7 @@ tasks: - name: Install deployment script become: true - ansible.builtin.template: + template: src: files/deploy dest: /usr/local/bin/deploy mode: 0555 From f0500f18eabecc4a71a4253b4fba9f08f6b84da8 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 13 Jul 2023 15:59:00 +0100 Subject: [PATCH 129/142] Revert ansible.builtin.command to command --- omero/ome-demoserver.yml | 6 +++--- omero/training-server/maintenance/omero-restoredb.yml | 4 ++-- www/playbook.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/omero/ome-demoserver.yml b/omero/ome-demoserver.yml index fb555c5a..066773fa 100644 --- a/omero/ome-demoserver.yml +++ b/omero/ome-demoserver.yml @@ -265,7 +265,7 @@ - name: Check_MK postgres plugin | activate the plugin tags: monitoring become: true - ansible.builtin.command: > + command: > cp "{{ check_mk_agent_plugin_path }}/mk_postgres" /usr/share/check-mk-agent/plugins/ creates=/usr/share/check-mk-agent/plugins/mk_postgres @@ -280,7 +280,7 @@ - name: Check_MK logwatch plugin | activate the plugin tags: monitoring become: true - ansible.builtin.command: > + command: > cp "{{ check_mk_agent_plugin_path }}/mk_logwatch" /usr/share/check-mk-agent/plugins/ creates=/usr/share/check-mk-agent/plugins/mk_logwatch @@ -295,7 +295,7 @@ - name: Check_MK logwatch plugin | copy the default config tags: monitoring become: true - ansible.builtin.command: > + command: > cp "{{ check_mk_agent_config_example_path }}/logwatch.cfg" "{{ check_mk_agent_config_path }}/logwatch.cfg" creates="{{ check_mk_agent_config_path }}/logwatch.cfg" diff --git a/omero/training-server/maintenance/omero-restoredb.yml b/omero/training-server/maintenance/omero-restoredb.yml index 88483390..0c7c914c 100644 --- a/omero/training-server/maintenance/omero-restoredb.yml +++ b/omero/training-server/maintenance/omero-restoredb.yml @@ -59,13 +59,13 @@ - name: Restore OMERO database become: true become_user: postgres - ansible.builtin.command: >- + command: >- pg_restore --clean -d omero "/tmp/{{ omero_restore_db_dump_file | basename }}" - name: Upgrade OMERO database become: omero-server - ansible.builtin.command: >- + command: >- /opt/omero/omego/bin/omego db upgrade --serverdir /opt/omero/server/OMERO.server diff --git a/www/playbook.yml b/www/playbook.yml index 8d0affa1..fd2c963c 100644 --- a/www/playbook.yml +++ b/www/playbook.yml @@ -81,7 +81,7 @@ - name: Check_MK logwatch plugin | activate the plugin tags: monitoring become: true - ansible.builtin.command: >- + command: >- cp "{{ check_mk_agent_plugin_path }}/mk_logwatch" /usr/share/check-mk-agent/plugins/ creates=/usr/share/check-mk-agent/plugins/mk_logwatch @@ -96,7 +96,7 @@ - name: Check_MK logwatch plugin | copy the default config tags: monitoring become: true - ansible.builtin.command: >- + command: >- cp "{{ check_mk_agent_config_example_path }}/logwatch.cfg" "{{ check_mk_agent_config_path }}/logwatch.cfg" creates="{{ check_mk_agent_config_path }}/logwatch.cfg" From 8e132a5e5a9c65c7be34acc37ff31976ea449439 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 13 Jul 2023 16:24:32 +0100 Subject: [PATCH 130/142] Fix 2 typos in learning playbook --- omero/learning.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/omero/learning.yml b/omero/learning.yml index 94a1bb2c..c465643c 100644 --- a/omero/learning.yml +++ b/omero/learning.yml @@ -121,7 +121,7 @@ - - "omero_iviewer" - "omero_iviewer_index" - supported_objects: ["images", "dataset", "well"] - script_url": "omero_iviewer/openwith.js" + script_url: "omero_iviewer/openwith.js" label: "OMERO.iviewer" omero.web.viewer.view: omero_iviewer.views.index omero.web.public.enabled: true @@ -166,7 +166,7 @@ - name: TLS certificate is installed for JVM become: true - community.general.system.java_cert: + java_cert: cert_url: "{{ ldap_host }}" cert_port: 636 keystore_path: "/etc/pki/java/cacerts" From cdb7d885aa71e9cc867a8d91af08002216399f1f Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 13 Jul 2023 16:32:31 +0100 Subject: [PATCH 131/142] Reject ansible.builtin.copy in learning playbook --- omero/learning.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/learning.yml b/omero/learning.yml index c465643c..a5f268b6 100644 --- a/omero/learning.yml +++ b/omero/learning.yml @@ -176,7 +176,7 @@ - name: OMERO.web configuration is installed become: true - ansible.builtin.copy: + copy: src: "files/learning-omero-web.conf" dest: "/etc/nginx/conf.d/omero-web.conf" notify: restart nginx From dbf9ad0ba0d66203ba5f71218bba32f9dd2d9db7 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 13 Jul 2023 16:39:47 +0100 Subject: [PATCH 132/142] Revert community...lvol to lvol in dundeeomero --- omero/ome-dundeeomero.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/ome-dundeeomero.yml b/omero/ome-dundeeomero.yml index cc66ac66..65893b43 100644 --- a/omero/ome-dundeeomero.yml +++ b/omero/ome-dundeeomero.yml @@ -19,7 +19,7 @@ - name: Resize root FS without altering mount options tags: lvm become: true - community.general.system.lvol: + lvol: lv: root vg: rhel size: "{{ provision_root_lvsize }}" From df2391abe7eec7ac46f4c3b72eebeb53281f19ad Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 13 Jul 2023 16:54:34 +0100 Subject: [PATCH 133/142] Reject community.general.system.lvol for lvol --- www/playbook.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/playbook.yml b/www/playbook.yml index fd2c963c..1069bf6e 100644 --- a/www/playbook.yml +++ b/www/playbook.yml @@ -22,7 +22,7 @@ - name: Storage | Resize root LV tags: lvm become: true - community.general.system.lvol: + lvol: lv: root vg: "{{ lvm_vgname }}" size: "{{ provision_root_lvsize }}" @@ -40,7 +40,7 @@ - name: Storage | Resize var_log LV tags: lvm become: true - community.general.system.lvol: + lvol: lv: var_log vg: "{{ lvm_vgname }}" size: "{{ provision_varlog_lvsize }}" From c859f3ebb316ee68f2c5d0660d300164765be6c7 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Thu, 13 Jul 2023 17:19:42 +0100 Subject: [PATCH 134/142] Reject some linting changes in www playbook --- www/playbook.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/www/playbook.yml b/www/playbook.yml index 1069bf6e..8c8fb53b 100644 --- a/www/playbook.yml +++ b/www/playbook.yml @@ -19,7 +19,7 @@ # but that role # will change the device name to symlinks rather than # existing device ID. - - name: Storage | Resize root LV + - name: storage | Resize root LV tags: lvm become: true lvol: @@ -29,15 +29,15 @@ shrink: false # Grow the filesystem to fill the LV - - name: Storage | Resize root FS + - name: storage | Resize root FS tags: lvm become: true - community.general.system.filesystem: + filesystem: fstype: "{{ filesystem }}" dev: /dev/mapper/{{ lvm_vgname }}-root resizefs: true - - name: Storage | Resize var_log LV + - name: storage | Resize var_log LV tags: lvm become: true lvol: @@ -47,10 +47,10 @@ shrink: false # Grow the filesystem to fill the LV - - name: Storage | Resize var_log FS + - name: storage | Resize var_log FS tags: lvm become: true - community.general.system.filesystem: + filesystem: fstype: "{{ filesystem }}" dev: /dev/mapper/{{ lvm_vgname }}-var_log resizefs: true From c33f468d8d31f5bc81caef5010e12fb638e51746 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Mon, 17 Jul 2023 15:54:03 +0100 Subject: [PATCH 135/142] Reject ansible.builtin.set_fact to make playbook work --- molecule/docker-prod/converge.yml | 2 +- release/release-acceptance.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/molecule/docker-prod/converge.yml b/molecule/docker-prod/converge.yml index 1473ee9c..775d3456 100644 --- a/molecule/docker-prod/converge.yml +++ b/molecule/docker-prod/converge.yml @@ -12,7 +12,7 @@ - skip_ansible_lint - name: Set address of postgres for redmine - ansible.builtin.set_fact: + set_fact: redmine_tracker_db_host: "{{ hostname_ip.stdout }}" - name: Import-playbook diff --git a/release/release-acceptance.yml b/release/release-acceptance.yml index 05487633..51c579ea 100644 --- a/release/release-acceptance.yml +++ b/release/release-acceptance.yml @@ -21,11 +21,11 @@ when: item.stat is not defined or not item.stat.exists - name: Check pre-release - ansible.builtin.set_fact: + set_fact: prerelease: "{{ '-' in version }}" - name: Define minor and major versions - ansible.builtin.set_fact: + set_fact: minorversion: "{{ version.split('.')[:2] | join('.') }}" majorversion: "{{ version.split('.')[:1] | join('.') }}" From 5dfe7a90b3dcc8de959df0ba0033c831e3374edd Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Mon, 17 Jul 2023 15:58:41 +0100 Subject: [PATCH 136/142] Reject all ansible.builtin to make playbook work --- release/release-acceptance.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/release/release-acceptance.yml b/release/release-acceptance.yml index 51c579ea..75adaad6 100644 --- a/release/release-acceptance.yml +++ b/release/release-acceptance.yml @@ -4,18 +4,18 @@ become: true tasks: - name: Check mandatory variables are defined - ansible.builtin.fail: + fail: msg: Please pass 'product' and 'version' variables when: product is not defined and version is not defined - name: Check the release component exist - ansible.builtin.stat: + stat: path: "{{ item }}/{{ product }}/{{ version }}/" register: s with_items: "{{ www_folders }}" - name: Check the release component exist - ansible.builtin.fail: + fail: msg: "{{ item }} does not exist" with_items: "{{ s.results }}" when: item.stat is not defined or not item.stat.exists @@ -30,13 +30,13 @@ majorversion: "{{ version.split('.')[:1] | join('.') }}" - name: Remove .htaccess file - ansible.builtin.file: + file: path: "{{ item }}/{{ product }}/{{ version }}/.htaccess" state: absent with_items: "{{ www_folders }}" - name: Make release folders read-only and owned by root - ansible.builtin.file: + file: path: "{{ item }}/{{ product }}/{{ version }}" state: directory owner: root @@ -46,7 +46,7 @@ with_items: "{{ www_folders }}" - name: Create minor version directory - ansible.builtin.file: + file: path: "{{ item }}/{{ product }}/{{ minorversion }}" state: directory mode: 0755 @@ -54,7 +54,7 @@ when: not prerelease - name: Create minor version redirects - ansible.builtin.copy: + copy: dest: "{{ item }}/{{ product }}/{{ minorversion }}/.htaccess" content: "Redirect 301 /{{ product }}/{{ minorversion }} \ /{{ product }}/{{ version }}" @@ -63,7 +63,7 @@ when: not prerelease - name: Create minor version directory - ansible.builtin.file: + file: path: "{{ item }}/{{ product }}/{{ majorversion }}" state: directory mode: 0755 @@ -71,7 +71,7 @@ when: not prerelease - name: Create major version redirects - ansible.builtin.copy: + copy: dest: "{{ item }}/{{ product }}/{{ majorversion }}/.htaccess" content: "Redirect 301 /{{ product }}/{{ majorversion }} \ /{{ product }}/{{ version }}" @@ -80,7 +80,7 @@ when: not prerelease - name: Create latest version directory - ansible.builtin.file: + file: path: "{{ item }}/{{ product }}/latest" state: directory mode: 0755 @@ -88,7 +88,7 @@ when: not prerelease - name: Create latest version redirect - ansible.builtin.copy: + copy: dest: "{{ item }}/{{ product }}/latest/.htaccess" content: "Redirect 301 /{{ product }}/latest \ /{{ product }}/{{ version }}" From 9ec6e5300177a58c018008c8eb73bb1baf4d7778 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Mon, 17 Jul 2023 16:48:12 +0100 Subject: [PATCH 137/142] Reject ansible.builtin copy and replace to make playbook work --- omero/sls-gallery.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/omero/sls-gallery.yml b/omero/sls-gallery.yml index 68869bcc..6c817b46 100644 --- a/omero/sls-gallery.yml +++ b/omero/sls-gallery.yml @@ -138,7 +138,7 @@ - name: OMERO.server logs are compressed on rollover become: true - ansible.builtin.replace: + replace: path: "{{ item.path }}" regexp: "(\\\\$\\{om\ ero\\.logfile\\}\\.\\%i)(\\<\\/fileNamePattern\\>)" @@ -148,7 +148,7 @@ - name: OMERO.web configuration is installed become: true - ansible.builtin.copy: + copy: src: "files/sls-gallery-omero-web.conf" dest: "/etc/nginx/conf.d/omero-web.conf" notify: restart nginx From 24d41691e852941baeb19c6b3e876385a22441d9 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Tue, 18 Jul 2023 11:48:50 +0100 Subject: [PATCH 138/142] Reject all ansible.builtin motives to make playbook work --- omero/omero-monitoring-agents.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/omero/omero-monitoring-agents.yml b/omero/omero-monitoring-agents.yml index ddf93bd3..5a513ef5 100644 --- a/omero/omero-monitoring-agents.yml +++ b/omero/omero-monitoring-agents.yml @@ -24,7 +24,7 @@ - name: Omero-server prometheus jmx agents become: true - ansible.builtin.copy: + copy: dest: "{{ omero_common_basedir }}/server/config/prometheus.omero" src: omero-server-config-prometheus.omero mode: 0644 @@ -55,7 +55,7 @@ - name: Nginx selinux allow network connect become: true - ansible.posix.seboolean: + seboolean: name: httpd_can_network_connect state: true persistent: true @@ -63,7 +63,7 @@ - name: Create monitoring htpasswd become: true - ansible.builtin.copy: + copy: content: >- {{ secret_monitoring_nginx_htpasswd | default(monitoring_nginx_htpasswd) }} @@ -75,7 +75,7 @@ # when scraping - name: Create nginx proxy for prometheus exporters become: true - ansible.builtin.copy: + copy: dest: /etc/nginx/conf.d-nested-includes/proxy-exporters.conf src: confd-nested-proxy-exporters.conf mode: 0644 @@ -85,7 +85,7 @@ handlers: - name: restart nginx become: true - ansible.builtin.service: + service: name: nginx state: restarted @@ -100,7 +100,7 @@ tasks: - name: Create nginx proxy for prometheus web exporters become: true - ansible.builtin.copy: + copy: dest: /etc/nginx/conf.d-nested-includes/proxy-exporters-web.conf src: confd-nested-proxy-exporters-web.conf mode: 0644 @@ -110,6 +110,6 @@ handlers: - name: restart nginx become: true - ansible.builtin.service: + service: name: nginx state: restarted From 663a264a75662b397d86c9a09380e707d7376474 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Tue, 18 Jul 2023 11:57:24 +0100 Subject: [PATCH 139/142] Reject reformating to make playbook work --- omero/omero-firewall.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/omero/omero-firewall.yml b/omero/omero-firewall.yml index 07f198d7..2d829768 100644 --- a/omero/omero-firewall.yml +++ b/omero/omero-firewall.yml @@ -63,7 +63,6 @@ -A INPUT -p tcp -m tcp --dport 1191 -s {{ s }} -j ACCEPT {% endfor %} {% if (checkmk_server_source | default('')) %} - -A INPUT -p tcp -m tcp --dport 6556 -s - {{ checkmk_server_source }} -j ACCEPT + -A INPUT -p tcp -m tcp --dport 6556 -s {{ checkmk_server_source }} -j ACCEPT {% endif %} state: present From 13b7166b92632985fca73fcc7a7109b3f4210549 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Tue, 18 Jul 2023 12:43:22 +0100 Subject: [PATCH 140/142] Reject all changes in postgres/ome-pg-prod.yml as playbook is failing --- postgres/ome-pg-prod.yml | 53 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/postgres/ome-pg-prod.yml b/postgres/ome-pg-prod.yml index ae6f095e..be1e9109 100644 --- a/postgres/ome-pg-prod.yml +++ b/postgres/ome-pg-prod.yml @@ -1,32 +1,31 @@ --- -- name: Ome pg production - hosts: ome-pg-prod1.openmicroscopy.org +- hosts: ome-pg-prod1.openmicroscopy.org roles: - - role: ome.postgresql - postgresql_version: "9.6" - postgresql_server_listen: "'*'" - postgresql_databases: - - name: idr-redmine - owner: idr-redmine - restrict: true - postgresql_users: - - user: idr-redmine - password: "{{ idr_redmine_postgres_password | default('idr-redmine') }}" - databases: - - idr-redmine - postgresql_server_auth: - - database: idr-redmine - user: idr-redmine - address: "{{ idr_redmine_postgres_auth_ip | default('0.0.0.0/0') }}" - - database: idr-redmine - user: idr-redmine - address: "{{ idr_redmine_postgres_auth_ip2 | default('0.0.0.0/0') }}" + - role: ome.postgresql + postgresql_version: "9.6" + postgresql_server_listen: "'*'" + postgresql_databases: + - name: idr-redmine + owner: idr-redmine + restrict: True + postgresql_users: + - user: idr-redmine + password: "{{ idr_redmine_postgres_password | default('idr-redmine') }}" + databases: + - idr-redmine + postgresql_server_auth: + - database: idr-redmine + user: idr-redmine + address: "{{ idr_redmine_postgres_auth_ip | default('0.0.0.0/0') }}" + - database: idr-redmine + user: idr-redmine + address: "{{ idr_redmine_postgres_auth_ip2 | default('0.0.0.0/0') }}" - - role: ome.nfs_mount - # Parameters for this role are internal + - role: ome.nfs_mount + # Parameters for this role are internal - - role: ome.postgresql_backup - postgresql_backup_dir: /mnt/backups/ - postgresql_backup_filename_format: "{{ ansible_hostname }}-%a.pgdump" - postgresql_backup_minimum_expected_size: 100000 + - role: ome.postgresql_backup + postgresql_backup_dir: /mnt/backups/ + postgresql_backup_filename_format: "{{ ansible_hostname }}-%a.pgdump" + postgresql_backup_minimum_expected_size: 100000 From 22363f627ad0f1c8a6a618264a2e60947a207849 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Tue, 18 Jul 2023 14:34:43 +0100 Subject: [PATCH 141/142] Reject one ansible.builtin to make playbook work --- omero/training-server/maintenance/omero-restoredb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/training-server/maintenance/omero-restoredb.yml b/omero/training-server/maintenance/omero-restoredb.yml index 0c7c914c..c76da892 100644 --- a/omero/training-server/maintenance/omero-restoredb.yml +++ b/omero/training-server/maintenance/omero-restoredb.yml @@ -33,7 +33,7 @@ # This may take a long time with no output - name: Copy files # Don't become root, this should ensure ssh forwarding works - ansible.posix.synchronize: + synchronize: src: "{{ item }}" dest: "/tmp/{{ item | basename }}" partial: true From a88e6696f53dfdf24c44ba1809e2c71431f5f174 Mon Sep 17 00:00:00 2001 From: pwalczysko Date: Tue, 18 Jul 2023 15:30:22 +0100 Subject: [PATCH 142/142] Reject all changes in restoredb playbook --- .../maintenance/omero-restoredb.yml | 103 +++++++++--------- 1 file changed, 50 insertions(+), 53 deletions(-) diff --git a/omero/training-server/maintenance/omero-restoredb.yml b/omero/training-server/maintenance/omero-restoredb.yml index c76da892..4455f3fa 100644 --- a/omero/training-server/maintenance/omero-restoredb.yml +++ b/omero/training-server/maintenance/omero-restoredb.yml @@ -11,74 +11,71 @@ # Required runtime variables: # - omero_restore_host: The target training server -# - omero_restore_data_host: The file server -# containing the archived repository +# - omero_restore_data_host: The file server containing the archived repository # E.g. # ansible-playbook omero-restoredb.yml --step # -e omero_restore_host=ome-training-1.openmicroscopy.org # -e omero_restore_data_host=example.openmicroscopy.org -- name: Restore DB - hosts: "{{ omero_restore_host | default('localhost') }}" + +- hosts: "{{ omero_restore_host }}" vars: - omero_restore_data_dump_file: "/uod/idr/repos/outreach/outreach\ - -omero-20190710/outreach-OMERO-20190710-1550.tar" - omero_restore_db_dump_file: "/uod/idr/repos/outreach/outreach-omero\ - -20190710/omero-database-omero-20190710-154903-139204.pgdump" + omero_restore_data_dump_file: /uod/idr/repos/outreach/outreach-omero-20190710/outreach-OMERO-20190710-1550.tar + omero_restore_db_dump_file: /uod/idr/repos/outreach/outreach-omero-20190710/omero-database-omero-20190710-154903-139204.pgdump tasks: # This may take a long time with no output - - name: Copy files - # Don't become root, this should ensure ssh forwarding works - synchronize: - src: "{{ item }}" - dest: "/tmp/{{ item | basename }}" - partial: true - delegate_to: "{{ omero_restore_data_host }}" - with_items: - - "{{ omero_restore_data_dump_file }}" - - "{{ omero_restore_db_dump_file }}" + - name: Copy files + # Don't become root, this should ensure ssh forwarding works + synchronize: + src: "{{ item }}" + dest: "/tmp/{{ item | basename }}" + partial: true + delegate_to: "{{ omero_restore_data_host }}" + with_items: + - "{{ omero_restore_data_dump_file }}" + - "{{ omero_restore_db_dump_file }}" - - name: Stop OMERO.server - become: true - ansible.builtin.service: - name: omero-server - state: stopped + - name: Stop OMERO.server + become: true + service: + name: omero-server + state: stopped - # Assumes the owner and group information in the archive is correct - - name: Restore OMERO data directory - become: true - ansible.builtin.unarchive: - src: "/tmp/{{ omero_restore_data_dump_file | basename }}" - dest: / - remote_src: true + # Assumes the owner and group information in the archive is correct + - name: Restore OMERO data directory + become: true + unarchive: + src: "/tmp/{{ omero_restore_data_dump_file | basename }}" + dest: / + remote_src: true - - name: Restore OMERO database - become: true - become_user: postgres - command: >- - pg_restore --clean -d omero - "/tmp/{{ omero_restore_db_dump_file | basename }}" + - name: Restore OMERO database + become: true + become_user: postgres + command: >- + pg_restore --clean -d omero + "/tmp/{{ omero_restore_db_dump_file | basename }}" - - name: Upgrade OMERO database - become: omero-server - command: >- - /opt/omero/omego/bin/omego db upgrade - --serverdir /opt/omero/server/OMERO.server + - name: Upgrade OMERO database + become: omero-server + command: >- + /opt/omero/omego/bin/omego db upgrade + --serverdir /opt/omero/server/OMERO.server - - name: Start OMERO.server - become: true - ansible.builtin.service: - name: omero-server - state: started + - name: Start OMERO.server + become: true + service: + name: omero-server + state: started - - name: Delete temporary files - ansible.builtin.file: - path: "/tmp/{{ item | basename }}" - state: absent - with_items: - - "{{ omero_restore_data_dump_file }}" - - "{{ omero_restore_db_dump_file }}" + - name: Delete temporary files + file: + path: "/tmp/{{ item | basename }}" + state: absent + with_items: + - "{{ omero_restore_data_dump_file }}" + - "{{ omero_restore_db_dump_file }}"