From cbfcbbfa16543e4a65b0bb0acc19d6ef432df3eb Mon Sep 17 00:00:00 2001 From: Robin Gierse <93658105+robin-checkmk@users.noreply.github.com> Date: Mon, 11 Nov 2024 15:38:44 +0100 Subject: [PATCH] Rebuild tests using Checkmk containers (#624) We use the GitHub Actions services: keyword, to start native Checkmk containers to run our tests against. --- .../workflows/ans-int-test-activation.yaml | 42 ++++++++++++++++++- .github/workflows/ans-int-test-bakery.yaml | 35 +++++++++++++++- .../workflows/ans-int-test-contact_group.yaml | 42 ++++++++++++++++++- .github/workflows/ans-int-test-discovery.yaml | 42 ++++++++++++++++++- .github/workflows/ans-int-test-downtime.yaml | 42 ++++++++++++++++++- .github/workflows/ans-int-test-folder.yaml | 42 ++++++++++++++++++- .github/workflows/ans-int-test-host.yaml | 42 ++++++++++++++++++- .../workflows/ans-int-test-host_group.yaml | 42 ++++++++++++++++++- .../workflows/ans-int-test-lkp-bakery.yaml | 35 +++++++++++++++- .../workflows/ans-int-test-lkp-folder.yaml | 42 ++++++++++++++++++- .../workflows/ans-int-test-lkp-folders.yaml | 42 ++++++++++++++++++- .github/workflows/ans-int-test-lkp-host.yaml | 42 ++++++++++++++++++- .github/workflows/ans-int-test-lkp-hosts.yaml | 42 ++++++++++++++++++- .github/workflows/ans-int-test-lkp-rules.yaml | 42 ++++++++++++++++++- .../workflows/ans-int-test-lkp-rulesets.yaml | 42 ++++++++++++++++++- .github/workflows/ans-int-test-lkp-site.yaml | 37 +++++++++++++++- .github/workflows/ans-int-test-lkp-sites.yaml | 37 +++++++++++++++- .../workflows/ans-int-test-lkp-version.yaml | 42 ++++++++++++++++++- .github/workflows/ans-int-test-password.yaml | 42 ++++++++++++++++++- .github/workflows/ans-int-test-rule.yaml | 42 ++++++++++++++++++- .../workflows/ans-int-test-service_group.yaml | 42 ++++++++++++++++++- .github/workflows/ans-int-test-tag_group.yaml | 42 ++++++++++++++++++- .../workflows/ans-int-test-timeperiod.yaml | 42 ++++++++++++++++++- .github/workflows/ans-int-test-user.yaml | 42 ++++++++++++++++++- scripts/release.sh | 4 ++ .../files/includes/vars/global.yml | 2 +- .../targets/activation/tasks/main.yml | 6 +-- .../targets/activation/tasks/test.yml | 10 +++++ .../targets/activation/vars/main.yml | 16 ++++--- .../integration/targets/bakery/tasks/main.yml | 27 ++++++------ .../integration/targets/bakery/tasks/test.yml | 10 +++++ .../integration/targets/bakery/vars/main.yml | 17 ++++---- .../targets/contact_group/tasks/main.yml | 6 +-- .../targets/contact_group/tasks/test.yml | 4 +- .../targets/contact_group/vars/main.yml | 13 +++--- .../targets/discovery/tasks/main.yml | 6 +-- .../targets/discovery/tasks/test.yml | 10 +++++ .../targets/discovery/vars/main.yml | 14 ++++--- .../targets/downtime/tasks/main.yml | 6 +-- .../targets/downtime/tasks/test.yml | 10 +++++ .../targets/downtime/vars/main.yml | 14 ++++--- .../integration/targets/folder/tasks/main.yml | 7 +--- .../integration/targets/folder/tasks/test.yml | 11 +++++ .../integration/targets/folder/vars/main.yml | 14 ++++--- tests/integration/targets/host/tasks/main.yml | 6 +-- tests/integration/targets/host/tasks/test.yml | 10 +++++ tests/integration/targets/host/vars/main.yml | 16 ++++--- .../targets/host_group/tasks/main.yml | 6 +-- .../targets/host_group/tasks/test.yml | 4 +- .../targets/host_group/vars/main.yml | 13 +++--- .../targets/lookup_bakery/tasks/main.yml | 6 +-- .../targets/lookup_bakery/tasks/test.yml | 10 +++++ .../targets/lookup_bakery/vars/main.yml | 17 ++++---- .../targets/lookup_folder/tasks/main.yml | 6 +-- .../targets/lookup_folder/tasks/test.yml | 10 +++++ .../targets/lookup_folder/vars/main.yml | 14 ++++--- .../targets/lookup_folders/tasks/main.yml | 6 +-- .../targets/lookup_folders/tasks/test.yml | 10 +++++ .../targets/lookup_folders/vars/main.yml | 14 ++++--- .../targets/lookup_host/tasks/main.yml | 6 +-- .../targets/lookup_host/tasks/test.yml | 10 +++++ .../targets/lookup_host/vars/main.yml | 14 ++++--- .../targets/lookup_hosts/tasks/main.yml | 6 +-- .../targets/lookup_hosts/tasks/test.yml | 10 +++++ .../targets/lookup_hosts/vars/main.yml | 14 ++++--- .../targets/lookup_rules/tasks/main.yml | 6 +-- .../targets/lookup_rules/tasks/test.yml | 10 +++++ .../targets/lookup_rules/vars/main.yml | 14 ++++--- .../targets/lookup_rulesets/tasks/main.yml | 6 +-- .../targets/lookup_rulesets/tasks/test.yml | 10 +++++ .../targets/lookup_rulesets/vars/main.yml | 14 ++++--- .../targets/lookup_site/tasks/main.yml | 6 +-- .../targets/lookup_site/vars/main.yml | 7 +++- .../targets/lookup_sites/tasks/main.yml | 6 +-- .../targets/lookup_sites/tasks/test.yml | 36 ++++++++-------- .../targets/lookup_sites/vars/main.yml | 7 +++- .../targets/lookup_version/tasks/main.yml | 6 +-- .../targets/lookup_version/tasks/test.yml | 10 +++++ .../targets/lookup_version/vars/main.yml | 14 ++++--- .../targets/password/tasks/main.yml | 6 +-- .../targets/password/tasks/test.yml | 4 +- .../targets/password/vars/main.yml | 13 +++--- tests/integration/targets/rule/tasks/main.yml | 6 +-- tests/integration/targets/rule/tasks/test.yml | 10 +++++ tests/integration/targets/rule/vars/main.yml | 14 ++++--- .../targets/service_group/tasks/main.yml | 6 +-- .../targets/service_group/tasks/test.yml | 4 +- .../targets/service_group/vars/main.yml | 13 +++--- .../targets/tag_group/tasks/main.yml | 6 +-- .../targets/tag_group/vars/main.yml | 13 +++--- .../targets/timeperiod/tasks/main.yml | 6 +-- .../targets/timeperiod/tasks/test.yml | 10 +++++ .../targets/timeperiod/vars/main.yml | 14 ++++--- tests/integration/targets/user/tasks/main.yml | 6 +-- tests/integration/targets/user/tasks/test.yml | 2 +- tests/integration/targets/user/vars/main.yml | 13 +++--- 96 files changed, 1366 insertions(+), 331 deletions(-) diff --git a/.github/workflows/ans-int-test-activation.yaml b/.github/workflows/ans-int-test-activation.yaml index ea58c6ee2..3fa07d87b 100644 --- a/.github/workflows/ans-int-test-activation.yaml +++ b/.github/workflows/ans-int-test-activation.yaml @@ -53,6 +53,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -63,7 +101,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -75,5 +113,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-bakery.yaml b/.github/workflows/ans-int-test-bakery.yaml index bbf84d097..290e71293 100644 --- a/.github/workflows/ans-int-test-bakery.yaml +++ b/.github/workflows/ans-int-test-bakery.yaml @@ -52,6 +52,37 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cfe: + image: checkmk/check-mk-free:2.1.0p48 + ports: + - 5421:5000 + env: + CMK_SITE_ID: "ancient_cfe" + CMK_PASSWORD: "Sup3rSec4et!" + old_cce: + image: checkmk/check-mk-cloud:2.2.0p35 + ports: + - 5222:5000 + env: + CMK_SITE_ID: "old_cce" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -62,7 +93,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -74,5 +105,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-contact_group.yaml b/.github/workflows/ans-int-test-contact_group.yaml index d06d94bd1..92b18b3fc 100644 --- a/.github/workflows/ans-int-test-contact_group.yaml +++ b/.github/workflows/ans-int-test-contact_group.yaml @@ -52,6 +52,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -62,7 +100,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -74,5 +112,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-discovery.yaml b/.github/workflows/ans-int-test-discovery.yaml index d14c89704..c96831cb1 100644 --- a/.github/workflows/ans-int-test-discovery.yaml +++ b/.github/workflows/ans-int-test-discovery.yaml @@ -52,6 +52,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -62,7 +100,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -74,5 +112,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-downtime.yaml b/.github/workflows/ans-int-test-downtime.yaml index 1b238390b..49c9f270c 100644 --- a/.github/workflows/ans-int-test-downtime.yaml +++ b/.github/workflows/ans-int-test-downtime.yaml @@ -52,6 +52,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -62,7 +100,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -74,5 +112,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-folder.yaml b/.github/workflows/ans-int-test-folder.yaml index a94e9c164..638c7c8a1 100644 --- a/.github/workflows/ans-int-test-folder.yaml +++ b/.github/workflows/ans-int-test-folder.yaml @@ -52,6 +52,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -62,7 +100,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -74,5 +112,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-host.yaml b/.github/workflows/ans-int-test-host.yaml index c9d136233..0af05300d 100644 --- a/.github/workflows/ans-int-test-host.yaml +++ b/.github/workflows/ans-int-test-host.yaml @@ -52,6 +52,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -62,7 +100,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -74,5 +112,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-host_group.yaml b/.github/workflows/ans-int-test-host_group.yaml index 1f77fe1aa..1952ea560 100644 --- a/.github/workflows/ans-int-test-host_group.yaml +++ b/.github/workflows/ans-int-test-host_group.yaml @@ -52,6 +52,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -62,7 +100,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -74,5 +112,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-lkp-bakery.yaml b/.github/workflows/ans-int-test-lkp-bakery.yaml index e991625cb..5b440019f 100644 --- a/.github/workflows/ans-int-test-lkp-bakery.yaml +++ b/.github/workflows/ans-int-test-lkp-bakery.yaml @@ -52,6 +52,37 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cfe: + image: checkmk/check-mk-free:2.1.0p48 + ports: + - 5421:5000 + env: + CMK_SITE_ID: "ancient_cfe" + CMK_PASSWORD: "Sup3rSec4et!" + old_cce: + image: checkmk/check-mk-cloud:2.2.0p35 + ports: + - 5222:5000 + env: + CMK_SITE_ID: "old_cce" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -62,7 +93,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -74,5 +105,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-lkp-folder.yaml b/.github/workflows/ans-int-test-lkp-folder.yaml index 8c62396bf..bd2ef7037 100644 --- a/.github/workflows/ans-int-test-lkp-folder.yaml +++ b/.github/workflows/ans-int-test-lkp-folder.yaml @@ -50,6 +50,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -60,7 +98,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -72,5 +110,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-lkp-folders.yaml b/.github/workflows/ans-int-test-lkp-folders.yaml index 315f31b35..218a77a80 100644 --- a/.github/workflows/ans-int-test-lkp-folders.yaml +++ b/.github/workflows/ans-int-test-lkp-folders.yaml @@ -50,6 +50,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -60,7 +98,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -72,5 +110,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-lkp-host.yaml b/.github/workflows/ans-int-test-lkp-host.yaml index 3546da5ef..0d50bd13c 100644 --- a/.github/workflows/ans-int-test-lkp-host.yaml +++ b/.github/workflows/ans-int-test-lkp-host.yaml @@ -50,6 +50,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -60,7 +98,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -72,5 +110,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-lkp-hosts.yaml b/.github/workflows/ans-int-test-lkp-hosts.yaml index 7541547a4..0fb58c633 100644 --- a/.github/workflows/ans-int-test-lkp-hosts.yaml +++ b/.github/workflows/ans-int-test-lkp-hosts.yaml @@ -50,6 +50,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -60,7 +98,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -72,5 +110,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-lkp-rules.yaml b/.github/workflows/ans-int-test-lkp-rules.yaml index 02aa4c0ef..34697b8c3 100644 --- a/.github/workflows/ans-int-test-lkp-rules.yaml +++ b/.github/workflows/ans-int-test-lkp-rules.yaml @@ -52,6 +52,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -62,7 +100,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -74,5 +112,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-lkp-rulesets.yaml b/.github/workflows/ans-int-test-lkp-rulesets.yaml index ad0ffd155..6cdcacce3 100644 --- a/.github/workflows/ans-int-test-lkp-rulesets.yaml +++ b/.github/workflows/ans-int-test-lkp-rulesets.yaml @@ -52,6 +52,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -62,7 +100,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -74,5 +112,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-lkp-site.yaml b/.github/workflows/ans-int-test-lkp-site.yaml index c5d2b3bc0..94f3c912b 100644 --- a/.github/workflows/ans-int-test-lkp-site.yaml +++ b/.github/workflows/ans-int-test-lkp-site.yaml @@ -17,6 +17,8 @@ concurrency: name: Ansible Integration Tests for Site Lookup Module on: workflow_dispatch: + schedule: + - cron: '0 0 * * 0' pull_request: branches: - main @@ -50,6 +52,37 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -60,7 +93,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -72,5 +105,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-lkp-sites.yaml b/.github/workflows/ans-int-test-lkp-sites.yaml index 6f3333530..1ad937ab8 100644 --- a/.github/workflows/ans-int-test-lkp-sites.yaml +++ b/.github/workflows/ans-int-test-lkp-sites.yaml @@ -17,6 +17,8 @@ concurrency: name: Ansible Integration Tests for Sites Lookup Module on: workflow_dispatch: + schedule: + - cron: '0 0 * * 0' pull_request: branches: - main @@ -50,6 +52,37 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -60,7 +93,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -72,5 +105,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-lkp-version.yaml b/.github/workflows/ans-int-test-lkp-version.yaml index 88dd4b420..98aed1804 100644 --- a/.github/workflows/ans-int-test-lkp-version.yaml +++ b/.github/workflows/ans-int-test-lkp-version.yaml @@ -52,6 +52,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -62,7 +100,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -74,5 +112,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-password.yaml b/.github/workflows/ans-int-test-password.yaml index 5f8be9b52..8a8b55231 100644 --- a/.github/workflows/ans-int-test-password.yaml +++ b/.github/workflows/ans-int-test-password.yaml @@ -52,6 +52,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -62,7 +100,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -74,5 +112,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-rule.yaml b/.github/workflows/ans-int-test-rule.yaml index 6e415998b..db16f6459 100644 --- a/.github/workflows/ans-int-test-rule.yaml +++ b/.github/workflows/ans-int-test-rule.yaml @@ -52,6 +52,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -62,7 +100,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -74,5 +112,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-service_group.yaml b/.github/workflows/ans-int-test-service_group.yaml index d562830c0..e8aed82b3 100644 --- a/.github/workflows/ans-int-test-service_group.yaml +++ b/.github/workflows/ans-int-test-service_group.yaml @@ -52,6 +52,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -62,7 +100,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -74,5 +112,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-tag_group.yaml b/.github/workflows/ans-int-test-tag_group.yaml index c3ae50f32..a1dd6f661 100644 --- a/.github/workflows/ans-int-test-tag_group.yaml +++ b/.github/workflows/ans-int-test-tag_group.yaml @@ -52,6 +52,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -62,7 +100,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -74,5 +112,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-timeperiod.yaml b/.github/workflows/ans-int-test-timeperiod.yaml index f214e6bc5..941287707 100644 --- a/.github/workflows/ans-int-test-timeperiod.yaml +++ b/.github/workflows/ans-int-test-timeperiod.yaml @@ -52,6 +52,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -62,7 +100,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -74,5 +112,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ans-int-test-user.yaml b/.github/workflows/ans-int-test-user.yaml index c5f1201a1..504eb1834 100644 --- a/.github/workflows/ans-int-test-user.yaml +++ b/.github/workflows/ans-int-test-user.yaml @@ -52,6 +52,44 @@ jobs: # Exclude unsupported sets. - ansible: stable-2.15 python: '3.12' + - ansible: stable-2.16 + python: '3.9' + - ansible: stable-2.17 + python: '3.9' + - ansible: devel + python: '3.9' + - ansible: devel + python: '3.10' + + services: + ancient_cre: + image: checkmk/check-mk-raw:2.1.0p48 + ports: + - 5021:5000 + env: + CMK_SITE_ID: "ancient_cre" + CMK_PASSWORD: "Sup3rSec4et!" + old_cre: + image: checkmk/check-mk-raw:2.2.0p35 + ports: + - 5022:5000 + env: + CMK_SITE_ID: "old_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cre: + image: checkmk/check-mk-raw:2.3.0p19 + ports: + - 5023:5000 + env: + CMK_SITE_ID: "stable_cre" + CMK_PASSWORD: "Sup3rSec4et!" + stable_cme: + image: checkmk/check-mk-managed:2.3.0p19 + ports: + - 5323:5000 + env: + CMK_SITE_ID: "stable_cme" + CMK_PASSWORD: "Sup3rSec4et!" steps: - name: Check out code @@ -62,7 +100,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: ${{ matrix.python }} - name: Install ansible-base (${{ matrix.ansible }}) run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check @@ -74,5 +112,5 @@ jobs: CHECKMK_DOWNLOAD_PW: ${{ secrets.CHECKMK_DOWNLOAD_PW }} - name: Run integration test - run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/scripts/release.sh b/scripts/release.sh index 1b56633f6..5af7a08b5 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -44,6 +44,10 @@ sed -i "s/version: ${source_version}/version: ${target_version}/g" "${collection find "${collection_dir}/tests/integration/targets/" -type f -name main.yml -exec sed -i "s/2.3.0.*/${checkmk_stable}\"/g" {} \; && echo "Updated Checkmk Stable version for integration tests to ${checkmk_stable}." find "${collection_dir}/tests/integration/targets/" -type f -name main.yml -exec sed -i "s/2.2.0.*/${checkmk_oldstable}\"/g" {} \; && echo "Updated Checkmk Oldstable version for integration tests to ${checkmk_oldstable}." find "${collection_dir}/tests/integration/targets/" -type f -name main.yml -exec sed -i "s/2.1.0.*/${checkmk_ancient}\"/g" {} \; && echo "Updated Checkmk Ancient version for integration tests to ${checkmk_ancient}." +## GitHub Workflows +find "${collection_dir}/.github/workflows/" -type f -name "ans-int-test-*.yaml" -exec sed -i "s/2.3.0.*/${checkmk_stable}/g" {} \; && echo "Updated Checkmk Stable version for GitHub Workflows to ${checkmk_stable}." +find "${collection_dir}/.github/workflows/" -type f -name "ans-int-test-*.yaml" -exec sed -i "s/2.2.0.*/${checkmk_oldstable}/g" {} \; && echo "Updated Checkmk Oldstable version for GitHub Workflows to ${checkmk_oldstable}." +find "${collection_dir}/.github/workflows/" -type f -name "ans-int-test-*.yaml" -exec sed -i "s/2.1.0.*/${checkmk_ancient}/g" {} \; && echo "Updated Checkmk Ancient version for GitHub Workflows to ${checkmk_ancient}." ## Molecule tests find "${collection_dir}/roles/" -type f -name all.yml -exec sed -i "s/2.3.0.*/${checkmk_stable}\"/g" {} \; && echo "Updated Checkmk Stable version for molecule tests to ${checkmk_stable}." find "${collection_dir}/roles/" -type f -name all.yml -exec sed -i "s/2.2.0.*/${checkmk_oldstable}\"/g" {} \; && echo "Updated Checkmk Oldstable version for molecule tests to ${checkmk_oldstable}." diff --git a/tests/integration/files/includes/vars/global.yml b/tests/integration/files/includes/vars/global.yml index 98ff3025f..b75106cbb 100644 --- a/tests/integration/files/includes/vars/global.yml +++ b/tests/integration/files/includes/vars/global.yml @@ -1,6 +1,6 @@ --- # Configure location and credentials for the Checkmk REST API -checkmk_var_server_url: "http://127.0.0.1/" +checkmk_var_server_url: "http://127.0.0.1:{{ outer_item.port }}/" checkmk_var_automation_user: "cmkadmin" checkmk_var_automation_secret: "Sup3rSec4et!" diff --git a/tests/integration/targets/activation/tasks/main.yml b/tests/integration/targets/activation/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/activation/tasks/main.yml +++ b/tests/integration/targets/activation/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/activation/tasks/test.yml b/tests/integration/targets/activation/tasks/test.yml index f1895894b..da90ab9e9 100644 --- a/tests/integration/targets/activation/tasks/test.yml +++ b/tests/integration/targets/activation/tasks/test.yml @@ -1,4 +1,14 @@ --- +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: "provider" + when: outer_item.edition == "cme" + +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: null + when: outer_item.edition != "cme" + - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Activate without changes." activation: server_url: "{{ checkmk_var_server_url }}" diff --git a/tests/integration/targets/activation/vars/main.yml b/tests/integration/targets/activation/vars/main.yml index 3b80c5fc4..b18d1f2fe 100644 --- a/tests/integration/targets/activation/vars/main.yml +++ b/tests/integration/targets/activation/vars/main.yml @@ -1,17 +1,21 @@ --- checkmk_var_test_sites: + - version: "2.3.0p19" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" - - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_hosts: - name: test1.tld diff --git a/tests/integration/targets/bakery/tasks/main.yml b/tests/integration/targets/bakery/tasks/main.yml index 5d6229788..95c52106e 100644 --- a/tests/integration/targets/bakery/tasks/main.yml +++ b/tests/integration/targets/bakery/tasks/main.yml @@ -1,23 +1,22 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml - -- name: "Inject a Key into the Sites." # This is a hack and should never be done in production! - ansible.builtin.copy: - src: agent_signature_keys.mk - dest: "/omd/sites/{{ item.site }}/etc/check_mk/multisite.d/wato/agent_signature_keys.mk" - owner: "{{ item.site }}" - group: "{{ item.site }}" - mode: "0660" - loop: "{{ checkmk_var_test_sites }}" - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or item.edition == "cre" +- name: "Inject a Key into the Sites." # noqa no-changed-when + ansible.builtin.shell: | + set -o pipefail + for container in $(docker ps | tail -n +2 | cut -d " " -f 1) + do + for site in $(docker exec $container ls /omd/sites/) + do + docker cp targets/bakery/files/agent_signature_keys.mk $container:/omd/sites/$site/etc/check_mk/multisite.d/wato/agent_signature_keys.mk + done + done + args: + executable: /bin/bash - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/bakery/tasks/test.yml b/tests/integration/targets/bakery/tasks/test.yml index c13049485..170a112ab 100644 --- a/tests/integration/targets/bakery/tasks/test.yml +++ b/tests/integration/targets/bakery/tasks/test.yml @@ -1,4 +1,14 @@ --- +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: "provider" + when: outer_item.edition == "cme" + +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: null + when: outer_item.edition != "cme" + - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Create hosts." host: server_url: "{{ checkmk_var_server_url }}" diff --git a/tests/integration/targets/bakery/vars/main.yml b/tests/integration/targets/bakery/vars/main.yml index b26d82405..70a01e1e1 100644 --- a/tests/integration/targets/bakery/vars/main.yml +++ b/tests/integration/targets/bakery/vars/main.yml @@ -1,14 +1,17 @@ --- checkmk_var_test_sites: - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.2.0p35" - edition: "cee" - site: "old_cee" - # - version: "2.1.0p48" - # edition: "cee" - # site: "ancient_cee" + edition: "cce" + site: "old_cce" + port: "5222" + - version: "2.1.0p48" + edition: "cfe" + site: "ancient_cfe" + port: "5421" checkmk_var_signature_key_id: 1 checkmk_var_signature_key_passphrase: "{{ checkmk_var_automation_secret }}" diff --git a/tests/integration/targets/contact_group/tasks/main.yml b/tests/integration/targets/contact_group/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/contact_group/tasks/main.yml +++ b/tests/integration/targets/contact_group/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/contact_group/tasks/test.yml b/tests/integration/targets/contact_group/tasks/test.yml index 4e5affe76..b6c26a1cb 100644 --- a/tests/integration/targets/contact_group/tasks/test.yml +++ b/tests/integration/targets/contact_group/tasks/test.yml @@ -2,12 +2,12 @@ - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." ansible.builtin.set_fact: checkmk_var_customer: "provider" - when: (outer_item.edition == "cme") or (outer_item.edition == "cce") + when: outer_item.edition == "cme" - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." ansible.builtin.set_fact: checkmk_var_customer: null - when: not ((outer_item.edition == "cme") or (outer_item.edition == "cce")) + when: outer_item.edition != "cme" - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Create contact groups." contact_group: diff --git a/tests/integration/targets/contact_group/vars/main.yml b/tests/integration/targets/contact_group/vars/main.yml index d8b51d588..e771df00b 100644 --- a/tests/integration/targets/contact_group/vars/main.yml +++ b/tests/integration/targets/contact_group/vars/main.yml @@ -3,18 +3,19 @@ checkmk_var_test_sites: - version: "2.3.0p19" edition: "cme" site: "stable_cme" - - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_contact_groups_create: - name: "test1" diff --git a/tests/integration/targets/discovery/tasks/main.yml b/tests/integration/targets/discovery/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/discovery/tasks/main.yml +++ b/tests/integration/targets/discovery/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/discovery/tasks/test.yml b/tests/integration/targets/discovery/tasks/test.yml index 919f1bb5c..02c130815 100644 --- a/tests/integration/targets/discovery/tasks/test.yml +++ b/tests/integration/targets/discovery/tasks/test.yml @@ -1,4 +1,14 @@ --- +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: "provider" + when: outer_item.edition == "cme" + +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: null + when: outer_item.edition != "cme" + - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Create hosts." host: server_url: "{{ checkmk_var_server_url }}" diff --git a/tests/integration/targets/discovery/vars/main.yml b/tests/integration/targets/discovery/vars/main.yml index a867e5788..d37d32581 100644 --- a/tests/integration/targets/discovery/vars/main.yml +++ b/tests/integration/targets/discovery/vars/main.yml @@ -1,17 +1,21 @@ --- checkmk_var_test_sites: - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_hosts: - name: test1.tld diff --git a/tests/integration/targets/downtime/tasks/main.yml b/tests/integration/targets/downtime/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/downtime/tasks/main.yml +++ b/tests/integration/targets/downtime/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/downtime/tasks/test.yml b/tests/integration/targets/downtime/tasks/test.yml index 017428988..69fd4be4f 100644 --- a/tests/integration/targets/downtime/tasks/test.yml +++ b/tests/integration/targets/downtime/tasks/test.yml @@ -1,4 +1,14 @@ --- +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: "provider" + when: outer_item.edition == "cme" + +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: null + when: outer_item.edition != "cme" + - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Create hosts." host: server_url: "{{ checkmk_var_server_url }}" diff --git a/tests/integration/targets/downtime/vars/main.yml b/tests/integration/targets/downtime/vars/main.yml index 3203703cc..b18d1f2fe 100644 --- a/tests/integration/targets/downtime/vars/main.yml +++ b/tests/integration/targets/downtime/vars/main.yml @@ -1,17 +1,21 @@ --- checkmk_var_test_sites: - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_hosts: - name: test1.tld diff --git a/tests/integration/targets/folder/tasks/main.yml b/tests/integration/targets/folder/tasks/main.yml index fe32912ad..a0a3c6292 100644 --- a/tests/integration/targets/folder/tasks/main.yml +++ b/tests/integration/targets/folder/tasks/main.yml @@ -1,13 +1,10 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" + # when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/folder/tasks/test.yml b/tests/integration/targets/folder/tasks/test.yml index 570b0afd2..03bb4f37d 100644 --- a/tests/integration/targets/folder/tasks/test.yml +++ b/tests/integration/targets/folder/tasks/test.yml @@ -2,6 +2,17 @@ # Take this from playbooks/test-full.yml to ensure full coverage! # Be sure to remove header! +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: "provider" + when: outer_item.edition == "cme" + +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: null + when: outer_item.edition != "cme" + + - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Create folders." folder: server_url: "{{ checkmk_var_server_url }}" diff --git a/tests/integration/targets/folder/vars/main.yml b/tests/integration/targets/folder/vars/main.yml index bbfc52cc7..a7f925175 100644 --- a/tests/integration/targets/folder/vars/main.yml +++ b/tests/integration/targets/folder/vars/main.yml @@ -1,17 +1,21 @@ --- checkmk_var_test_sites: - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_folders: - path: /test diff --git a/tests/integration/targets/host/tasks/main.yml b/tests/integration/targets/host/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/host/tasks/main.yml +++ b/tests/integration/targets/host/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/host/tasks/test.yml b/tests/integration/targets/host/tasks/test.yml index 096bdc835..306c643bd 100644 --- a/tests/integration/targets/host/tasks/test.yml +++ b/tests/integration/targets/host/tasks/test.yml @@ -1,4 +1,14 @@ --- +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: "provider" + when: outer_item.edition == "cme" + +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: null + when: outer_item.edition != "cme" + - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Create folders." folder: server_url: "{{ checkmk_var_server_url }}" diff --git a/tests/integration/targets/host/vars/main.yml b/tests/integration/targets/host/vars/main.yml index d7e75843b..f43c3c628 100644 --- a/tests/integration/targets/host/vars/main.yml +++ b/tests/integration/targets/host/vars/main.yml @@ -1,17 +1,21 @@ --- checkmk_var_test_sites: + - version: "2.3.0p19" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" - - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_folders: - path: /foo diff --git a/tests/integration/targets/host_group/tasks/main.yml b/tests/integration/targets/host_group/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/host_group/tasks/main.yml +++ b/tests/integration/targets/host_group/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/host_group/tasks/test.yml b/tests/integration/targets/host_group/tasks/test.yml index 8fb98e585..1831c09bf 100644 --- a/tests/integration/targets/host_group/tasks/test.yml +++ b/tests/integration/targets/host_group/tasks/test.yml @@ -2,12 +2,12 @@ - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." ansible.builtin.set_fact: checkmk_var_customer: "provider" - when: (outer_item.edition == "cme") or (outer_item.edition == "cce") + when: outer_item.edition == "cme" - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." ansible.builtin.set_fact: checkmk_var_customer: null - when: not ((outer_item.edition == "cme") or (outer_item.edition == "cce")) + when: outer_item.edition != "cme" - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Create host groups." host_group: diff --git a/tests/integration/targets/host_group/vars/main.yml b/tests/integration/targets/host_group/vars/main.yml index 72f925510..75637edd3 100644 --- a/tests/integration/targets/host_group/vars/main.yml +++ b/tests/integration/targets/host_group/vars/main.yml @@ -3,18 +3,19 @@ checkmk_var_test_sites: - version: "2.3.0p19" edition: "cme" site: "stable_cme" - - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_host_groups_create: - name: "test1" diff --git a/tests/integration/targets/lookup_bakery/tasks/main.yml b/tests/integration/targets/lookup_bakery/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/lookup_bakery/tasks/main.yml +++ b/tests/integration/targets/lookup_bakery/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/lookup_bakery/tasks/test.yml b/tests/integration/targets/lookup_bakery/tasks/test.yml index 3521fa497..c7b387d78 100644 --- a/tests/integration/targets/lookup_bakery/tasks/test.yml +++ b/tests/integration/targets/lookup_bakery/tasks/test.yml @@ -1,4 +1,14 @@ --- +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: "provider" + when: outer_item.edition == "cme" + +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: null + when: outer_item.edition != "cme" + - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Get Checkmk bakery status." ansible.builtin.debug: msg: "Bakery status is {{ __checkmk_var_result_bakery }}" diff --git a/tests/integration/targets/lookup_bakery/vars/main.yml b/tests/integration/targets/lookup_bakery/vars/main.yml index 78b06655a..2843442b3 100644 --- a/tests/integration/targets/lookup_bakery/vars/main.yml +++ b/tests/integration/targets/lookup_bakery/vars/main.yml @@ -1,11 +1,14 @@ --- checkmk_var_test_sites: - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.2.0p35" - edition: "cee" - site: "old_cee" - # - version: "2.1.0p48" - # edition: "cee" - # site: "ancient_cee" + edition: "cce" + site: "old_cce" + port: "5222" + - version: "2.1.0p48" + edition: "cfe" + site: "ancient_cfe" + port: "5421" diff --git a/tests/integration/targets/lookup_folder/tasks/main.yml b/tests/integration/targets/lookup_folder/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/lookup_folder/tasks/main.yml +++ b/tests/integration/targets/lookup_folder/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/lookup_folder/tasks/test.yml b/tests/integration/targets/lookup_folder/tasks/test.yml index dcdc9f16a..16eee7dcc 100644 --- a/tests/integration/targets/lookup_folder/tasks/test.yml +++ b/tests/integration/targets/lookup_folder/tasks/test.yml @@ -1,4 +1,14 @@ --- +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: "provider" + when: outer_item.edition == "cme" + +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: null + when: outer_item.edition != "cme" + - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Create folder." folder: server_url: "{{ checkmk_var_server_url }}" diff --git a/tests/integration/targets/lookup_folder/vars/main.yml b/tests/integration/targets/lookup_folder/vars/main.yml index e0c6445bc..3b0445908 100644 --- a/tests/integration/targets/lookup_folder/vars/main.yml +++ b/tests/integration/targets/lookup_folder/vars/main.yml @@ -1,17 +1,21 @@ --- checkmk_var_test_sites: - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_folder: name: "Folder 1" diff --git a/tests/integration/targets/lookup_folders/tasks/main.yml b/tests/integration/targets/lookup_folders/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/lookup_folders/tasks/main.yml +++ b/tests/integration/targets/lookup_folders/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/lookup_folders/tasks/test.yml b/tests/integration/targets/lookup_folders/tasks/test.yml index 5f109d612..e9cf5ae03 100644 --- a/tests/integration/targets/lookup_folders/tasks/test.yml +++ b/tests/integration/targets/lookup_folders/tasks/test.yml @@ -1,4 +1,14 @@ --- +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: "provider" + when: outer_item.edition == "cme" + +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: null + when: outer_item.edition != "cme" + - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Create folder." folder: server_url: "{{ checkmk_var_server_url }}" diff --git a/tests/integration/targets/lookup_folders/vars/main.yml b/tests/integration/targets/lookup_folders/vars/main.yml index e2dde4e96..07441d371 100644 --- a/tests/integration/targets/lookup_folders/vars/main.yml +++ b/tests/integration/targets/lookup_folders/vars/main.yml @@ -1,17 +1,21 @@ --- checkmk_var_test_sites: - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_folders: - name: "Folder 1" diff --git a/tests/integration/targets/lookup_host/tasks/main.yml b/tests/integration/targets/lookup_host/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/lookup_host/tasks/main.yml +++ b/tests/integration/targets/lookup_host/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/lookup_host/tasks/test.yml b/tests/integration/targets/lookup_host/tasks/test.yml index 728276f39..def1d9e94 100644 --- a/tests/integration/targets/lookup_host/tasks/test.yml +++ b/tests/integration/targets/lookup_host/tasks/test.yml @@ -1,4 +1,14 @@ --- +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: "provider" + when: outer_item.edition == "cme" + +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: null + when: outer_item.edition != "cme" + - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Create host." host: server_url: "{{ checkmk_var_server_url }}" diff --git a/tests/integration/targets/lookup_host/vars/main.yml b/tests/integration/targets/lookup_host/vars/main.yml index 428219cc4..45f9ea471 100644 --- a/tests/integration/targets/lookup_host/vars/main.yml +++ b/tests/integration/targets/lookup_host/vars/main.yml @@ -1,17 +1,21 @@ --- checkmk_var_test_sites: - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_host: name: "host1.tld" diff --git a/tests/integration/targets/lookup_hosts/tasks/main.yml b/tests/integration/targets/lookup_hosts/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/lookup_hosts/tasks/main.yml +++ b/tests/integration/targets/lookup_hosts/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/lookup_hosts/tasks/test.yml b/tests/integration/targets/lookup_hosts/tasks/test.yml index e986ea69c..f22f92b9f 100644 --- a/tests/integration/targets/lookup_hosts/tasks/test.yml +++ b/tests/integration/targets/lookup_hosts/tasks/test.yml @@ -1,4 +1,14 @@ --- +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: "provider" + when: outer_item.edition == "cme" + +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: null + when: outer_item.edition != "cme" + - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Create host." host: server_url: "{{ checkmk_var_server_url }}" diff --git a/tests/integration/targets/lookup_hosts/vars/main.yml b/tests/integration/targets/lookup_hosts/vars/main.yml index 738c849cf..b2376f603 100644 --- a/tests/integration/targets/lookup_hosts/vars/main.yml +++ b/tests/integration/targets/lookup_hosts/vars/main.yml @@ -1,17 +1,21 @@ --- checkmk_var_test_sites: - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_hosts: - name: "host1.tld" diff --git a/tests/integration/targets/lookup_rules/tasks/main.yml b/tests/integration/targets/lookup_rules/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/lookup_rules/tasks/main.yml +++ b/tests/integration/targets/lookup_rules/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/lookup_rules/tasks/test.yml b/tests/integration/targets/lookup_rules/tasks/test.yml index c1c32cc0b..f424cc9f9 100644 --- a/tests/integration/targets/lookup_rules/tasks/test.yml +++ b/tests/integration/targets/lookup_rules/tasks/test.yml @@ -1,4 +1,14 @@ --- +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: "provider" + when: outer_item.edition == "cme" + +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: null + when: outer_item.edition != "cme" + - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Create rules." rule: server_url: "{{ checkmk_var_server_url }}" diff --git a/tests/integration/targets/lookup_rules/vars/main.yml b/tests/integration/targets/lookup_rules/vars/main.yml index 99e8733df..fbfb572f2 100644 --- a/tests/integration/targets/lookup_rules/vars/main.yml +++ b/tests/integration/targets/lookup_rules/vars/main.yml @@ -1,17 +1,21 @@ --- checkmk_var_test_sites: - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_rulesets: - "checkgroup_parameters:filesystem" diff --git a/tests/integration/targets/lookup_rulesets/tasks/main.yml b/tests/integration/targets/lookup_rulesets/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/lookup_rulesets/tasks/main.yml +++ b/tests/integration/targets/lookup_rulesets/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/lookup_rulesets/tasks/test.yml b/tests/integration/targets/lookup_rulesets/tasks/test.yml index 9c6f59ae4..e8ba89ed1 100644 --- a/tests/integration/targets/lookup_rulesets/tasks/test.yml +++ b/tests/integration/targets/lookup_rulesets/tasks/test.yml @@ -1,4 +1,14 @@ --- +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: "provider" + when: outer_item.edition == "cme" + +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: null + when: outer_item.edition != "cme" + - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Create rules." rule: server_url: "{{ checkmk_var_server_url }}" diff --git a/tests/integration/targets/lookup_rulesets/vars/main.yml b/tests/integration/targets/lookup_rulesets/vars/main.yml index 6cc1ca2b2..f34517511 100644 --- a/tests/integration/targets/lookup_rulesets/vars/main.yml +++ b/tests/integration/targets/lookup_rulesets/vars/main.yml @@ -1,17 +1,21 @@ --- checkmk_var_test_sites: - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_ruleset_regexes: - "checkgroup_parameters:filesystem" diff --git a/tests/integration/targets/lookup_site/tasks/main.yml b/tests/integration/targets/lookup_site/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/lookup_site/tasks/main.yml +++ b/tests/integration/targets/lookup_site/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/lookup_site/vars/main.yml b/tests/integration/targets/lookup_site/vars/main.yml index a99d4cc2e..fc06247ce 100644 --- a/tests/integration/targets/lookup_site/vars/main.yml +++ b/tests/integration/targets/lookup_site/vars/main.yml @@ -1,11 +1,14 @@ --- checkmk_var_test_sites: - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" + port: "5022" diff --git a/tests/integration/targets/lookup_sites/tasks/main.yml b/tests/integration/targets/lookup_sites/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/lookup_sites/tasks/main.yml +++ b/tests/integration/targets/lookup_sites/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/lookup_sites/tasks/test.yml b/tests/integration/targets/lookup_sites/tasks/test.yml index 60ea8d9a7..e17b8561e 100644 --- a/tests/integration/targets/lookup_sites/tasks/test.yml +++ b/tests/integration/targets/lookup_sites/tasks/test.yml @@ -1,7 +1,7 @@ --- - name: " {{ outer_item.version }} - {{ outer_item.edition | upper }} - Get config of the site." ansible.builtin.debug: - msg: "Config of site {{ item.id }} is {{ item.extensions }}" + msg: "Config of site {{ item.id }} is {{ item.extensions }}" loop: "{{ lookup('checkmk.general.sites', server_url=checkmk_var_server_url, site=outer_item.site, @@ -10,34 +10,34 @@ automation_secret=checkmk_var_automation_secret) }}" loop_control: - label: "{{ item.id }}" + label: "{{ item.id }}" delegate_to: localhost run_once: true # noqa run-once[task] - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Verify local connection." ansible.builtin.debug: - msg: "{{ __checkmk_var_sites }}" + msg: "{{ __checkmk_var_sites }}" vars: - __checkmk_var_sites: "{{ lookup('checkmk.general.sites', - server_url=checkmk_var_server_url, - site=outer_item.site, - validate_certs=False, - automation_user=checkmk_var_automation_user, - automation_secret=checkmk_var_automation_secret) - }}" + __checkmk_var_sites: "{{ lookup('checkmk.general.sites', + server_url=checkmk_var_server_url, + site=outer_item.site, + validate_certs=False, + automation_user=checkmk_var_automation_user, + automation_secret=checkmk_var_automation_secret) + }}" delegate_to: localhost run_once: true # noqa run-once[task] - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Verify local connection." ansible.builtin.assert: - that: "__checkmk_var_sites[0].extensions.status_connection.connection.socket_type == 'local'" + that: "__checkmk_var_sites[0].extensions.status_connection.connection.socket_type == 'local'" vars: - __checkmk_var_sites: "{{ lookup('checkmk.general.sites', - server_url=checkmk_var_server_url, - site=outer_item.site, - validate_certs=False, - automation_user=checkmk_var_automation_user, - automation_secret=checkmk_var_automation_secret) - }}" + __checkmk_var_sites: "{{ lookup('checkmk.general.sites', + server_url=checkmk_var_server_url, + site=outer_item.site, + validate_certs=False, + automation_user=checkmk_var_automation_user, + automation_secret=checkmk_var_automation_secret) + }}" delegate_to: localhost run_once: true # noqa run-once[task] diff --git a/tests/integration/targets/lookup_sites/vars/main.yml b/tests/integration/targets/lookup_sites/vars/main.yml index a99d4cc2e..fc06247ce 100644 --- a/tests/integration/targets/lookup_sites/vars/main.yml +++ b/tests/integration/targets/lookup_sites/vars/main.yml @@ -1,11 +1,14 @@ --- checkmk_var_test_sites: - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" + port: "5022" diff --git a/tests/integration/targets/lookup_version/tasks/main.yml b/tests/integration/targets/lookup_version/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/lookup_version/tasks/main.yml +++ b/tests/integration/targets/lookup_version/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/lookup_version/tasks/test.yml b/tests/integration/targets/lookup_version/tasks/test.yml index 8bef60434..c21a32091 100644 --- a/tests/integration/targets/lookup_version/tasks/test.yml +++ b/tests/integration/targets/lookup_version/tasks/test.yml @@ -1,4 +1,14 @@ --- +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: "provider" + when: outer_item.edition == "cme" + +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: null + when: outer_item.edition != "cme" + - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Get Checkmk version." ansible.builtin.debug: msg: "Version is {{ __checkmk_var_result_internal }}" diff --git a/tests/integration/targets/lookup_version/vars/main.yml b/tests/integration/targets/lookup_version/vars/main.yml index aa1645339..850ef4e70 100644 --- a/tests/integration/targets/lookup_version/vars/main.yml +++ b/tests/integration/targets/lookup_version/vars/main.yml @@ -1,14 +1,18 @@ --- checkmk_var_test_sites: - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" diff --git a/tests/integration/targets/password/tasks/main.yml b/tests/integration/targets/password/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/password/tasks/main.yml +++ b/tests/integration/targets/password/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/password/tasks/test.yml b/tests/integration/targets/password/tasks/test.yml index 66a110b74..44c39803b 100644 --- a/tests/integration/targets/password/tasks/test.yml +++ b/tests/integration/targets/password/tasks/test.yml @@ -2,12 +2,12 @@ - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." ansible.builtin.set_fact: checkmk_var_customer: "provider" - when: (outer_item.edition == "cme") + when: outer_item.edition == "cme" - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." ansible.builtin.set_fact: checkmk_var_customer: null - when: not (outer_item.edition == "cme") + when: outer_item.edition != "cme" - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Create new passwords." password: diff --git a/tests/integration/targets/password/vars/main.yml b/tests/integration/targets/password/vars/main.yml index 8bf503d35..1ba1f4a9e 100644 --- a/tests/integration/targets/password/vars/main.yml +++ b/tests/integration/targets/password/vars/main.yml @@ -3,18 +3,19 @@ checkmk_var_test_sites: - version: "2.3.0p19" edition: "cme" site: "stable_cme" - - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_passwords_create: - name: "pwtest1" diff --git a/tests/integration/targets/rule/tasks/main.yml b/tests/integration/targets/rule/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/rule/tasks/main.yml +++ b/tests/integration/targets/rule/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/rule/tasks/test.yml b/tests/integration/targets/rule/tasks/test.yml index f00a11dbc..a00841739 100644 --- a/tests/integration/targets/rule/tasks/test.yml +++ b/tests/integration/targets/rule/tasks/test.yml @@ -1,4 +1,14 @@ --- +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: "provider" + when: outer_item.edition == "cme" + +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: null + when: outer_item.edition != "cme" + - name: "Include Checkmk version specific Variables." ansible.builtin.include_vars: "{{ outer_item.version | regex_search('^[0-9]+[.][0-9]+[.][0-9]+') }}.yml" diff --git a/tests/integration/targets/rule/vars/main.yml b/tests/integration/targets/rule/vars/main.yml index aa1645339..850ef4e70 100644 --- a/tests/integration/targets/rule/vars/main.yml +++ b/tests/integration/targets/rule/vars/main.yml @@ -1,14 +1,18 @@ --- checkmk_var_test_sites: - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" diff --git a/tests/integration/targets/service_group/tasks/main.yml b/tests/integration/targets/service_group/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/service_group/tasks/main.yml +++ b/tests/integration/targets/service_group/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/service_group/tasks/test.yml b/tests/integration/targets/service_group/tasks/test.yml index 310119c08..c2379a188 100644 --- a/tests/integration/targets/service_group/tasks/test.yml +++ b/tests/integration/targets/service_group/tasks/test.yml @@ -2,12 +2,12 @@ - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." ansible.builtin.set_fact: checkmk_var_customer: "provider" - when: (outer_item.edition == "cme") or (outer_item.edition == "cce") + when: outer_item.edition == "cme" - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." ansible.builtin.set_fact: checkmk_var_customer: null - when: not ((outer_item.edition == "cme") or (outer_item.edition == "cce")) + when: outer_item.edition != "cme" - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Create service groups." service_group: diff --git a/tests/integration/targets/service_group/vars/main.yml b/tests/integration/targets/service_group/vars/main.yml index b6f4cf616..27c8d0ca4 100644 --- a/tests/integration/targets/service_group/vars/main.yml +++ b/tests/integration/targets/service_group/vars/main.yml @@ -3,18 +3,19 @@ checkmk_var_test_sites: - version: "2.3.0p19" edition: "cme" site: "stable_cme" - - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_service_groups_create: - name: "test1" diff --git a/tests/integration/targets/tag_group/tasks/main.yml b/tests/integration/targets/tag_group/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/tag_group/tasks/main.yml +++ b/tests/integration/targets/tag_group/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/tag_group/vars/main.yml b/tests/integration/targets/tag_group/vars/main.yml index 05cae7524..16df5e05c 100644 --- a/tests/integration/targets/tag_group/vars/main.yml +++ b/tests/integration/targets/tag_group/vars/main.yml @@ -3,18 +3,19 @@ checkmk_var_test_sites: - version: "2.3.0p19" edition: "cme" site: "stable_cme" - - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_tag_groups_create: - name: Datacenter diff --git a/tests/integration/targets/timeperiod/tasks/main.yml b/tests/integration/targets/timeperiod/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/timeperiod/tasks/main.yml +++ b/tests/integration/targets/timeperiod/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/timeperiod/tasks/test.yml b/tests/integration/targets/timeperiod/tasks/test.yml index e6609facf..86725fa8f 100644 --- a/tests/integration/targets/timeperiod/tasks/test.yml +++ b/tests/integration/targets/timeperiod/tasks/test.yml @@ -1,4 +1,14 @@ --- +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: "provider" + when: outer_item.edition == "cme" + +- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." + ansible.builtin.set_fact: + checkmk_var_customer: null + when: outer_item.edition != "cme" + - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Create new time periods." timeperiod: server_url: "{{ checkmk_var_server_url }}" diff --git a/tests/integration/targets/timeperiod/vars/main.yml b/tests/integration/targets/timeperiod/vars/main.yml index df932f345..5912172b5 100644 --- a/tests/integration/targets/timeperiod/vars/main.yml +++ b/tests/integration/targets/timeperiod/vars/main.yml @@ -1,17 +1,21 @@ --- checkmk_var_test_sites: - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + edition: "cme" + site: "stable_cme" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_timeperiods_create: - name: "lunchtime" diff --git a/tests/integration/targets/user/tasks/main.yml b/tests/integration/targets/user/tasks/main.yml index fe32912ad..1699966df 100644 --- a/tests/integration/targets/user/tasks/main.yml +++ b/tests/integration/targets/user/tasks/main.yml @@ -1,13 +1,9 @@ --- - name: "Include Global Variables." - ansible.builtin.include_vars: /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - -- name: "Run Preparations." - ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml + ansible.builtin.include_vars: /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/global.yml - name: "Testing." ansible.builtin.include_tasks: test.yml loop: "{{ checkmk_var_test_sites }}" loop_control: loop_var: outer_item - when: (checkmk_var_download_pass is defined and checkmk_var_download_pass | length) or outer_item.edition == "cre" diff --git a/tests/integration/targets/user/tasks/test.yml b/tests/integration/targets/user/tasks/test.yml index 40d447ef8..5b8d876c5 100644 --- a/tests/integration/targets/user/tasks/test.yml +++ b/tests/integration/targets/user/tasks/test.yml @@ -7,7 +7,7 @@ - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." ansible.builtin.set_fact: checkmk_var_customer: null - when: not outer_item.edition == "cme" + when: outer_item.edition != "cme" - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Create contact groups." contact_group: diff --git a/tests/integration/targets/user/vars/main.yml b/tests/integration/targets/user/vars/main.yml index 5b559c189..e16e99c46 100644 --- a/tests/integration/targets/user/vars/main.yml +++ b/tests/integration/targets/user/vars/main.yml @@ -3,18 +3,19 @@ checkmk_var_test_sites: - version: "2.3.0p19" edition: "cme" site: "stable_cme" - - version: "2.3.0p19" - edition: "cee" - site: "stable_cee" + port: "5323" - version: "2.3.0p19" edition: "cre" site: "stable_cre" + port: "5023" - version: "2.2.0p35" edition: "cre" site: "old_cre" - # - version: "2.1.0p48" - # edition: "cre" - # site: "ancient_cre" + port: "5022" + - version: "2.1.0p48" + edition: "cre" + site: "ancient_cre" + port: "5021" checkmk_var_contact_groups: - team1