diff --git a/.ansible-lint b/.ansible-lint index 94dc18de7..426ba1149 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -9,6 +9,7 @@ exclude_paths: - .vagrant/ - changelogs/ - docs/ + # parseable: true # quiet: true # verbosity: 1 diff --git a/.github/workflows/ans-int-test-activation.yaml b/.github/workflows/ans-int-test-activation.yaml index 82901406c..6cb075af1 100644 --- a/.github/workflows/ans-int-test-activation.yaml +++ b/.github/workflows/ans-int-test-activation.yaml @@ -10,6 +10,11 @@ env: COLLECTION_NAME: general MODULE_NAME: activation +# https://stackoverflow.com/questions/70928424/limit-github-action-workflow-concurrency-on-push-and-pull-request +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Activation Module on: workflow_dispatch: @@ -39,15 +44,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +76,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 4462f503e..35dbefc79 100644 --- a/.github/workflows/ans-int-test-bakery.yaml +++ b/.github/workflows/ans-int-test-bakery.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: bakery +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Bakery Module on: workflow_dispatch: @@ -39,15 +43,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +75,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 42ae1bc33..d325164ea 100644 --- a/.github/workflows/ans-int-test-contact_group.yaml +++ b/.github/workflows/ans-int-test-contact_group.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: contact_group +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Contact Group Module on: workflow_dispatch: @@ -39,15 +43,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +75,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 a41d68387..c96f8899c 100644 --- a/.github/workflows/ans-int-test-discovery.yaml +++ b/.github/workflows/ans-int-test-discovery.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: discovery +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Discovery Module on: workflow_dispatch: @@ -39,15 +43,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +75,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 2f21e600a..8068cd2c5 100644 --- a/.github/workflows/ans-int-test-downtime.yaml +++ b/.github/workflows/ans-int-test-downtime.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: downtime +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Downtime Module on: workflow_dispatch: @@ -39,15 +43,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +75,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 b1e1fa3b8..d6db20e25 100644 --- a/.github/workflows/ans-int-test-folder.yaml +++ b/.github/workflows/ans-int-test-folder.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: folder +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Folder Module on: workflow_dispatch: @@ -39,15 +43,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +75,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 692195e45..d3c32c015 100644 --- a/.github/workflows/ans-int-test-host.yaml +++ b/.github/workflows/ans-int-test-host.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: host +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Host Module on: workflow_dispatch: @@ -39,15 +43,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +75,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 59964b3fe..7586e6754 100644 --- a/.github/workflows/ans-int-test-host_group.yaml +++ b/.github/workflows/ans-int-test-host_group.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: host_group +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Host Group Module on: workflow_dispatch: @@ -39,15 +43,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +75,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 b11451ef5..92a05d939 100644 --- a/.github/workflows/ans-int-test-lkp-bakery.yaml +++ b/.github/workflows/ans-int-test-lkp-bakery.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: lookup_bakery +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Bakery Lookup Module on: workflow_dispatch: @@ -39,15 +43,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +75,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 853f58ab4..203669c67 100644 --- a/.github/workflows/ans-int-test-lkp-folder.yaml +++ b/.github/workflows/ans-int-test-lkp-folder.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: lookup_folder +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Folder Lookup Module on: workflow_dispatch: @@ -37,15 +41,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -70,5 +73,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 84d72b14b..8da79826b 100644 --- a/.github/workflows/ans-int-test-lkp-folders.yaml +++ b/.github/workflows/ans-int-test-lkp-folders.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: lookup_folders +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Folders Lookup Module on: workflow_dispatch: @@ -37,15 +41,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -70,5 +73,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 c9be5906e..20954af9c 100644 --- a/.github/workflows/ans-int-test-lkp-host.yaml +++ b/.github/workflows/ans-int-test-lkp-host.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: lookup_host +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Host Lookup Module on: workflow_dispatch: @@ -37,15 +41,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -70,5 +73,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 f006f4655..cfc91d53b 100644 --- a/.github/workflows/ans-int-test-lkp-hosts.yaml +++ b/.github/workflows/ans-int-test-lkp-hosts.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: lookup_hosts +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Hosts Lookup Module on: workflow_dispatch: @@ -37,15 +41,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -70,5 +73,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 ff6ff9292..c0a7f6f3d 100644 --- a/.github/workflows/ans-int-test-lkp-rules.yaml +++ b/.github/workflows/ans-int-test-lkp-rules.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: lookup_rules +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Rule Lookup Modules on: workflow_dispatch: @@ -39,15 +43,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +75,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 a92a54673..799023a70 100644 --- a/.github/workflows/ans-int-test-lkp-rulesets.yaml +++ b/.github/workflows/ans-int-test-lkp-rulesets.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: lookup_rulesets +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Ruleset Lookup Modules on: workflow_dispatch: @@ -39,15 +43,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +75,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 d1ffc2bbf..c8b72dcac 100644 --- a/.github/workflows/ans-int-test-lkp-version.yaml +++ b/.github/workflows/ans-int-test-lkp-version.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: lookup_version +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Version Lookup Module on: workflow_dispatch: @@ -39,15 +43,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +75,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 e3082c511..6dabe726e 100644 --- a/.github/workflows/ans-int-test-password.yaml +++ b/.github/workflows/ans-int-test-password.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: password +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Password Module on: workflow_dispatch: @@ -39,15 +43,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +75,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 429a9b2f4..7acc978db 100644 --- a/.github/workflows/ans-int-test-rule.yaml +++ b/.github/workflows/ans-int-test-rule.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: rule +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Rule Module on: workflow_dispatch: @@ -39,15 +43,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +75,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 52d4b214e..a3309386f 100644 --- a/.github/workflows/ans-int-test-service_group.yaml +++ b/.github/workflows/ans-int-test-service_group.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: service_group +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Service Group Module on: workflow_dispatch: @@ -39,15 +43,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +75,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 22f7c0a23..f99aa9484 100644 --- a/.github/workflows/ans-int-test-tag_group.yaml +++ b/.github/workflows/ans-int-test-tag_group.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: tag_group +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Tag Group Module on: workflow_dispatch: @@ -39,15 +43,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +75,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 7a4b17086..b81a35714 100644 --- a/.github/workflows/ans-int-test-timeperiod.yaml +++ b/.github/workflows/ans-int-test-timeperiod.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: timeperiod +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for Timeperiod Module on: workflow_dispatch: @@ -39,15 +43,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +75,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default 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 b351a3406..8c0a2e5e9 100644 --- a/.github/workflows/ans-int-test-user.yaml +++ b/.github/workflows/ans-int-test-user.yaml @@ -10,6 +10,10 @@ env: COLLECTION_NAME: general MODULE_NAME: user +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Ansible Integration Tests for User Module on: workflow_dispatch: @@ -39,15 +43,14 @@ jobs: - stable-2.17 - devel python: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' exclude: # Exclude unsupported sets. - - ansible: stable-2.14 - python: '3.12' + - ansible: devel + python: '3.9' - ansible: stable-2.15 python: '3.12' @@ -72,5 +75,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 + run: ansible-test integration ${{env.MODULE_NAME}} -v --color --retry-on-error --continue-on-error --diff --python ${{ matrix.python }} --docker default working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} diff --git a/.github/workflows/ansible-lint.yaml b/.github/workflows/ansible-lint.yaml index ac671c0c0..1d51054aa 100644 --- a/.github/workflows/ansible-lint.yaml +++ b/.github/workflows/ansible-lint.yaml @@ -33,7 +33,6 @@ jobs: fail-fast: false matrix: python: - - '3.8' - '3.9' - '3.10' - '3.11' diff --git a/.github/workflows/molecule-role-agent.yaml b/.github/workflows/molecule-role-agent.yaml index b6b28548b..5eff148ad 100644 --- a/.github/workflows/molecule-role-agent.yaml +++ b/.github/workflows/molecule-role-agent.yaml @@ -64,10 +64,6 @@ jobs: run: | python3 -m pip install --upgrade pip python3 -m pip install -r requirements.txt - # The following works around a incompatibility between Python requests and Docker. - # https://github.com/ansible-collections/community.docker/issues/860 - # Remove at a later point, when the updated community.docker is shipped. - ansible-galaxy collection install community.docker --force working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} - name: "Provide secrets file." diff --git a/.github/workflows/molecule-role-server.yaml b/.github/workflows/molecule-role-server.yaml index d9f33e507..8568ee7d7 100644 --- a/.github/workflows/molecule-role-server.yaml +++ b/.github/workflows/molecule-role-server.yaml @@ -64,10 +64,6 @@ jobs: run: | python3 -m pip install --upgrade pip python3 -m pip install -r requirements.txt - # The following works around a incompatibility between Python requests and Docker. - # https://github.com/ansible-collections/community.docker/issues/860 - # Remove at a later point, when the updated community.docker is shipped. - ansible-galaxy collection install community.docker --force working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} - name: "Provide secrets file." diff --git a/.gitignore b/.gitignore index 765803282..b0cb459d1 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ playbooks/vars/config.yml playbooks/test*.yml playbooks/hosts playbooks/hosts.bak +venv/ Vagrantfile Vagrantfile.bak venv \ No newline at end of file diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ea86fe113..d7e8e5a3b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,40 @@ checkmk.general Release Notes .. contents:: Topics +v5.0.0 +====== + +Release Summary +--------------- + +(Re)writing history with overhauled modules and updated Checkmk, Ansible, Distribution and Python support. + +Major Changes +------------- + +- Discovery module - The module now fully supports Checkmk 2.3.0. Additionally, two new parameters were introduced, `update_service_labels` and `monitor_undecided_services`. Refer to the module documentation for further details. +- Rule module - The complete module was rewritten to use the new module API. Additionally, a parameter "rule_id" was introduced to modify existing rules. Refer to the module documentation for further details. + +Minor Changes +------------- + +- Agent role - Add support to open firewall for a list of IPs. +- Agent role - Replace `ansible.builtin.yum` with the succeeding `ansible.builtin.dnf`. +- Server role - Replace `ansible.builtin.yum` with the succeeding `ansible.builtin.dnf`. +- Several modules - Remove unnecessary HTTP codes which get already imported via utils.py. +- Testing - Add Ansible 2.17 to all tests. Be advised, that this Ansible release drops support for Python 2.7 and 3.6. +- Testing - Add Ubuntu 24.04 to the Molecule tests. +- Testing - All tests now cover Checkmk 2.3.0. +- Testing - Remove Ansible 2.14 from all tests, as it is EOL. +- Testing - Remove Checkmk 2.0.0 from all tests, as it is EOL. +- Testing - The Molecule tests now run on Ubuntu 22.04. + +Breaking Changes / Porting Guide +-------------------------------- + +- Agent role - Not really a breaking change, but we removed the internal variable `checkmk_agent_server_ip`. If you set this variable in your inventory, please make sure to update your configuration accordingly! +- Folder lookup module - Return the complete folder information, not only the extensions. To keep the current behavior in your playbooks, you want to use `{{ my_lookup_result.extensions }}` instead of `{{ my_lookup_result }}`. + v4.4.1 ====== diff --git a/SUPPORT.md b/SUPPORT.md index 69c5e1e31..deae1ffb1 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -54,3 +54,4 @@ Collection Version | Checkmk Versions | Ansible Versions | Remarks 4.4.0 | 2.0.0p39, 2.1.0p41, 2.2.0p24 | 2.14, 2.15, 2.16 | None 4.4.1 | 2.0.0p39, 2.1.0p41, 2.2.0p24 | 2.14, 2.15, 2.16 | None 5.0.0 | 2.1.0p44, 2.2.0p27, 2.3.0p5 | 2.15, 2.16, 2.17 | Breaking changes to the following modules: `lookup_folder`, `rule` and role: `agent`. +5.1.0 | 2.1.0p44, 2.2.0p27, 2.3.0p6 | 2.15, 2.16, 2.17 | None diff --git a/Vagrantfile.kvm b/Vagrantfile.kvm index 308e640b4..b5565b85c 100644 --- a/Vagrantfile.kvm +++ b/Vagrantfile.kvm @@ -28,7 +28,8 @@ Vagrant.configure("2") do |config| end $script = <<-SCRIPT apt-get -y update --quiet - apt-get -y install python3-pip ca-certificates curl gnupg lsb-release qemu-guest-agent + add-apt-repository -y ppa:deadsnakes + apt-get -y install python3-pip ca-certificates curl gnupg lsb-release qemu-guest-agent python3.8 python3.9 python3.10 python3.11 python3.12 sudo -u vagrant python3 -m pip install pip --upgrade sudo -u vagrant python3 -m pip install -r /home/vagrant/ansible_collections/checkmk/general/requirements.txt sudo -u vagrant python3 -m pip install -r /home/vagrant/ansible_collections/checkmk/general/requirements-qa.txt diff --git a/changelogs/.plugin-cache.yaml b/changelogs/.plugin-cache.yaml index ffee32c0f..4248df3eb 100644 --- a/changelogs/.plugin-cache.yaml +++ b/changelogs/.plugin-cache.yaml @@ -126,4 +126,4 @@ plugins: strategy: {} test: {} vars: {} -version: 4.4.1 +version: 5.0.0 diff --git a/changelogs/fragments/agent.yml b/changelogs/archive/5.0.0/agent.yml similarity index 100% rename from changelogs/fragments/agent.yml rename to changelogs/archive/5.0.0/agent.yml diff --git a/changelogs/fragments/build.yml b/changelogs/archive/5.0.0/build.yml similarity index 100% rename from changelogs/fragments/build.yml rename to changelogs/archive/5.0.0/build.yml diff --git a/changelogs/fragments/discovery.yml b/changelogs/archive/5.0.0/discovery.yml similarity index 100% rename from changelogs/fragments/discovery.yml rename to changelogs/archive/5.0.0/discovery.yml diff --git a/changelogs/fragments/http.yml b/changelogs/archive/5.0.0/http.yml similarity index 100% rename from changelogs/fragments/http.yml rename to changelogs/archive/5.0.0/http.yml diff --git a/changelogs/fragments/lookup_folder.yml b/changelogs/archive/5.0.0/lookup_folder.yml similarity index 100% rename from changelogs/fragments/lookup_folder.yml rename to changelogs/archive/5.0.0/lookup_folder.yml diff --git a/changelogs/fragments/release_summary.yml b/changelogs/archive/5.0.0/release_summary.yml similarity index 100% rename from changelogs/fragments/release_summary.yml rename to changelogs/archive/5.0.0/release_summary.yml diff --git a/changelogs/fragments/roles.yml b/changelogs/archive/5.0.0/roles.yml similarity index 100% rename from changelogs/fragments/roles.yml rename to changelogs/archive/5.0.0/roles.yml diff --git a/changelogs/fragments/rule.yml b/changelogs/archive/5.0.0/rule.yml similarity index 100% rename from changelogs/fragments/rule.yml rename to changelogs/archive/5.0.0/rule.yml diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 1edaa2234..e79f409ce 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -901,3 +901,44 @@ releases: - meta.yml - release_summary.yml release_date: '2024-05-01' + 5.0.0: + changes: + breaking_changes: + - Agent role - Not really a breaking change, but we removed the internal variable + `checkmk_agent_server_ip`. If you set this variable in your inventory, please + make sure to update your configuration accordingly! + - Folder lookup module - Return the complete folder information, not only the + extensions. To keep the current behavior in your playbooks, you want to use + `{{ my_lookup_result.extensions }}` instead of `{{ my_lookup_result }}`. + major_changes: + - Discovery module - The module now fully supports Checkmk 2.3.0. Additionally, + two new parameters were introduced, `update_service_labels` and `monitor_undecided_services`. + Refer to the module documentation for further details. + - Rule module - The complete module was rewritten to use the new module API. + Additionally, a parameter "rule_id" was introduced to modify existing rules. + Refer to the module documentation for further details. + minor_changes: + - Agent role - Add support to open firewall for a list of IPs. + - Agent role - Replace `ansible.builtin.yum` with the succeeding `ansible.builtin.dnf`. + - Server role - Replace `ansible.builtin.yum` with the succeeding `ansible.builtin.dnf`. + - Several modules - Remove unnecessary HTTP codes which get already imported + via utils.py. + - Testing - Add Ansible 2.17 to all tests. Be advised, that this Ansible release + drops support for Python 2.7 and 3.6. + - Testing - Add Ubuntu 24.04 to the Molecule tests. + - Testing - All tests now cover Checkmk 2.3.0. + - Testing - Remove Ansible 2.14 from all tests, as it is EOL. + - Testing - Remove Checkmk 2.0.0 from all tests, as it is EOL. + - Testing - The Molecule tests now run on Ubuntu 22.04. + release_summary: (Re)writing history with overhauled modules and updated Checkmk, + Ansible, Distribution and Python support. + fragments: + - agent.yml + - build.yml + - discovery.yml + - http.yml + - lookup_folder.yml + - release_summary.yml + - roles.yml + - rule.yml + release_date: '2024-06-07' diff --git a/docs/activation_module.rst b/docs/activation_module.rst index fb0fc5001..9712f58aa 100644 --- a/docs/activation_module.rst +++ b/docs/activation_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.activation module -- Activate changes in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.4.1). + This module is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -400,35 +400,35 @@ Examples - name: "Start activation on all sites." checkmk.general.activation: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" run_once: 'true' - name: "Start activation on a specific site." checkmk.general.activation: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" sites: - - "my_site" + - "mysite" run_once: 'true' - name: "Start activation including foreign changes." checkmk.general.activation: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" force_foreign_changes: 'true' run_once: 'true' - name: "Activate changes including foreign changes and wait for completion." checkmk.general.activation: server_url: "http://localhost/" - site: "my_site" + site: "mysite" automation_user: "automation" automation_secret: "$SECRET" redirect: 'true' diff --git a/docs/bakery_lookup.rst b/docs/bakery_lookup.rst index ddbb15370..4ef2fc074 100644 --- a/docs/bakery_lookup.rst +++ b/docs/bakery_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.bakery lookup -- Get the bakery status of a Checkmk server .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.4.1). + This lookup plugin is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -391,8 +391,8 @@ Examples msg: "Bakery status is {{ bakery }}" vars: bakery: "{{ lookup('checkmk.general.bakery', - server_url=http://my_server, - site=my_site, + server_url=http://myserver, + site=mysite, validate_certs=False, automation_user=automation_user, automation_secret=automation_secret @@ -402,10 +402,10 @@ Examples ansible.builtin.debug: msg: "Bakery status is {{ bakery }}" vars: - ansible_lookup_checkmk_server_url: "http://my_server/" - ansible_lookup_checkmk_site: "my_site" - ansible_lookup_checkmk_automation_user: "my_user" - ansible_lookup_checkmk_automation_secret: "my_secret" + ansible_lookup_checkmk_server_url: "http://myserver/" + ansible_lookup_checkmk_site: "mysite" + ansible_lookup_checkmk_automation_user: "myuser" + ansible_lookup_checkmk_automation_secret: "mysecret" ansible_lookup_checkmk_validate_certs: false bakery: "{{ lookup('checkmk.general.bakery') }}" diff --git a/docs/bakery_module.rst b/docs/bakery_module.rst index dd1bee224..c2861f9f3 100644 --- a/docs/bakery_module.rst +++ b/docs/bakery_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.bakery module -- Trigger baking and signing in the agent bakery. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.4.1). + This module is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -389,28 +389,28 @@ Examples # Bake all agents without signing, as example in a fresh installation without a signature key. - name: "Bake all agents without signing." checkmk.general.bakery: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" state: "baked" # Sign all agents. - name: "Sign all agents." checkmk.general.bakery: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" signature_key_id: 1 signature_key_passphrase: "my_key" state: "signed" # Bake and sign all agents. - name: "Bake and sign all agents." checkmk.general.bakery: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" signature_key_id: 1 signature_key_passphrase: "my_key" state: "baked_signed" diff --git a/docs/contact_group_module.rst b/docs/contact_group_module.rst index d5be4ec9b..0db6cf9cb 100644 --- a/docs/contact_group_module.rst +++ b/docs/contact_group_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.contact_group module -- Manage contact groups in Checkmk (bulk v .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.4.1). + This module is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -460,10 +460,10 @@ Examples # Create a single contact group. - name: "Create a single contact group." checkmk.general.contact_group: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "my_contact_group" title: "My Contact Group" customer: "provider" @@ -472,10 +472,10 @@ Examples # Create several contact groups. - name: "Create several contact groups." checkmk.general.contact_group: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" customer: "provider" groups: - name: "my_contact_group_one" @@ -489,10 +489,10 @@ Examples # Create several contact groups. - name: "Create several contact groups." checkmk.general.contact_group: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" customer: "provider" groups: - name: "my_contact_group_one" @@ -504,20 +504,20 @@ Examples # Delete a single contact group. - name: "Create a single contact group." checkmk.general.contact_group: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "my_contact_group" state: "absent" # Delete several contact groups. - name: "Delete several contact groups." checkmk.general.contact_group: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" groups: - name: "my_contact_group_one" - name: "my_contact_group_two" diff --git a/docs/discovery_module.rst b/docs/discovery_module.rst index a45fcfe57..ccc3821ce 100644 --- a/docs/discovery_module.rst +++ b/docs/discovery_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.discovery module -- Discover services in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.4.1). + This module is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -449,6 +449,8 @@ Parameters - :ansible-option-choices-entry:`"refresh"` - :ansible-option-choices-entry:`"tabula\_rasa"` - :ansible-option-choices-entry:`"only\_host\_labels"` + - :ansible-option-choices-entry:`"only\_service\_labels"` + - :ansible-option-choices-entry:`"monitor\_undecided\_services"` .. raw:: html @@ -518,34 +520,34 @@ Examples # Create a single host. - name: "Add newly discovered services on host." checkmk.general.discovery: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" host_name: "my_host" state: "new" - name: "Add newly discovered services, update labels and remove vanished services on host." checkmk.general.discovery: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" host_name: "my_host" state: "fix_all" - name: "Add newly discovered services on hosts. (Bulk)" checkmk.general.discovery: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" hosts: ["my_host_0", "my_host_1"] state: "new" - name: "Add newly discovered services, update labels and remove vanished services on host; 3 at once (Bulk)" checkmk.general.discovery: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" hosts: ["my_host_0", "my_host_1", "my_host_2", "my_host_3", "my_host_4", "my_host_5"] state: "fix_all" bulk_size: 3 @@ -674,6 +676,7 @@ Authors - Robin Gierse (@robin-checkmk) - Michael Sekania (@msekania) +- Max Sickora (@max-checkmk) diff --git a/docs/downtime_module.rst b/docs/downtime_module.rst index 39d0aa40d..4579de2cc 100644 --- a/docs/downtime_module.rst +++ b/docs/downtime_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.downtime module -- Manage downtimes in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.4.1). + This module is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -667,7 +667,7 @@ Examples - name: "Schedule host downtime." checkmk.general.downtime: server_url: "{{ checkmk_var_server_url }}" - site: "{{ my_site }}" + site: "{{ mysite }}" automation_user: "{{ checkmk_var_automation_user }}" automation_secret: "{{ checkmk_var_automation_secret }}" host_name: my_host @@ -680,7 +680,7 @@ Examples - name: "Schedule service downtimes for two given services." checkmk.general.downtime: server_url: "{{ checkmk_var_server_url }}" - site: "{{ my_site }}" + site: "{{ mysite }}" automation_user: "{{ checkmk_var_automation_user }}" automation_secret: "{{ checkmk_var_automation_secret }}" host_name: my_host @@ -695,7 +695,7 @@ Examples - name: "Delete all service downtimes for two given services." checkmk.general.downtime: server_url: "{{ checkmk_var_server_url }}" - site: "{{ my_site }}" + site: "{{ mysite }}" automation_user: "{{ checkmk_var_automation_user }}" automation_secret: "{{ checkmk_var_automation_secret }}" host_name: my_host diff --git a/docs/environment_variables.rst b/docs/environment_variables.rst index cc4bf9d75..964563bdd 100644 --- a/docs/environment_variables.rst +++ b/docs/environment_variables.rst @@ -2,7 +2,7 @@ :orphan: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. _list_of_collection_env_vars: diff --git a/docs/folder_lookup.rst b/docs/folder_lookup.rst index b3de84985..1c66bd423 100644 --- a/docs/folder_lookup.rst +++ b/docs/folder_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.folder lookup -- Get folder attributes .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.4.1). + This lookup plugin is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -443,29 +443,28 @@ Examples .. code-block:: yaml+jinja - - name: Get the attributes of folder /tests + - name: Get the attributes of folders /tests and /snmp ansible.builtin.debug: - msg: "Attributes of folder /network: {{ attributes }}" - vars: - attributes: "{{ - lookup('checkmk.general.folder', - '~tests', - server_url=my_server_url, - site=my_site, - automation_user=my_user, - automation_secret=my_secret, - validate_certs=False - ) - }}" + msg: "Extended attributes of folder /network: {{ attributes.extensions }}" + loop: "{{ + lookup('checkmk.general.folder', + '~tests', '~snmp', + server_url=my_server_url, + site=mysite, + automation_user=myuser, + automation_secret=mysecret, + validate_certs=False + ) + }}" - name: "Use variables outside the module call." ansible.builtin.debug: - msg: "Attributes of folder /network: {{ attributes }}" + msg: "Extended attributes of folder /network: {{ attributes.extensions }}" vars: - ansible_lookup_checkmk_server_url: "http://my_server/" - ansible_lookup_checkmk_site: "my_site" - ansible_lookup_checkmk_automation_user: "my_user" - ansible_lookup_checkmk_automation_secret: "my_secret" + ansible_lookup_checkmk_server_url: "http://myserver/" + ansible_lookup_checkmk_site: "mysite" + ansible_lookup_checkmk_automation_user: "myuser" + ansible_lookup_checkmk_automation_secret: "mysecret" ansible_lookup_checkmk_validate_certs: false attributes: "{{ lookup('checkmk.general.folder', '~tests') }}" @@ -518,7 +517,9 @@ Return Value
- A list of dicts of attributes of the folder(s) + A dict of attributes of the folder if you query a single folder + + A list of dicts of attributes of the folders if you query multiple folders .. rst-class:: ansible-option-line diff --git a/docs/folder_module.rst b/docs/folder_module.rst index e4b2a3fc8..f66d3efc7 100644 --- a/docs/folder_module.rst +++ b/docs/folder_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.folder module -- Manage folders in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.4.1). + This module is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -536,10 +536,10 @@ Examples # Create a single folder. - name: "Create a single folder." checkmk.general.folder: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" path: "/my_folder" name: "My Folder" state: "present" @@ -547,10 +547,10 @@ Examples # Create a folder who's hosts should be hosted on a remote site. - name: "Create a single folder." checkmk.general.folder: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" path: "/my_remote_folder" name: "My Remote Folder" attributes: @@ -560,10 +560,10 @@ Examples # Create a folder with Criticality set to a Test system and Networking Segment WAN (high latency)" - name: "Create a folder with tag_criticality test and tag_networking wan" checkmk.general.folder: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" path: "/my_remote_folder" attributes: tag_criticality: "test" @@ -573,10 +573,10 @@ Examples # Update only specified attributes - name: "Update only specified attributes" checkmk.general.folder: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" path: "/my_folder" update_attributes: tag_networking: "dmz" @@ -585,10 +585,10 @@ Examples # Remove specified attributes - name: "Remove specified attributes" checkmk.general.folder: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" path: "/my_folder" remove_attributes: - tag_networking diff --git a/docs/folders_lookup.rst b/docs/folders_lookup.rst index aff2e7d96..864c41678 100644 --- a/docs/folders_lookup.rst +++ b/docs/folders_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.folders lookup -- Get various information about a folder .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.4.1). + This lookup plugin is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -543,9 +543,9 @@ Examples show_hosts=False, recursive=True, server_url=my_server_url, - site=my_site, - automation_user=my_user, - automation_secret=my_secret, + site=mysite, + automation_user=myuser, + automation_secret=mysecret, validate_certs=False ) }}" @@ -562,9 +562,9 @@ Examples show_hosts=True, recursive=True, server_url=my_server_url, - site=my_site, - automation_user=my_user, - automation_secret=my_secret, + site=mysite, + automation_user=myuser, + automation_secret=mysecret, validate_certs=False ) }}" @@ -576,10 +576,10 @@ Examples ansible.builtin.debug: msg: "Folder tree: {{ item.id }}" vars: - ansible_lookup_checkmk_server_url: "http://my_server/" - ansible_lookup_checkmk_site: "my_site" - ansible_lookup_checkmk_automation_user: "my_user" - ansible_lookup_checkmk_automation_secret: "my_secret" + ansible_lookup_checkmk_server_url: "http://myserver/" + ansible_lookup_checkmk_site: "mysite" + ansible_lookup_checkmk_automation_user: "myuser" + ansible_lookup_checkmk_automation_secret: "mysecret" ansible_lookup_checkmk_validate_certs: false loop: "{{ lookup('checkmk.general.folders', diff --git a/docs/host_group_module.rst b/docs/host_group_module.rst index cfa71e0c2..f4718e87a 100644 --- a/docs/host_group_module.rst +++ b/docs/host_group_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.host_group module -- Manage host groups in Checkmk (bulk version .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.4.1). + This module is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -460,10 +460,10 @@ Examples # Create a single host group. - name: "Create a single host group." checkmk.general.host_group: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "my_host_group" title: "My Host Group" customer: "provider" @@ -472,10 +472,10 @@ Examples # Create several host groups. - name: "Create several host groups." checkmk.general.host_group: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" customer: "provider" groups: - name: "my_host_group_one" @@ -489,10 +489,10 @@ Examples # Create several host groups. - name: "Create several host groups." checkmk.general.host_group: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" customer: "provider" groups: - name: "my_host_group_one" @@ -504,20 +504,20 @@ Examples # Delete a single host group. - name: "Delete a single host group." checkmk.general.host_group: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "my_host_group" state: "absent" # Delete several host groups. - name: "Delete several host groups." checkmk.general.host_group: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" groups: - name: "my_host_group_one" - name: "my_host_group_two" diff --git a/docs/host_lookup.rst b/docs/host_lookup.rst index c3e861a86..ffc6cae7d 100644 --- a/docs/host_lookup.rst +++ b/docs/host_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.host lookup -- Get host attributes .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.4.1). + This lookup plugin is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -497,9 +497,9 @@ Examples 'example.com', effective_attributes=True, server_url=my_server_url, - site=my_site, - automation_user=my_user, - automation_secret=my_secret, + site=mysite, + automation_user=myuser, + automation_secret=mysecret, validate_certs=False ) }}" @@ -508,10 +508,10 @@ Examples ansible.builtin.debug: msg: "Attributes of host example: {{ attributes }}" vars: - ansible_lookup_checkmk_server_url: "http://my_server/" - ansible_lookup_checkmk_site: "my_site" - ansible_lookup_checkmk_automation_user: "my_user" - ansible_lookup_checkmk_automation_secret: "my_secret" + ansible_lookup_checkmk_server_url: "http://myserver/" + ansible_lookup_checkmk_site: "mysite" + ansible_lookup_checkmk_automation_user: "myuser" + ansible_lookup_checkmk_automation_secret: "mysecret" ansible_lookup_checkmk_validate_certs: false attributes: "{{ lookup('checkmk.general.host', 'example.com', effective_attributes=True) }}" diff --git a/docs/host_module.rst b/docs/host_module.rst index a0a72c970..f8933a80a 100644 --- a/docs/host_module.rst +++ b/docs/host_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.host module -- Manage hosts in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.4.1). + This module is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -634,10 +634,10 @@ Examples # Create a host. - name: "Create a host." checkmk.general.host: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "my_host" folder: "/" state: "present" @@ -645,10 +645,10 @@ Examples # Create a host with IP. - name: "Create a host with IP address." checkmk.general.host: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "my_host" attributes: alias: "My Host" @@ -659,10 +659,10 @@ Examples # Create a host which is monitored on a distinct site. - name: "Create a host which is monitored on a distinct site." checkmk.general.host: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "my_host" attributes: site: "my_remote_site" @@ -672,10 +672,10 @@ Examples # Create a cluster host. - name: "Create a cluster host." checkmk.general.cluster: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "my_cluster_host" folder: "/" nodes: ["cluster_node_1", "cluster_node_2", "cluster_node_3"] @@ -684,10 +684,10 @@ Examples # Create a cluster host with IP. - name: "Create a cluster host with IP address." checkmk.general.cluster: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "my_cluster_host" nodes: - "cluster_node_1" @@ -702,10 +702,10 @@ Examples # Create a host with update_attributes. - name: "Create a host which is monitored on a distinct site." checkmk.general.host: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "my_host" update_attributes: site: "my_remote_site" @@ -714,10 +714,10 @@ Examples # Update only specified attributes - name: "Update only specified attributes" checkmk.general.host: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "my_host" update_attributes: alias: "foo" @@ -726,10 +726,10 @@ Examples # Remove specified attributes - name: "Remove specified attributes" checkmk.general.host: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "my_host" remove_attributes: - alias @@ -738,10 +738,10 @@ Examples # Add custom tags to a host (note the leading 'tag_') - name: "Remove specified attributes" checkmk.general.host: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "my_host" update_attributes: - tag_my_tag_1: "Bar" diff --git a/docs/hosts_lookup.rst b/docs/hosts_lookup.rst index 8e83b29a8..42c038cfe 100644 --- a/docs/hosts_lookup.rst +++ b/docs/hosts_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.hosts lookup -- Get various information about a host .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.4.1). + This lookup plugin is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -439,9 +439,9 @@ Examples lookup('checkmk.general.hosts', effective_attributes=True, server_url=my_server_url, - site=my_site, - automation_user=my_user, - automation_secret=my_secret, + site=mysite, + automation_user=myuser, + automation_secret=mysecret, validate_certs=False ) }}" @@ -452,10 +452,10 @@ Examples ansible.builtin.debug: msg: "Host: {{ item.id }} in folder {{ item.extensions.folder }}, IP: {{ item.extensions.effective_attributes.ipaddress }}" vars: - ansible_lookup_checkmk_server_url: "http://my_server/" - ansible_lookup_checkmk_site: "my_site" - ansible_lookup_checkmk_automation_user: "my_user" - ansible_lookup_checkmk_automation_secret: "my_secret" + ansible_lookup_checkmk_server_url: "http://myserver/" + ansible_lookup_checkmk_site: "mysite" + ansible_lookup_checkmk_automation_user: "myuser" + ansible_lookup_checkmk_automation_secret: "mysecret" ansible_lookup_checkmk_validate_certs: false loop: "{{ lookup('checkmk.general.hosts', effective_attributes=True) }}" diff --git a/docs/index.rst b/docs/index.rst index 85e9793ed..b3e477228 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,7 +1,7 @@ .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. _plugins_in_checkmk.general: @@ -9,7 +9,7 @@ Checkmk.General =============== -Collection version 4.4.1 +Collection version 5.0.0 .. contents:: :local: @@ -29,7 +29,7 @@ The official Checkmk Ansible collection - brought to you by the Checkmk company. **Supported ansible-core versions:** -* 2.12.0 or newer +* 2.14.0 or newer .. ansible-links:: diff --git a/docs/password_module.rst b/docs/password_module.rst index dd49ec3bc..970d886f4 100644 --- a/docs/password_module.rst +++ b/docs/password_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.password module -- Manage passwords in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.4.1). + This module is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -593,10 +593,10 @@ Examples # If passwords are configured, no_log should be set to true. - name: "Create a new password." checkmk.general.password: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "mypassword" title: "My Password" customer: "provider" @@ -611,10 +611,10 @@ Examples no_log: true - name: "Delete a password." checkmk.general.password: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "mypassword" state: "absent" diff --git a/docs/rule_lookup.rst b/docs/rule_lookup.rst index 0dc2c84c5..a957be440 100644 --- a/docs/rule_lookup.rst +++ b/docs/rule_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.rule lookup -- Show a rule .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.4.1). + This lookup plugin is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -442,10 +442,10 @@ Examples ansible.builtin.debug: msg: "Rule: {{ extensions }}" vars: - ansible_lookup_checkmk_server_url: "http://my_server/" - ansible_lookup_checkmk_site: "my_site" - ansible_lookup_checkmk_automation_user: "my_user" - ansible_lookup_checkmk_automation_secret: "my_secret" + ansible_lookup_checkmk_server_url: "http://myserver/" + ansible_lookup_checkmk_site: "mysite" + ansible_lookup_checkmk_automation_user: "myuser" + ansible_lookup_checkmk_automation_secret: "mysecret" ansible_lookup_checkmk_validate_certs: false attributes: "{{ lookup('checkmk.general.rule', rule_id='a9285bc1-dcaf-45e0-a3ba-ad398ef06a49') }}" diff --git a/docs/rule_module.rst b/docs/rule_module.rst index 46cbd71f3..d773bab5d 100644 --- a/docs/rule_module.rst +++ b/docs/rule_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.rule module -- Manage rules in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.4.1). + This module is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -263,8 +263,6 @@ Parameters By default rules are created at the bottom of the "/" folder. - Mutually exclusive with \ :emphasis:`folder`\ . - .. raw:: html @@ -307,11 +305,11 @@ Parameters Folder of the rule. - Required when \ :emphasis:`position`\ is \ :literal:`top`\ or \ :literal:`bottom`\ . + Required when \ :emphasis:`position`\ is \ :literal:`top`\ , \ :literal:`bottom`\ , or (any). Required when \ :emphasis:`state=absent`\ . - Mutually exclusive with \ :emphasis:`rule\_id`\ . + Mutually exclusive with \ :emphasis:`neighbour`\ . .. rst-class:: ansible-option-line @@ -325,24 +323,28 @@ Parameters * - .. raw:: html
-
+
+
.. raw:: latex \hspace{0.04\textwidth}\begin{minipage}[t]{0.28\textwidth} - .. _ansible_collections.checkmk.general.rule_module__parameter-rule/location/position: + .. _ansible_collections.checkmk.general.rule_module__parameter-rule/location/neighbour: + .. _ansible_collections.checkmk.general.rule_module__parameter-rule/location/rule_id: .. rst-class:: ansible-option-title - **position** + **neighbour** .. raw:: html - + .. ansible-option-type-line:: + :ansible-option-aliases:`aliases: rule_id` + :ansible-option-type:`string` .. raw:: html @@ -357,19 +359,11 @@ Parameters
- Position of the rule in the folder. - - Has no effect when \ :emphasis:`state=absent`\ . - - - .. rst-class:: ansible-option-line + Put the rule \ :literal:`before`\ or \ :literal:`after`\ this rule\_id. - :ansible-option-choices:`Choices:` + Required when \ :emphasis:`position`\ is \ :literal:`before`\ or \ :literal:`after`\ . - - :ansible-option-choices-entry:`"top"` - - :ansible-option-choices-entry-default:`"bottom"` :ansible-option-choices-default-mark:`← (default)` - - :ansible-option-choices-entry:`"before"` - - :ansible-option-choices-entry:`"after"` + Mutually exclusive with \ :emphasis:`folder`\ . .. raw:: html @@ -379,21 +373,21 @@ Parameters * - .. raw:: html
-
+
.. raw:: latex \hspace{0.04\textwidth}\begin{minipage}[t]{0.28\textwidth} - .. _ansible_collections.checkmk.general.rule_module__parameter-rule/location/rule_id: + .. _ansible_collections.checkmk.general.rule_module__parameter-rule/location/position: .. rst-class:: ansible-option-title - **rule_id** + **position** .. raw:: html - + .. ansible-option-type-line:: @@ -411,11 +405,22 @@ Parameters
- Put the rule \ :literal:`before`\ or \ :literal:`after`\ this rule\_id. + Position of the rule in the folder. - Required when \ :emphasis:`position`\ is \ :literal:`before`\ or \ :literal:`after`\ . + Has no effect when \ :emphasis:`state=absent`\ . - Mutually exclusive with \ :emphasis:`folder`\ . + For new rule \ :literal:`any`\ wil be equivalent to \ :literal:`bottom`\ + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry:`"top"` + - :ansible-option-choices-entry:`"bottom"` + - :ansible-option-choices-entry-default:`"any"` :ansible-option-choices-default-mark:`← (default)` + - :ansible-option-choices-entry:`"before"` + - :ansible-option-choices-entry:`"after"` .. raw:: html @@ -500,9 +505,11 @@ Parameters
- If given, it will be \ :literal:`the only condition`\ to identify the rule to work on. + If provided, update/delete an existing rule. + + If omitted, we try to find an equal rule based on \ :literal:`properties`\ , \ :literal:`conditions`\ , \ :literal:`folder`\ and \ :literal:`value\_raw`\ . - When there's no rule found with this id, the task will fail. + Please mind the additional notes below. .. raw:: html @@ -546,6 +553,8 @@ Parameters Rule values as exported from the web interface. + Required when \ :emphasis:`state`\ is \ :literal:`present`\ . + .. raw:: html @@ -748,7 +757,8 @@ Notes ----- .. note:: - - To achieve idempotency, this module is comparing the specified rule with the already existing rules based on conditions, folder, value\_raw and enabled/disabled. + - If rule\_id is omitted, due to the internal processing of the \ :literal:`value\_raw`\ , finding the matching rule is not reliable, when \ :literal:`rule\_id`\ is omitted. This sometimes leads to the module not being idempotent or to rules being created over and over again. + - If rule\_id is provided, for the same reason, it might happen, that tasks changing a rule again and again, even if it already meets the expectations. .. Seealso @@ -765,10 +775,10 @@ Examples # at the top of the main folder. - name: "Create a rule in checkgroup_parameters:memory_percentage_used." checkmk.general.rule: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" ruleset: "checkgroup_parameters:memory_percentage_used" rule: conditions: { @@ -783,10 +793,10 @@ Examples "service_labels": [] } properties: { - "comment": "Warning at 80%\nCritical at 90%\n", + "comment": "Ansible managed", "description": "Allow higher memory usage", "disabled": false, - "documentation_url": "https://github.com/Checkmk/ansible-collection-checkmk.general/blob/main/plugins/modules/rules.py" + "documentation_url": "https://github.com/Checkmk/ansible-collection-checkmk.general/blob/main/plugins/modules/rule.py" } value_raw: "{'levels': (80.0, 90.0)}" location: @@ -797,20 +807,47 @@ Examples - name: Show the ID of the new rule ansible.builtin.debug: - msg: "RULE ID : {{ response.id }}" + msg: "RULE ID : {{ response.content.id }}" - # Create another rule in checkgroup_parameters:memory_percentage_used - # and put it after the rule created above. + # Create another rule with the new label conditions (> 2.3.0) + # in checkgroup_parameters:memory_percentage_used and put it after the rule created above. - name: "Create a rule in checkgroup_parameters:memory_percentage_used." checkmk.general.rule: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" ruleset: "checkgroup_parameters:memory_percentage_used" rule: conditions: { - "host_labels": [], + "host_label_groups": [ + { + operator: "and", + label_group: [ + { + operator: "and", + label: "cmk/site:beta" + }, + { + operator: "or", + label: "cmk/os_family:linux" + } + ], + }, + { + operator: "or", + label_group: [ + { + operator: "and", + label: "cmk/site:alpha" + }, + { + operator: "or", + label: "cmk/os_family:windows" + } + ], + }, + ], "host_name": { "match_on": [ "test2.tld" @@ -821,53 +858,36 @@ Examples "service_labels": [] } properties: { - "comment": "Warning at 85%\nCritical at 99%\n", + "comment": "Ansible managed", "description": "Allow even higher memory usage", "disabled": false, - "documentation_url": "https://github.com/Checkmk/ansible-collection-checkmk.general/blob/main/plugins/modules/rules.py" + "documentation_url": "https://github.com/Checkmk/ansible-collection-checkmk.general/blob/main/plugins/modules/rule.py" } value_raw: "{'levels': (85.0, 99.0)}" location: position: "after" - rule_id: "{{ response.id }}" + neighbour: "{{ response.content.id }}" state: "present" # Delete the first rule. - name: "Delete a rule." checkmk.general.rule: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" ruleset: "checkgroup_parameters:memory_percentage_used" rule: - conditions: { - "host_labels": [], - "host_name": { - "match_on": [ - "test1.tld" - ], - "operator": "one_of" - }, - "host_tags": [], - "service_labels": [] - } - properties: { - "comment": "Warning at 80%\nCritical at 90%\n", - "description": "Allow higher memory usage", - "disabled": false, - "documentation_url": "https://github.com/Checkmk/ansible-collection-checkmk.general/blob/main/plugins/modules/rules.py" - } - value_raw: "{'levels': (80.0, 90.0)}" + rule_id: "{{ response.content.id }}" state: "absent" # Create a rule rule matching a host label - name: "Create a rule matching a label." checkmk.general.rule: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" ruleset: "checkgroup_parameters:memory_percentage_used" rule: conditions: { @@ -878,15 +898,12 @@ Examples "value": "yes" } ], - "host_name": {}, - "host_tags": [], - "service_labels": [] } properties: { - "comment": "Warning at 80%\nCritical at 90%\n", + "comment": "Ansible managed", "description": "Allow higher memory usage", "disabled": false, - "documentation_url": "https://github.com/Checkmk/ansible-collection-checkmk.general/blob/main/plugins/modules/rules.py" + "documentation_url": "https://github.com/Checkmk/ansible-collection-checkmk.general/blob/main/plugins/modules/rule.py" } value_raw: "{'levels': (80.0, 90.0)}" location: @@ -894,6 +911,31 @@ Examples position: "top" state: "present" + # Delete all rules in a ruleset that match a certain comment. + - name: "Delete all rules in a ruleset that match a certain comment." + checkmk.general.rule: + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" + ruleset: "checkgroup_parameters:memory_percentage_used" + rule: + rule_id: "{{ item.id }}" + state: "absent" + loop: "{{ + lookup('checkmk.general.rules', + ruleset='checkgroup_parameters:memory_percentage_used', + comment_regex='Ansible managed', + server_url=server_url, + site=site, + automation_user=automation_user, + automation_secret=automation_secret, + validate_certs=False + ) + }}" + loop_control: + label: "{{ item.id }}" + @@ -920,9 +962,390 @@ Common return values are documented :ref:`here `, the foll * - .. raw:: html
-
+
+ + .. _ansible_collections.checkmk.general.rule_module__return-content: + + .. rst-class:: ansible-option-title + + **content** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The complete created/changed rule + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` when the rule is created or when it already exists + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.checkmk.general.rule_module__return-content/extensions: + + .. rst-class:: ansible-option-title + + **extensions** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`dictionary` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The attributes of the rule + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` when the rule is created or when it already exists + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.04\textwidth}\begin{minipage}[t]{0.28\textwidth} + + .. _ansible_collections.checkmk.general.rule_module__return-content/extensions/conditions: + + .. rst-class:: ansible-option-title + + **conditions** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The contitions of the rule. + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` when the rule is created or when it already exists + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.04\textwidth}\begin{minipage}[t]{0.28\textwidth} + + .. _ansible_collections.checkmk.general.rule_module__return-content/extensions/folder: + + .. rst-class:: ansible-option-title + + **folder** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The folder of the rule. + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` when the rule is created or when it already exists + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.04\textwidth}\begin{minipage}[t]{0.28\textwidth} + + .. _ansible_collections.checkmk.general.rule_module__return-content/extensions/folder_index: + + .. rst-class:: ansible-option-title + + **folder_index** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The index of the rule inside the folder. + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` when the rule is created or when it already exists + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.04\textwidth}\begin{minipage}[t]{0.28\textwidth} + + .. _ansible_collections.checkmk.general.rule_module__return-content/extensions/properties: + + .. rst-class:: ansible-option-title + + **properties** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The properties of the rule. + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` when the rule is created or when it already exists + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.04\textwidth}\begin{minipage}[t]{0.28\textwidth} + + .. _ansible_collections.checkmk.general.rule_module__return-content/extensions/ruleset: + + .. rst-class:: ansible-option-title + + **ruleset** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The ruleset of the rule. + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` when the rule is created or when it already exists + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.04\textwidth}\begin{minipage}[t]{0.28\textwidth} + + .. _ansible_collections.checkmk.general.rule_module__return-content/extensions/value_raw: + + .. rst-class:: ansible-option-title + + **value_raw** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + The actual value of the rule + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` when the rule is created or when it already exists + + + .. raw:: html + +
+ - .. _ansible_collections.checkmk.general.rule_module__return-id: + + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.checkmk.general.rule_module__return-content/id: .. rst-class:: ansible-option-title @@ -930,7 +1353,7 @@ Common return values are documented :ref:`here `, the foll .. raw:: html - + .. ansible-option-type-line:: @@ -940,9 +1363,13 @@ Common return values are documented :ref:`here `, the foll
+ .. raw:: latex + + \end{minipage} + - .. raw:: html -
+
The ID of the rule. @@ -962,6 +1389,97 @@ Common return values are documented :ref:`here `, the foll
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.checkmk.general.rule_module__return-etag: + + .. rst-class:: ansible-option-title + + **etag** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The etag of the rule. + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` when the rule is created or when it already exists + + .. rst-class:: ansible-option-line + .. rst-class:: ansible-option-sample + + :ansible-option-sample-bold:`Sample:` :ansible-rv-sample-value:`"\\"ad55730d5488e55e07c58a3da9759fba8cd0b009\\""` + + + .. raw:: html + +
+ + + * - .. raw:: html + +
+
+ + .. _ansible_collections.checkmk.general.rule_module__return-http_code: + + .. rst-class:: ansible-option-title + + **http_code** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`integer` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + The HTTP code the Checkmk API returns. + + + .. rst-class:: ansible-option-line + + :ansible-option-returned-bold:`Returned:` always + + .. rst-class:: ansible-option-line + .. rst-class:: ansible-option-sample + + :ansible-option-sample-bold:`Sample:` :ansible-rv-sample-value:`200` + + + .. raw:: html + +
+ + * - .. raw:: html
@@ -1016,8 +1534,10 @@ Common return values are documented :ref:`here `, the foll Authors ~~~~~~~ +- Lars Getwan (@lgetwan) - diademiemi (@diademiemi) - Geoffroy Stévenne (@geof77) +- Michael Sekania (@msekania) diff --git a/docs/rules_lookup.rst b/docs/rules_lookup.rst index c02bd3a0c..b51e7300b 100644 --- a/docs/rules_lookup.rst +++ b/docs/rules_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.rules lookup -- Get a list rules .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.4.1). + This lookup plugin is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -220,7 +220,7 @@ examples: ``lookup('checkmk.general.rules', key1=value1, key2=value2, ...)`` and
- A regex to filter for certain comment stings. + A regex to filter for certain comment strings. .. rst-class:: ansible-option-line @@ -264,6 +264,47 @@ examples: ``lookup('checkmk.general.rules', key1=value1, key2=value2, ...)`` and A regex to filter for certain descriptions. + .. rst-class:: ansible-option-line + + :ansible-option-default-bold:`Default:` :ansible-option-default:`""` + + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.checkmk.general.rules_lookup__parameter-folder_regex: + + .. rst-class:: ansible-option-title + + **folder_regex** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + + + + .. raw:: html + +
+ + - .. raw:: html + +
+ + A regex to filter for certain folders. + + .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`""` @@ -521,6 +562,23 @@ Examples loop_control: label: "{{ item.id }}" + - name: Get all rules of the ruleset host_groups in folder /test + ansible.builtin.debug: + msg: "Rule: {{ item.extensions }}" + loop: "{{ + lookup('checkmk.general.rules', + ruleset='host_groups', + regex_folder='^/test$', + server_url=server_url, + site=site, + automation_user=automation_user, + automation_secret=automation_secret, + validate_certs=False + ) + }}" + loop_control: + label: "{{ item.id }}" + - name: actice_checks:http rules that match a certain description AND comment ansible.builtin.debug: msg: "Rule: {{ item.extensions }}" @@ -543,10 +601,10 @@ Examples ansible.builtin.debug: msg: "Rule: {{ item.extensions }}" vars: - ansible_lookup_checkmk_server_url: "http://my_server/" - ansible_lookup_checkmk_site: "my_site" - ansible_lookup_checkmk_automation_user: "my_user" - ansible_lookup_checkmk_automation_secret: "my_secret" + ansible_lookup_checkmk_server_url: "http://myserver/" + ansible_lookup_checkmk_site: "mysite" + ansible_lookup_checkmk_automation_user: "myuser" + ansible_lookup_checkmk_automation_secret: "mysecret" ansible_lookup_checkmk_validate_certs: false loop: "{{ lookup('checkmk.general.rules', ruleset='host_groups') }}" diff --git a/docs/ruleset_lookup.rst b/docs/ruleset_lookup.rst index f38a6c287..ef670b0cc 100644 --- a/docs/ruleset_lookup.rst +++ b/docs/ruleset_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.ruleset lookup -- Show a ruleset .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.4.1). + This lookup plugin is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -442,10 +442,10 @@ Examples ansible.builtin.debug: msg: "Ruleset: {{ extensions }}" vars: - ansible_lookup_checkmk_server_url: "http://my_server/" - ansible_lookup_checkmk_site: "my_site" - ansible_lookup_checkmk_automation_user: "my_user" - ansible_lookup_checkmk_automation_secret: "my_secret" + ansible_lookup_checkmk_server_url: "http://myserver/" + ansible_lookup_checkmk_site: "mysite" + ansible_lookup_checkmk_automation_user: "myuser" + ansible_lookup_checkmk_automation_secret: "mysecret" ansible_lookup_checkmk_validate_certs: false extensions: "{{ lookup('checkmk.general.ruleset', ruleset='host_groups') }}" diff --git a/docs/rulesets_lookup.rst b/docs/rulesets_lookup.rst index 75fceb231..1629b089f 100644 --- a/docs/rulesets_lookup.rst +++ b/docs/rulesets_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.rulesets lookup -- Search rulesets .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.4.1). + This lookup plugin is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -595,10 +595,10 @@ Examples ansible.builtin.debug: msg: "Ruleset {{ item.extension.name }} is deprecated." vars: - ansible_lookup_checkmk_server_url: "http://my_server/" - ansible_lookup_checkmk_site: "my_site" - ansible_lookup_checkmk_automation_user: "my_user" - ansible_lookup_checkmk_automation_secret: "my_secret" + ansible_lookup_checkmk_server_url: "http://myserver/" + ansible_lookup_checkmk_site: "mysite" + ansible_lookup_checkmk_automation_user: "myuser" + ansible_lookup_checkmk_automation_secret: "mysecret" ansible_lookup_checkmk_validate_certs: false loop: "{{ lookup('checkmk.general.rulesets', regex='', rulesets_deprecated=True, rulesets_used=True) }}" diff --git a/docs/service_group_module.rst b/docs/service_group_module.rst index beeff8dac..6ccabee34 100644 --- a/docs/service_group_module.rst +++ b/docs/service_group_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.service_group module -- Manage service groups in Checkmk (bulk v .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.4.1). + This module is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -460,10 +460,10 @@ Examples # Create a single service group. - name: "Create a single service group." checkmk.general.service_group: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "my_service_group" title: "My Service Group" customer: "provider" @@ -472,10 +472,10 @@ Examples # Create several service groups. - name: "Create several service groups." checkmk.general.service_group: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" customer: "provider" groups: - name: "my_service_group_one" @@ -489,10 +489,10 @@ Examples # Create several service groups. - name: "Create several service groups." checkmk.general.service_group: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" customer: "provider" groups: - name: "my_service_group_one" @@ -504,20 +504,20 @@ Examples # Delete a single service group. - name: "Create a single service group." checkmk.general.service_group: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "my_service_group" state: "absent" # Delete several service groups. - name: "Delete several service groups." checkmk.general.service_group: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" groups: - name: "my_service_group_one" - name: "my_service_group_two" diff --git a/docs/tag_group_module.rst b/docs/tag_group_module.rst index 7787df47e..1c684d86b 100644 --- a/docs/tag_group_module.rst +++ b/docs/tag_group_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.tag_group module -- Manage tag groups in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.4.1). + This module is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -645,10 +645,10 @@ Examples # Create a tag group - name: "Create tag group" checkmk.general.tag_group: - server_url: "https://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "https://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: datacenter title: Datacenter topic: Tags @@ -667,10 +667,10 @@ Examples # Delete a tag group - name: "Delete tag group." checkmk.general.tag_group: - server_url: "https://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "https://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: datacenter state: "absent" diff --git a/docs/timeperiod_module.rst b/docs/timeperiod_module.rst index 91d42024a..2ca50588e 100644 --- a/docs/timeperiod_module.rst +++ b/docs/timeperiod_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.timeperiod module -- Manage time periods in checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.4.1). + This module is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -490,10 +490,10 @@ Examples # Creating and Updating is the same. - name: "Create a new time period. (Attributes in one line)" checkmk.general.timeperiod: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "worktime" alias: "Worktime" active_time_ranges: '[{"day": "all", "time_ranges": [{"start": "09:00:00", "end": "17:00:00"}]}]' @@ -503,10 +503,10 @@ Examples - name: "Create a new time period. (Attributes in multiple lines)" checkmk.general.timeperiod: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "worktime" alias: "Worktime" active_time_ranges: [ @@ -538,10 +538,10 @@ Examples - name: "Delete a time period." checkmk.general.timeperiod: - server_url: "http://my_server/" - site: "my_site" - automation_user: "my_user" - automation_secret: "my_secret" + server_url: "http://myserver/" + site: "mysite" + automation_user: "myuser" + automation_secret: "mysecret" name: "worktime" state: "absent" diff --git a/docs/user_module.rst b/docs/user_module.rst index 5a4116307..2f3ca9fe2 100644 --- a/docs/user_module.rst +++ b/docs/user_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.user module -- Manage users in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.4.1). + This module is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -1208,10 +1208,10 @@ Examples # Create a user. - name: "Create a user." checkmk.general.user: - server_url: "http://my_server/" + server_url: "http://myserver/" site: "local" - automation_user: "my_user" - automation_secret: "my_secret" + automation_user: "myuser" + automation_secret: "mysecret" name: "krichards" fullname: "Keith Richards" email: "keith.richards@rollingstones.com" @@ -1225,10 +1225,10 @@ Examples # Create an automation user. - name: "Create an automation user." checkmk.general.user: - server_url: "http://my_server/" + server_url: "http://myserver/" site: "local" - automation_user: "my_user" - automation_secret: "my_secret" + automation_user: "myuser" + automation_secret: "mysecret" name: "registration" fullname: "Registration User" auth_type: "automation" @@ -1240,10 +1240,10 @@ Examples # Create a user with the Checkmk Managed Edition (CME), using the `customer` parameter. - name: "Create a user." checkmk.general.user: - server_url: "http://my_server/" + server_url: "http://myserver/" site: "local" - automation_user: "my_user" - automation_secret: "my_secret" + automation_user: "myuser" + automation_secret: "mysecret" name: "krichards" fullname: "Keith Richards" email: "keith.richards@rollingstones.com" @@ -1258,10 +1258,10 @@ Examples # Create a detailed user. - name: "Create a more complex user." checkmk.general.user: - server_url: "http://my_server/" + server_url: "http://myserver/" site: "local" - automation_user: "my_user" - automation_secret: "my_secret" + automation_user: "myuser" + automation_secret: "mysecret" name: "horst" fullname: "Horst Schlämmer" customer: "provider" @@ -1281,7 +1281,7 @@ Examples roles: - "user" authorized_sites: - - "{{ my_site }}" + - "{{ mysite }}" interface_theme: "dark" sidebar_position: "right" navigation_bar_icons: "show" diff --git a/docs/version_lookup.rst b/docs/version_lookup.rst index a09fed791..a4f3cdb49 100644 --- a/docs/version_lookup.rst +++ b/docs/version_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.10.0 + :antsibull-docs: 2.11.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.version lookup -- Get the version of a Checkmk server .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.4.1). + This lookup plugin is part of the `checkmk.general collection `_ (version 5.0.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -392,20 +392,20 @@ Examples vars: version: "{{ lookup('checkmk.general.version', server_url=my_url, - site=my_site, + site=mysite, validate_certs=False, - automation_user=my_user, - automation_secret=my_secret + automation_user=myuser, + automation_secret=mysecret )}}" - name: "Use variables outside the module call." ansible.builtin.debug: msg: "Server version is {{ version }}" vars: - ansible_lookup_checkmk_server_url: "http://my_server/" - ansible_lookup_checkmk_site: "my_site" - ansible_lookup_checkmk_automation_user: "my_user" - ansible_lookup_checkmk_automation_secret: "my_secret" + ansible_lookup_checkmk_server_url: "http://myserver/" + ansible_lookup_checkmk_site: "mysite" + ansible_lookup_checkmk_automation_user: "myuser" + ansible_lookup_checkmk_automation_secret: "mysecret" ansible_lookup_checkmk_validate_certs: false attributes: "{{ lookup('checkmk.general.version') }}" diff --git a/galaxy.yml b/galaxy.yml index 994bb2fb2..e9b440a07 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -10,7 +10,7 @@ name: general # The version of the collection. Must be compatible with semantic versioning -version: 5.0.0 +version: 5.1.0 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md diff --git a/playbooks/usecases/remote-registration.yml b/playbooks/usecases/remote-registration.yml index c034127f3..3c6c47aad 100644 --- a/playbooks/usecases/remote-registration.yml +++ b/playbooks/usecases/remote-registration.yml @@ -9,7 +9,7 @@ vars: # Basic server and authentication information. # You have to provide the distributed setup yourself. - checkmk_agent_version: "2.2.0p7" + checkmk_agent_version: "2.3.0p6" checkmk_agent_edition: "cre" checkmk_agent_user: "cmkadmin" checkmk_agent_pass: "password" diff --git a/playbooks/vars/auth.yml b/playbooks/vars/auth.yml index a05674090..9862a9eca 100644 --- a/playbooks/vars/auth.yml +++ b/playbooks/vars/auth.yml @@ -7,7 +7,7 @@ checkmk_var_automation_secret: "mysecret" checkmk_agent_user: "{{ checkmk_var_automation_user }}" checkmk_agent_pass: "{{ checkmk_var_automation_secret }}" -checkmk_var_version: "2.2.0b4" +checkmk_var_version: "2.3.0p6" checkmk_var_edition: "cre" ############################################################# diff --git a/plugins/lookup/README.md b/plugins/lookup/README.md index 9cbd28b34..d9599ff19 100644 --- a/plugins/lookup/README.md +++ b/plugins/lookup/README.md @@ -8,9 +8,9 @@ This way, they do not need to be provided at task level. ```bash export ANSIBLE_LOOKUP_CHECKMK_SERVER_URL="https://myserver" export ANSIBLE_LOOKUP_CHECKMK_SITE=mysite -export ANSIBLE_LOOKUP_AUTOMATION_USER=automation -export ANSIBLE_LOOKUP_AUTOMATION_SECRET=mysecret -export ANSIBLE_LOOKUP_VALIDATE_CERTS=False +export ANSIBLE_LOOKUP_CHECKMK_AUTOMATION_USER=automation +export ANSIBLE_LOOKUP_CHECKMK_AUTOMATION_SECRET=mysecret +export ANSIBLE_LOOKUP_CHECKMK_VALIDATE_CERTS=False ``` ### Method 2: In `ansible.cfg` @@ -31,10 +31,10 @@ validate_certs = False gather_facts: false vars: ansible_lookup_checkmk_server_url: "https://myserver" - ansible_lookup_checkmk_site: "mysite" - ansible_lookup_automation_user: "automation" - ansible_lookup_automation_secret: "mysecret" - ansible_lookup_validate_certs: false + ansible_lookup_checkmk_site: "mysite" + ansible_lookup_checkmk_automation_user: "automation" + ansible_lookup_checkmk_automation_secret: "mysecret" + ansible_lookup_checkmk_validate_certs: false tasks: - name: Get the attributes of myhost diff --git a/plugins/lookup/folders.py b/plugins/lookup/folders.py index a021d0bba..b56285353 100644 --- a/plugins/lookup/folders.py +++ b/plugins/lookup/folders.py @@ -117,7 +117,7 @@ ) }}" loop_control: - label: "{{ item.id }}" + label: "{{ item.id }}" - name: Get all hosts of the folder /test recursively ansible.builtin.debug: @@ -137,7 +137,7 @@ }}" loop: "{{ looping|subelements('members.hosts.value') }}" loop_control: - label: "{{ item.0.id }}" + label: "{{ item.0.id }}" - name: "Use variables outside the module call." ansible.builtin.debug: @@ -155,7 +155,7 @@ recursive=True, ) }}" loop_control: - label: "{{ item.id }}" + label: "{{ item.id }}" """ RETURN = """ diff --git a/plugins/lookup/rules.py b/plugins/lookup/rules.py index 4d9e9267f..4709d092b 100644 --- a/plugins/lookup/rules.py +++ b/plugins/lookup/rules.py @@ -117,7 +117,7 @@ ) }}" loop_control: - label: "{{ item.id }}" + label: "{{ item.id }}" - name: Get all rules of the ruleset host_groups in folder /test ansible.builtin.debug: @@ -134,7 +134,7 @@ ) }}" loop_control: - label: "{{ item.id }}" + label: "{{ item.id }}" - name: actice_checks:http rules that match a certain description AND comment ansible.builtin.debug: @@ -152,7 +152,7 @@ ) }}" loop_control: - label: "{{ item.id }}" + label: "{{ item.id }}" - name: "Use variables outside the module call." ansible.builtin.debug: @@ -166,7 +166,7 @@ loop: "{{ lookup('checkmk.general.rules', ruleset='host_groups') }}" loop_control: - label: "{{ item.id }}" + label: "{{ item.id }}" """ RETURN = """ diff --git a/plugins/lookup/rulesets.py b/plugins/lookup/rulesets.py index 55090488e..c86ded875 100644 --- a/plugins/lookup/rulesets.py +++ b/plugins/lookup/rulesets.py @@ -122,7 +122,7 @@ ) }}" loop_control: - label: "{{ item.id }}" + label: "{{ item.id }}" - name: Get all used deprecated rulesets ansible.builtin.debug: @@ -140,7 +140,7 @@ ) }}" loop_control: - label: "{{ item.0.id }}" + label: "{{ item.0.id }}" - name: "Use variables outside the module call." ansible.builtin.debug: @@ -154,7 +154,7 @@ loop: "{{ lookup('checkmk.general.rulesets', regex='', rulesets_deprecated=True, rulesets_used=True) }}" loop_control: - label: "{{ item.0.id }}" + label: "{{ item.0.id }}" """ RETURN = """ diff --git a/plugins/modules/rule.py b/plugins/modules/rule.py index 3b37852d1..28f732a82 100644 --- a/plugins/modules/rule.py +++ b/plugins/modules/rule.py @@ -155,32 +155,32 @@ rule: conditions: { "host_label_groups": [ - { + { + operator: "and", + label_group: [ + { + operator: "and", + label: "cmk/site:beta" + }, + { + operator: "or", + label: "cmk/os_family:linux" + } + ], + }, + { + operator: "or", + label_group: [ + { operator: "and", - label_group: [ - { - operator: "and", - label: "cmk/site:beta" - }, - { - operator: "or", - label: "cmk/os_family:linux" - } - ], - }, - { + label: "cmk/site:alpha" + }, + { operator: "or", - label_group: [ - { - operator: "and", - label: "cmk/site:alpha" - }, - { - operator: "or", - label: "cmk/os_family:windows" - } - ], - }, + label: "cmk/os_family:windows" + } + ], + }, ], "host_name": { "match_on": [ diff --git a/plugins/modules/user.py b/plugins/modules/user.py index d9d3fe9c7..61254edfd 100644 --- a/plugins/modules/user.py +++ b/plugins/modules/user.py @@ -197,13 +197,13 @@ password: "uschi" enforce_password_change: true email: "checker@grevenbroich.de" - fallback_contact: True + fallback_contact: true pager: 089-123456789 contactgroups: - "sport" - "vereinsgeschehen" - "lokalpolitik" - disable_notifications: True + disable_notifications: true disable_notifications_timerange: { "start_time": "2023-02-23T15:06:48+00:00", "end_time": "2023-02-23T16:06:48+00:00"} language: "de" roles: diff --git a/requirements.txt b/requirements.txt index b838767ab..85ae18cb5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,4 @@ molecule >= 5.0.1 molecule-plugins[docker] yamllint pywinrm -netaddr \ No newline at end of file +netaddr diff --git a/roles/agent/README.md b/roles/agent/README.md index 279641e59..9e0e8f228 100644 --- a/roles/agent/README.md +++ b/roles/agent/README.md @@ -16,7 +16,7 @@ Please make sure it is installed on your system and available for Ansible. ## Role Variables - checkmk_agent_version: "2.3.0p5" + checkmk_agent_version: "2.3.0p6" The Checkmk version of the site your agents will talk to. diff --git a/roles/agent/defaults/main.yml b/roles/agent/defaults/main.yml index 950b35e94..f9f349d4c 100644 --- a/roles/agent/defaults/main.yml +++ b/roles/agent/defaults/main.yml @@ -1,5 +1,5 @@ --- -checkmk_agent_version: "2.3.0p5" +checkmk_agent_version: "2.3.0p6" checkmk_agent_edition: cre checkmk_agent_server_protocol: http checkmk_agent_server: localhost diff --git a/roles/agent/molecule/2.3.0/group_vars/all.yml b/roles/agent/molecule/2.3.0/group_vars/all.yml index 11a82eb53..41080d2f3 100644 --- a/roles/agent/molecule/2.3.0/group_vars/all.yml +++ b/roles/agent/molecule/2.3.0/group_vars/all.yml @@ -1,6 +1,6 @@ --- # General -checkmk_var_version: "2.3.0p5" +checkmk_var_version: "2.3.0p6" checkmk_var_edition: "cre" checkmk_var_checkmk_site: "mysite" checkmk_var_automation_user: "cmkadmin" diff --git a/roles/server/README.md b/roles/server/README.md index eee968357..91d963a6f 100644 --- a/roles/server/README.md +++ b/roles/server/README.md @@ -25,7 +25,7 @@ To learn about the distributions used in automated tests, inspect the correspond ## Role Variables - checkmk_server_version: "2.3.0p5" + checkmk_server_version: "2.3.0p6" The global Checkmk version. This is used for installing Checkmk. To manage sites and their version, see `checkmk_server_sites`. diff --git a/roles/server/defaults/main.yml b/roles/server/defaults/main.yml index d28f50157..8e8dd4694 100644 --- a/roles/server/defaults/main.yml +++ b/roles/server/defaults/main.yml @@ -25,7 +25,7 @@ checkmk_server_server_stable_os: - Ubuntu-22 - Ubuntu-24 -checkmk_server_version: "2.3.0p5" +checkmk_server_version: "2.3.0p6" checkmk_server_edition: cre checkmk_server_verify_setup: 'true' diff --git a/roles/server/molecule/2.3.0/group_vars/all.yml b/roles/server/molecule/2.3.0/group_vars/all.yml index e2459864d..6e1d82d7c 100644 --- a/roles/server/molecule/2.3.0/group_vars/all.yml +++ b/roles/server/molecule/2.3.0/group_vars/all.yml @@ -1,6 +1,6 @@ --- # General -checkmk_var_version: "2.3.0p5" +checkmk_var_version: "2.3.0p6" checkmk_var_edition: "cre" checkmk_server_verify_setup: 'true' checkmk_var_server_url: "http://127.0.0.1/" diff --git a/scripts/release.sh b/scripts/release.sh index bd5ae53ac..a24a26981 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -17,7 +17,7 @@ collection_dir="${script_dir%/*}" # Update these as necessary: checkmk_ancient="2.1.0p44" checkmk_oldstable="2.2.0p27" -checkmk_stable="2.3.0p5" +checkmk_stable="2.3.0p6" while getopts 's:t:' OPTION; do case "$OPTION" in diff --git a/tests/integration/files/includes/tasks/prep.yml b/tests/integration/files/includes/tasks/prep.yml index a53ee1f8a..018511bd2 100644 --- a/tests/integration/files/includes/tasks/prep.yml +++ b/tests/integration/files/includes/tasks/prep.yml @@ -1,4 +1,8 @@ --- +- name: "Print OS Information." + ansible.builtin.debug: + var: ansible_lsb + - name: "Install dependencies." ansible.builtin.package: name: python3-apt diff --git a/tests/integration/targets/activation/vars/main.yml b/tests/integration/targets/activation/vars/main.yml index 1fd76dde8..f585e889e 100644 --- a/tests/integration/targets/activation/vars/main.yml +++ b/tests/integration/targets/activation/vars/main.yml @@ -1,9 +1,9 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - version: "2.2.0p27" diff --git a/tests/integration/targets/bakery/vars/main.yml b/tests/integration/targets/bakery/vars/main.yml index 9b1d69f8c..65d28d84d 100644 --- a/tests/integration/targets/bakery/vars/main.yml +++ b/tests/integration/targets/bakery/vars/main.yml @@ -1,6 +1,6 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - version: "2.2.0p27" diff --git a/tests/integration/targets/contact_group/vars/main.yml b/tests/integration/targets/contact_group/vars/main.yml index 9af32b735..f3b26a152 100644 --- a/tests/integration/targets/contact_group/vars/main.yml +++ b/tests/integration/targets/contact_group/vars/main.yml @@ -1,12 +1,12 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cme" site: "stable_cme" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/integration/targets/discovery/vars/main.yml b/tests/integration/targets/discovery/vars/main.yml index b3b03d38a..cf9fd712b 100644 --- a/tests/integration/targets/discovery/vars/main.yml +++ b/tests/integration/targets/discovery/vars/main.yml @@ -1,9 +1,9 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/integration/targets/downtime/vars/main.yml b/tests/integration/targets/downtime/vars/main.yml index 8c4301d99..60278d3e9 100644 --- a/tests/integration/targets/downtime/vars/main.yml +++ b/tests/integration/targets/downtime/vars/main.yml @@ -1,9 +1,9 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/integration/targets/folder/vars/main.yml b/tests/integration/targets/folder/vars/main.yml index 8b611a37e..dc80836a0 100644 --- a/tests/integration/targets/folder/vars/main.yml +++ b/tests/integration/targets/folder/vars/main.yml @@ -1,9 +1,9 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/integration/targets/host/vars/main.yml b/tests/integration/targets/host/vars/main.yml index db80bc402..6fdccf09b 100644 --- a/tests/integration/targets/host/vars/main.yml +++ b/tests/integration/targets/host/vars/main.yml @@ -1,9 +1,9 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - version: "2.2.0p27" diff --git a/tests/integration/targets/host_group/vars/main.yml b/tests/integration/targets/host_group/vars/main.yml index 780d6adcf..b8637d994 100644 --- a/tests/integration/targets/host_group/vars/main.yml +++ b/tests/integration/targets/host_group/vars/main.yml @@ -1,12 +1,12 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cme" site: "stable_cme" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/integration/targets/lookup_bakery/vars/main.yml b/tests/integration/targets/lookup_bakery/vars/main.yml index d11082443..026c1ed7b 100644 --- a/tests/integration/targets/lookup_bakery/vars/main.yml +++ b/tests/integration/targets/lookup_bakery/vars/main.yml @@ -1,6 +1,6 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - version: "2.2.0p27" diff --git a/tests/integration/targets/lookup_folder/vars/main.yml b/tests/integration/targets/lookup_folder/vars/main.yml index 62c0680a6..3004bbd80 100644 --- a/tests/integration/targets/lookup_folder/vars/main.yml +++ b/tests/integration/targets/lookup_folder/vars/main.yml @@ -1,9 +1,9 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/integration/targets/lookup_folders/vars/main.yml b/tests/integration/targets/lookup_folders/vars/main.yml index c747dd8de..eef6aa50c 100644 --- a/tests/integration/targets/lookup_folders/vars/main.yml +++ b/tests/integration/targets/lookup_folders/vars/main.yml @@ -1,9 +1,9 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/integration/targets/lookup_host/vars/main.yml b/tests/integration/targets/lookup_host/vars/main.yml index b88415831..3710a8605 100644 --- a/tests/integration/targets/lookup_host/vars/main.yml +++ b/tests/integration/targets/lookup_host/vars/main.yml @@ -1,9 +1,9 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/integration/targets/lookup_hosts/vars/main.yml b/tests/integration/targets/lookup_hosts/vars/main.yml index 117af9770..9d367306c 100644 --- a/tests/integration/targets/lookup_hosts/vars/main.yml +++ b/tests/integration/targets/lookup_hosts/vars/main.yml @@ -1,9 +1,9 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/integration/targets/lookup_rules/vars/main.yml b/tests/integration/targets/lookup_rules/vars/main.yml index f7aa3234c..a932e9f9a 100644 --- a/tests/integration/targets/lookup_rules/vars/main.yml +++ b/tests/integration/targets/lookup_rules/vars/main.yml @@ -1,9 +1,9 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/integration/targets/lookup_rulesets/vars/main.yml b/tests/integration/targets/lookup_rulesets/vars/main.yml index 51efe5775..924edaa8c 100644 --- a/tests/integration/targets/lookup_rulesets/vars/main.yml +++ b/tests/integration/targets/lookup_rulesets/vars/main.yml @@ -1,9 +1,9 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/integration/targets/lookup_version/vars/main.yml b/tests/integration/targets/lookup_version/vars/main.yml index 2f18253b6..fd56236b1 100644 --- a/tests/integration/targets/lookup_version/vars/main.yml +++ b/tests/integration/targets/lookup_version/vars/main.yml @@ -1,9 +1,9 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/integration/targets/password/vars/main.yml b/tests/integration/targets/password/vars/main.yml index 93100f1dc..b3705976f 100644 --- a/tests/integration/targets/password/vars/main.yml +++ b/tests/integration/targets/password/vars/main.yml @@ -1,12 +1,12 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cme" site: "stable_cme" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/integration/targets/rule/vars/main.yml b/tests/integration/targets/rule/vars/main.yml index 2f18253b6..fd56236b1 100644 --- a/tests/integration/targets/rule/vars/main.yml +++ b/tests/integration/targets/rule/vars/main.yml @@ -1,9 +1,9 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/integration/targets/service_group/vars/main.yml b/tests/integration/targets/service_group/vars/main.yml index 62ebec255..b74bb4b76 100644 --- a/tests/integration/targets/service_group/vars/main.yml +++ b/tests/integration/targets/service_group/vars/main.yml @@ -1,12 +1,12 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cme" site: "stable_cme" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/integration/targets/tag_group/vars/main.yml b/tests/integration/targets/tag_group/vars/main.yml index 9e46f3e48..2f5862d44 100644 --- a/tests/integration/targets/tag_group/vars/main.yml +++ b/tests/integration/targets/tag_group/vars/main.yml @@ -1,12 +1,12 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cme" site: "stable_cme" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/integration/targets/timeperiod/vars/main.yml b/tests/integration/targets/timeperiod/vars/main.yml index 566913f02..06bcf065c 100644 --- a/tests/integration/targets/timeperiod/vars/main.yml +++ b/tests/integration/targets/timeperiod/vars/main.yml @@ -1,9 +1,9 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/integration/targets/user/vars/main.yml b/tests/integration/targets/user/vars/main.yml index c3db47f91..6bf4e6fd8 100644 --- a/tests/integration/targets/user/vars/main.yml +++ b/tests/integration/targets/user/vars/main.yml @@ -1,12 +1,12 @@ --- test_sites: - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cme" site: "stable_cme" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cee" site: "stable_cee" - - version: "2.3.0p5" + - version: "2.3.0p6" edition: "cre" site: "stable_cre" - version: "2.2.0p27" diff --git a/tests/sanity/ignore-2.18.txt b/tests/sanity/ignore-2.18.txt index 439637947..7a7996325 100644 --- a/tests/sanity/ignore-2.18.txt +++ b/tests/sanity/ignore-2.18.txt @@ -1,4 +1,5 @@ tests/container/files/systemctl3.py pep8!skip tests/container/files/systemctl3.py pylint!skip tests/container/files/systemctl3.py shebang!skip -tests/container/files/systemctl3.py compile-3.12!skip \ No newline at end of file +tests/container/files/systemctl3.py compile-3.12!skip +tests/container/files/systemctl3.py compile-3.13!skip \ No newline at end of file diff --git a/tests/sanity/ignore-2.19.txt b/tests/sanity/ignore-2.19.txt new file mode 100644 index 000000000..7a7996325 --- /dev/null +++ b/tests/sanity/ignore-2.19.txt @@ -0,0 +1,5 @@ +tests/container/files/systemctl3.py pep8!skip +tests/container/files/systemctl3.py pylint!skip +tests/container/files/systemctl3.py shebang!skip +tests/container/files/systemctl3.py compile-3.12!skip +tests/container/files/systemctl3.py compile-3.13!skip \ No newline at end of file