├── .ansible-lint ├── .envrc ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── config.yaml │ └── feedback.md ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yml ├── labels-issues.yml ├── labels-prs.yml └── workflows │ ├── ans-int-test-activation.yaml │ ├── ans-int-test-bakery.yaml │ ├── ans-int-test-contact_group.yaml │ ├── ans-int-test-discovery.yaml │ ├── ans-int-test-downtime.yaml │ ├── ans-int-test-folder.yaml │ ├── ans-int-test-host.yaml │ ├── ans-int-test-host_group.yaml │ ├── ans-int-test-lkp-bakery.yaml │ ├── ans-int-test-lkp-folder.yaml │ ├── ans-int-test-lkp-folders.yaml │ ├── ans-int-test-lkp-host.yaml │ ├── ans-int-test-lkp-hosts.yaml │ ├── ans-int-test-lkp-rules.yaml │ ├── ans-int-test-lkp-rulesets.yaml │ ├── ans-int-test-lkp-site.yaml │ ├── ans-int-test-lkp-sites.yaml │ ├── ans-int-test-lkp-version.yaml │ ├── ans-int-test-password.yaml │ ├── ans-int-test-rule.yaml │ ├── ans-int-test-service_group.yaml │ ├── ans-int-test-site.yaml │ ├── ans-int-test-tag_group.yaml │ ├── ans-int-test-timeperiod.yaml │ ├── ans-int-test-user.yaml │ ├── ans-unit-test-inventory.yaml │ ├── ansible-lint.yaml │ ├── ansible-sanity-tests.yaml │ ├── ansible-unit-tests.yaml │ ├── cla.yaml │ ├── codeql.yaml │ ├── label-issues.yaml │ ├── label-pulls.yaml │ ├── molecule-role-agent.yaml │ ├── molecule-role-server.yaml │ ├── python-qa.yaml │ ├── release.yaml │ └── stale.yaml ├── .gitignore ├── .yamllint ├── CHANGELOG.rst ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── COMMUNITY.md ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── README.md ├── SECURITY.md ├── SUPPORT.md ├── Vagrantfile ├── ansible.cfg ├── changelogs ├── .plugin-cache.yaml ├── archive │ ├── 0.0.1 │ │ └── initial.yml │ ├── 0.0.2 │ │ └── v0.0.2.yml │ ├── 0.1.0 │ │ └── v0.1.0.yml │ ├── 0.10.0 │ │ ├── fix-150-default-folder.yml │ │ └── rule_module.yml │ ├── 0.11.0 │ │ ├── agent_role.yml │ │ ├── host_group_module.yml │ │ └── tag_group_module.yml │ ├── 0.12.0 │ │ ├── bugfixes.yml │ │ ├── contact_group_module.yml │ │ └── fix-188-key-error.yml │ ├── 0.13.0 │ │ ├── new-passwd-hashing.yml │ │ └── service_group_module.yml │ ├── 0.14.0 │ │ └── host_group.yml │ ├── 0.15.0 │ │ ├── agent_role.yml │ │ ├── module_options.yml │ │ └── playbooks.yml │ ├── 0.16.0 │ │ ├── agent.yml │ │ ├── bugfix_rule_module.yml │ │ ├── playbooks.yml │ │ └── rule_module.yml │ ├── 0.16.1 │ │ └── agent.yml │ ├── 0.16.2 │ │ ├── agent.yml │ │ ├── downtime.yml │ │ └── summary.yml │ ├── 0.17.0 │ │ ├── agent.yml │ │ ├── release.yml │ │ └── rule.yml │ ├── 0.17.1 │ │ └── agent.yml │ ├── 0.18.0 │ │ ├── agent.yml │ │ ├── module-user.yml │ │ └── rule.yml │ ├── 0.19.0 │ │ ├── api.yml │ │ ├── support.yml │ │ └── user.yml │ ├── 0.2.0 │ │ ├── 0.2.0.yml │ │ └── consistent_base_url.yml │ ├── 0.2.1 │ │ ├── activation.yml │ │ └── discovery.yml │ ├── 0.2.2 │ │ └── discovery.yml │ ├── 0.20.0 │ │ ├── agent.yml │ │ ├── host.yml │ │ └── rule.yml │ ├── 0.21.0 │ │ ├── agent.yml │ │ ├── almalinux.yml │ │ └── bakery.yml │ ├── 0.22.0 │ │ ├── playbooks.yml │ │ └── utils.yml │ ├── 0.23.0 │ │ ├── folder.yml │ │ └── tag_group.yml │ ├── 0.3.2 │ │ └── role-agent.yml │ ├── 0.3.3 │ │ └── trailing_slash.yml │ ├── 0.4.0 │ │ ├── fix-51-exceptionhandling.yml │ │ ├── role-agent-baked.yml │ │ └── role-server.yml │ ├── 0.5.0 │ │ ├── agent.yml │ │ ├── linting.yml │ │ └── server.yml │ ├── 0.5.1 │ │ ├── bugfix_admin_password_leak.yml │ │ └── bugfix_agent_role.yml │ ├── 0.5.2 │ │ ├── bugfix_agent_role.yml │ │ └── bugfix_discovery_http_timeout.yml │ ├── 0.6.0 │ │ ├── bugfix_agent_role.yml │ │ ├── release_summary.yml │ │ └── server_update_feature.yml │ ├── 0.7.0 │ │ ├── agent_role.yml │ │ ├── bugfix_activation_module.yml │ │ ├── release_summary.yml │ │ └── server_role.yml │ ├── 0.8.0 │ │ ├── agent_role.yml │ │ ├── modules.yml │ │ └── server_role.yml │ ├── 0.9.0 │ │ ├── host_module.yml │ │ └── server_role.yml │ ├── 1.0.0 │ │ └── renaming_preparation.yml │ ├── 2.0.0 │ │ └── renaming_complete.yml │ ├── 2.1.0 │ │ ├── activation.yml │ │ ├── discovery.yml │ │ ├── downtime.yml │ │ ├── modules.yml │ │ └── tests.yml │ ├── 2.2.0 │ │ ├── activation.yml │ │ ├── downtime.yml │ │ ├── roles.yml │ │ └── summary.yml │ ├── 2.3.0 │ │ ├── discovery.yml │ │ ├── password.yml │ │ ├── server.yml │ │ └── summary.yml │ ├── 2.4.0 │ │ ├── agent.yml │ │ ├── debian12.yml │ │ ├── discovery.yml │ │ ├── oraclelinux8.yml │ │ ├── release.yml │ │ └── server.yml │ ├── 2.4.1 │ │ └── agent.yml │ ├── 3.0.0 │ │ ├── agent.yml │ │ ├── breaking.yml │ │ ├── folder.yml │ │ └── release_summary.yml │ ├── 3.1.0 │ │ ├── discovery.yml │ │ ├── lookup.yml │ │ ├── release_summary.yml │ │ └── windows.yml │ ├── 3.2.0 │ │ ├── agent.yml │ │ └── server.yml │ ├── 3.3.0 │ │ ├── admin_pw.yml │ │ ├── agent.yml │ │ ├── fix_folder_module.yml │ │ ├── lookup_plugins.yml │ │ ├── release_summary.yml │ │ ├── timeperiod.yml │ │ └── version_utils.yml │ ├── 3.4.0 │ │ ├── agent_push.yml │ │ ├── cme_support.yml │ │ ├── no_log.yml │ │ ├── release_summary.yml │ │ └── server-omd-config.yml │ ├── 4.0.0 │ │ ├── activation.yml │ │ ├── breaking.yml │ │ ├── discovery.yml │ │ ├── lookups.yml │ │ └── release_summary.yml │ ├── 4.1.0 │ │ ├── password.yml │ │ ├── release_summary.yml │ │ └── rule_lookup_plugins.yml │ ├── 4.2.0 │ │ ├── release_summary.yml │ │ ├── roles.yml │ │ ├── rule.yml │ │ ├── tag_group.yml │ │ └── user.yml │ ├── 4.3.0 │ │ ├── fix_folder_module_idempotency.yml │ │ ├── folder.yml │ │ ├── lookups.yml │ │ ├── parents.yml │ │ ├── release_summary.yml │ │ ├── rule.yml │ │ └── user.yml │ ├── 4.3.1 │ │ ├── fix_rule_conditions_missing.yml │ │ └── release_summary.yml │ ├── 4.4.0 │ │ ├── bakery.yml │ │ ├── folder.yml │ │ ├── host.yml │ │ └── release_summary.yml │ ├── 4.4.1 │ │ ├── fix_host_initial_folder.yml │ │ ├── meta.yml │ │ └── release_summary.yml │ ├── 5.0.0 │ │ ├── agent.yml │ │ ├── build.yml │ │ ├── discovery.yml │ │ ├── http.yml │ │ ├── lookup_folder.yml │ │ ├── release_summary.yml │ │ ├── roles.yml │ │ └── rule.yml │ ├── 5.1.0 │ │ ├── agent.yml │ │ ├── build.yml │ │ ├── release_summary.yml │ │ └── variables.yml │ ├── 5.10.0 │ │ ├── feature_ansible_host_for_inventory.yml │ │ ├── fix-mkp-management.yml │ │ ├── package_mgmt.yml │ │ ├── release_summary.yml │ │ └── utils.yml │ ├── 5.2.0 │ │ ├── agent.yaml │ │ ├── build.yaml │ │ ├── downtime.yaml │ │ ├── release_summary.yaml │ │ └── tag_group.yaml │ ├── 5.2.1 │ │ ├── folder.yml │ │ └── release_summary.yml │ ├── 5.3.0 │ │ ├── checkmk.yml │ │ ├── folder.yml │ │ ├── rule.yml │ │ └── site.yml │ ├── 5.3.1 │ │ ├── groups.yml │ │ └── rule.yml │ ├── 5.3.2 │ │ └── release.yml │ ├── 5.4.0 │ │ ├── agent.yml │ │ └── release_summary.yml │ ├── 5.5.0 │ │ ├── agent.yml │ │ ├── release.yml │ │ └── server.yml │ ├── 5.6.0 │ │ ├── release_summary.yml │ │ └── server.yml │ ├── 5.7.0 │ │ ├── agent.yml │ │ └── release_summary.yml │ ├── 5.8.0 │ │ ├── 2.4.0.yml │ │ ├── gpg.yml │ │ ├── release_summary.yml │ │ └── user.yml │ └── 5.9.0 │ │ ├── build.yml │ │ ├── discovery.yml │ │ ├── release_summary.yml │ │ └── tag_group.yml ├── changelog.yaml ├── config.yaml ├── fragments │ └── .gitkeep └── template.yml ├── docs ├── activation_module.rst ├── agent_role.rst ├── bakery_lookup.rst ├── bakery_module.rst ├── checkmk_inventory.rst ├── contact_group_module.rst ├── discovery_module.rst ├── downtime_module.rst ├── environment_variables.rst ├── folder_lookup.rst ├── folder_module.rst ├── folders_lookup.rst ├── host_group_module.rst ├── host_lookup.rst ├── host_module.rst ├── hosts_lookup.rst ├── index.rst ├── password_module.rst ├── passwords_module.rst ├── rule_lookup.rst ├── rule_module.rst ├── rules_lookup.rst ├── ruleset_lookup.rst ├── rulesets_lookup.rst ├── server_role.rst ├── service_group_module.rst ├── site_lookup.rst ├── site_module.rst ├── sites_lookup.rst ├── tag_group_module.rst ├── timeperiod_module.rst ├── user_module.rst └── version_lookup.rst ├── galaxy.yml ├── meta └── runtime.yml ├── misc ├── README.md ├── centos-9-stream.setup ├── debian-12.package_facts ├── debian-12.setup ├── openSUSE-Tumbleweed.setup ├── sles-15.2.setup ├── ubuntu-22.package_facts └── ubuntu-22.setup ├── playbooks ├── README.md ├── demo │ ├── README.md │ ├── downtimes.yml │ ├── full.yml │ ├── groups.yml │ ├── hosts-and-folders.yml │ ├── lookup.yml │ ├── rules.yml │ └── users-and-contacts.yml ├── hosts ├── inventory │ └── checkmk.yml ├── roles.yml ├── usecases │ ├── remote-registration.yml │ └── setup-distributed-monitoring.yml └── vars │ ├── auth.yml │ ├── config.yml.example │ ├── folders.yml │ ├── groups.yml │ ├── rules.yml │ └── users.yml ├── plugins ├── __init__.py ├── doc_fragments │ ├── __init__.py │ ├── common.py │ └── site_options.py ├── inventory │ └── checkmk.py ├── lookup │ ├── README.md │ ├── bakery.py │ ├── folder.py │ ├── folders.py │ ├── host.py │ ├── hosts.py │ ├── rule.py │ ├── rules.py │ ├── ruleset.py │ ├── rulesets.py │ ├── site.py │ ├── sites.py │ └── version.py ├── module_utils │ ├── __init__.py │ ├── api.py │ ├── discovery.py │ ├── discovery_210.py │ ├── discovery_220.py │ ├── discovery_230.py │ ├── discovery_240.py │ ├── discovery_250.py │ ├── logger.py │ ├── lookup_api.py │ ├── site.py │ ├── types.py │ ├── utils.py │ └── version.py └── modules │ ├── __init__.py │ ├── activation.py │ ├── bakery.py │ ├── contact_group.py │ ├── discovery.py │ ├── downtime.py │ ├── folder.py │ ├── host.py │ ├── host_group.py │ ├── password.py │ ├── rule.py │ ├── service_group.py │ ├── site.py │ ├── tag_group.py │ ├── timeperiod.py │ └── user.py ├── pyproject.toml ├── qa-requirements.txt ├── requirements.txt ├── requirements.yml ├── roles ├── agent │ ├── README.md │ ├── defaults │ │ └── main.yml │ ├── handlers │ │ └── main.yml │ ├── meta │ │ ├── argument_specs.yml │ │ └── main.yml │ ├── molecule │ │ ├── 2.2.0 │ │ │ ├── converge.yml │ │ │ ├── group_vars │ │ │ │ └── all.yml │ │ │ ├── molecule.yml │ │ │ └── verify.yml │ │ ├── 2.3.0 │ │ │ ├── converge.yml │ │ │ ├── group_vars │ │ │ │ └── all.yml │ │ │ ├── molecule.yml │ │ │ └── verify.yml │ │ └── 2.4.0 │ │ │ ├── converge.yml │ │ │ ├── group_vars │ │ │ └── all.yml │ │ │ ├── molecule.yml │ │ │ └── verify.yml │ ├── tasks │ │ ├── Debian.yml │ │ ├── Linux-files.yml │ │ ├── Linux.yml │ │ ├── RedHat.yml │ │ ├── Suse.yml │ │ ├── Win32NT-files.yml │ │ ├── Win32NT.yml │ │ ├── Windows.yml │ │ └── main.yml │ └── vars │ │ ├── Debian.yml │ │ ├── RedHat.yml │ │ ├── Suse.yml │ │ ├── Windows.yml │ │ └── main.yml └── server │ ├── README.md │ ├── defaults │ └── main.yml │ ├── handlers │ └── main.yml │ ├── meta │ ├── argument_specs.yml │ └── main.yml │ ├── molecule │ ├── 2.2.0 │ │ ├── converge.yml │ │ ├── group_vars │ │ │ └── all.yml │ │ ├── molecule.yml │ │ └── verify.yml │ ├── 2.3.0 │ │ ├── converge.yml │ │ ├── group_vars │ │ │ └── all.yml │ │ ├── molecule.yml │ │ └── verify.yml │ └── 2.4.0 │ │ ├── converge.yml │ │ ├── group_vars │ │ └── all.yml │ │ ├── molecule.yml │ │ └── verify.yml │ ├── tasks │ ├── Debian.yml │ ├── RedHat.yml │ ├── configure-site.yml │ ├── main.yml │ ├── mkp.yml │ ├── sites.yml │ └── update-site.yml │ └── vars │ ├── Debian.yml │ ├── RedHat.yml │ └── main.yml ├── scripts ├── release.sh └── testing.sh └── tests ├── container ├── Dockerfile ├── README.md └── files │ ├── LICENSE │ ├── README.md │ ├── deadsnakes.gpg │ ├── deadsnakes.list │ └── systemctl3.py ├── integration ├── files │ ├── README.md │ └── includes │ │ ├── tasks │ │ └── prep.yml │ │ └── vars │ │ └── global.yml └── targets │ ├── activation │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── bakery │ ├── files │ │ └── agent_signature_keys.mk │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── contact_group │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── discovery │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── downtime │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── folder │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── host │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── host_group │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── lookup_bakery │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── lookup_folder │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── lookup_folders │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── lookup_host │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── lookup_hosts │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── lookup_rules │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── lookup_rulesets │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── lookup_site │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── lookup_sites │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── lookup_version │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── password │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── rule │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ ├── 2.2.0.yml │ │ ├── 2.3.0.yml │ │ ├── 2.4.0.yml │ │ └── main.yml │ ├── service_group │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── site │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── tag_group │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ ├── timeperiod │ ├── tasks │ │ ├── main.yml │ │ └── test.yml │ └── vars │ │ └── main.yml │ └── user │ ├── tasks │ ├── main.yml │ └── test.yml │ └── vars │ └── main.yml ├── sanity ├── ignore-2.14.txt ├── ignore-2.15.txt ├── ignore-2.16.txt ├── ignore-2.17.txt ├── ignore-2.18.txt └── ignore-2.19.txt └── unit └── plugins ├── inventory ├── conftest.py └── test_checkmk.py └── module_utils └── lookup_api.py /.envrc: -------------------------------------------------------------------------------- 1 | # -*- mode: sh -*- 2 | 3 | layout_python() { 4 | if [[ -d ".venv" ]]; then 5 | VIRTUAL_ENV=".venv" 6 | fi 7 | 8 | if [[ -z $VIRTUAL_ENV || ! -d $VIRTUAL_ENV ]]; then 9 | log_status "No virtual environment exists. Creating it." 10 | uv venv 11 | uv sync 12 | VIRTUAL_ENV=".venv" 13 | fi 14 | 15 | # Activate the virtual environment 16 | . $VIRTUAL_ENV/bin/activate 17 | } 18 | 19 | layout python -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.yml linguist-detectable 2 | *.cmd text eol=lf 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[BUG]" 5 | labels: bug 6 | assignees: robin-checkmk 7 | 8 | --- 9 | 10 | Verify first that your issue is not already reported [here](https://github.com/Checkmk/ansible-collection-checkmk.general/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc). 11 | Where possible also test if the latest release and main branch are affected too. 12 | Complete all sections as described! 13 | 14 | **Describe the bug** 15 | 16 | 17 | **Component Name** 18 | 19 | Component Name: activation 20 | 21 | **Ansible Version** 22 | 23 | ```console 24 | $ ansible --version 25 | 26 | ``` 27 | 28 | **Checkmk Version and Edition** 29 | 30 | ```console 31 | e.g. 2.X.YpZ (CRE) 32 | ``` 33 | 34 | **Collection Version** 35 | 36 | ```console 37 | $ ansible-galaxy collection list 38 | 39 | ``` 40 | 41 | **To Reproduce** 42 | Steps to reproduce the behavior: 43 | 1. Go to '...' 44 | 2. Run '....' 45 | 3. Execute '....' 46 | 4. See error 47 | 48 | **Expected behavior** 49 | 50 | 51 | **Actual behavior** 52 | 53 | 54 | **Minimum reproduction example** 55 | 56 | ```yaml 57 | 58 | ``` 59 | 60 | **Additional context** 61 | 62 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser 3 | blank_issues_enabled: true 4 | contact_links: 5 | # - name: Security bug report 6 | # url: 7 | # about: 8 | - name: Ansible Code of Conduct 9 | url: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_template_chooser_ansible_collections 10 | about: Be nice to other members of the community. 11 | - name: Talk to our Checkmk community. 12 | url: https://forum.checkmk.com/ 13 | about: Join our Checkmk community to aks and answer questions 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feedback.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feedback 3 | about: Give us any form of feedback 4 | title: "[FEED]" 5 | labels: feedback 6 | assignees: robin-checkmk 7 | 8 | --- 9 | 10 | Please verify first that your feedback is not already reported [here](https://github.com/Checkmk/ansible-collection-checkmk.general/issues?q=is%3Aissue+sort%3Aupdated-desc). 11 | If possible and useful provide additional information below. This is optional however. 12 | 13 | **Provide your feedback** 14 | 15 | 16 | **Component Name** 17 | 18 | Component Name: activation 19 | 20 | **Ansible Version** 21 | 22 | ```console 23 | $ ansible --version 24 | 25 | ``` 26 | 27 | **Collection Version** 28 | 29 | ```console 30 | $ ansible-galaxy collection list 31 | 32 | ``` 33 | **Environment** 34 | 35 | 36 | **Screenshots** 37 | 38 | 39 | **Additional context** 40 | 41 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | ## Pull request type 10 | 11 | 12 | Please check the type of change your PR introduces: 13 | 14 | - [ ] Bugfix 15 | - [ ] Feature 16 | - [ ] Code style update (formatting, renaming) 17 | - [ ] Refactoring (no functional changes, no API changes) 18 | - [ ] Build related changes 19 | - [ ] Documentation content changes 20 | - [ ] Other (please describe): 21 | 22 | ## What is the current behavior? 23 | 24 | 25 | Issue Number: `e.g. #1` 26 | 27 | ## What is the new behavior? 28 | 29 | 30 | - 31 | - 32 | - 33 | 34 | ## Other information 35 | 36 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "pip" 4 | directory: "/" 5 | schedule: 6 | interval: weekly 7 | time: "05:00" 8 | target-branch: "devel" 9 | open-pull-requests-limit: 10 10 | - package-ecosystem: "github-actions" 11 | directory: "/" 12 | schedule: 13 | interval: weekly 14 | time: "06:00" 15 | target-branch: "devel" 16 | open-pull-requests-limit: 10 17 | -------------------------------------------------------------------------------- /.github/labels-issues.yml: -------------------------------------------------------------------------------- 1 | --- 2 | bug: 3 | - '\[BUG\]' 4 | 5 | feedback: 6 | - '\[FEED\]' 7 | 8 | role:server: 9 | - 'Component Name: server' 10 | 11 | role:agent: 12 | - 'Component Name: agent' 13 | 14 | inventory: 15 | - 'Component Name: inventory' 16 | 17 | module:activation: 18 | - 'Component Name: activation' 19 | 20 | module:bakery: 21 | - 'Component Name: bakery' 22 | 23 | module:contact_group: 24 | - 'Component Name: contact_group' 25 | 26 | module:discovery: 27 | - 'Component Name: discovery' 28 | 29 | module:downtime: 30 | - 'Component Name: downtime' 31 | 32 | module:folder: 33 | - 'Component Name: folder' 34 | 35 | module:host: 36 | - 'Component Name: host' 37 | 38 | module:host_group: 39 | - 'Component Name: host_group' 40 | 41 | module:password: 42 | - 'Component Name: password' 43 | 44 | module:rule: 45 | - 'Component Name: rule' 46 | 47 | module:service_group: 48 | - 'Component Name: service_group' 49 | 50 | module:site: 51 | - 'Component Name: site' 52 | 53 | module:tag_group: 54 | - 'Component Name: tag_group' 55 | 56 | module:timeperiod: 57 | - 'Component Name: timeperiod' 58 | 59 | module:user: 60 | - 'Component Name: user' 61 | 62 | lookup:bakery: 63 | - 'Component Name: lookup_bakery' 64 | 65 | lookup:folder: 66 | - 'Component Name: lookup_folder' 67 | 68 | lookup:folders: 69 | - 'Component Name: lookup_folders' 70 | 71 | lookup:host: 72 | - 'Component Name: lookup_host' 73 | 74 | lookup:hosts: 75 | - 'Component Name: lookup_hosts' 76 | 77 | lookup:rule: 78 | - 'Component Name: lookup_rule' 79 | 80 | lookup:rules: 81 | - 'Component Name: lookup_rules' 82 | 83 | lookup:ruleset: 84 | - 'Component Name: lookup_ruleset' 85 | 86 | lookup:rulesets: 87 | - 'Component Name: lookup_rulesets' 88 | 89 | lookup:site: 90 | - 'Component Name: lookup_site' 91 | 92 | lookup:sites: 93 | - 'Component Name: lookup_sites' 94 | 95 | lookup:version: 96 | - 'Component Name: lookup_version' 97 | -------------------------------------------------------------------------------- /.github/workflows/ans-unit-test-inventory.yaml: -------------------------------------------------------------------------------- 1 | # https://github.com/ansible-collections/collection_template/blob/main/.github/workflows/ansible-test.yml 2 | 3 | env: 4 | NAMESPACE: checkmk 5 | COLLECTION_NAME: general 6 | MODULE_NAME: checkmk 7 | TESTPATH: tests/unit/plugins/inventory/test_checkmk.py 8 | 9 | concurrency: 10 | group: ${{ github.workflow }}-${{ github.ref }} 11 | cancel-in-progress: true 12 | 13 | name: Ansible Unit Test for Inventory Module 14 | on: 15 | workflow_dispatch: 16 | schedule: 17 | - cron: '0 0 * * 0' 18 | pull_request: 19 | branches: 20 | - main 21 | - devel 22 | paths: 23 | - 'plugins/inventory/checkmk.py' 24 | push: 25 | paths: 26 | - 'plugins/inventory/checkmk.py' 27 | 28 | jobs: 29 | 30 | units: 31 | runs-on: ubuntu-22.04 32 | name: Units (Ⓐ${{ matrix.ansible }}) 33 | strategy: 34 | fail-fast: true # false? 35 | matrix: 36 | ansible: 37 | - stable-2.15 38 | - stable-2.16 39 | - stable-2.17 40 | - devel 41 | python: 42 | - '3.10' 43 | - '3.11' 44 | 45 | steps: 46 | - name: Check out code 47 | uses: actions/checkout@v4 48 | with: 49 | path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} 50 | 51 | - name: Set up Python 52 | uses: actions/setup-python@v5 53 | with: 54 | python-version: '3.11' 55 | 56 | - name: Install ansible-base (${{ matrix.ansible }}) 57 | run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check 58 | 59 | - name: Run unit test 60 | run: ansible-test units ${{env.TESTPATH}} -v --color --python ${{ matrix.python }} --docker default 61 | working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} 62 | -------------------------------------------------------------------------------- /.github/workflows/ansible-sanity-tests.yaml: -------------------------------------------------------------------------------- 1 | # README: 2 | # Resources: 3 | # - Template for this file: https://github.com/ansible-collections/collection_template/blob/main/.github/workflows/ansible-test.yml 4 | # - About Ansible sanity tests: https://docs.ansible.com/ansible/latest/dev_guide/testing_sanity.html 5 | 6 | env: 7 | NAMESPACE: checkmk 8 | COLLECTION_NAME: general 9 | 10 | name: Ansible Sanity Tests 11 | on: 12 | workflow_dispatch: 13 | push: 14 | paths-ignore: 15 | - '.github/ISSUE_TEMPLATE/*' 16 | - 'docs/**' 17 | - 'changelogs/**' 18 | - '**.md' 19 | - '**.rst' 20 | - 'roles/**' 21 | pull_request: 22 | paths-ignore: 23 | - '.github/ISSUE_TEMPLATE/*' 24 | - 'docs/**' 25 | - 'changelogs/**' 26 | - '**.md' 27 | - '**.rst' 28 | - 'roles/**' 29 | 30 | jobs: 31 | 32 | sanity: 33 | runs-on: ubuntu-22.04 34 | name: Sanity (Ⓐ${{ matrix.ansible }}) 35 | strategy: 36 | fail-fast: false 37 | matrix: 38 | ansible: 39 | - stable-2.15 40 | - stable-2.16 41 | - stable-2.17 42 | - devel 43 | 44 | steps: 45 | 46 | - name: Check out code 47 | uses: actions/checkout@v4 48 | with: 49 | path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} 50 | 51 | - name: Set up Python 52 | uses: actions/setup-python@v5 53 | with: 54 | python-version: '3.11' 55 | 56 | - name: Install ansible-base (${{ matrix.ansible }}) 57 | run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check 58 | 59 | - name: Run sanity tests 60 | run: ansible-test sanity --docker -v --color --coverage 61 | working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} 62 | -------------------------------------------------------------------------------- /.github/workflows/ansible-unit-tests.yaml: -------------------------------------------------------------------------------- 1 | # https://github.com/ansible-collections/collection_template/blob/main/.github/workflows/ansible-test.yml 2 | 3 | env: 4 | NAMESPACE: checkmk 5 | COLLECTION_NAME: general 6 | 7 | name: Ansible Unit Tests 8 | on: 9 | workflow_dispatch: 10 | # push: 11 | # branches: 12 | # - main 13 | # - devel 14 | # paths-ignore: 15 | # - '.github/ISSUE_TEMPLATE/*' 16 | # - 'docs/**' 17 | # - 'changelogs/**' 18 | # - '**.md' 19 | # - '**.rst' 20 | # pull_request: 21 | # branches: 22 | # - main 23 | # - devel 24 | # paths-ignore: 25 | # - '.github/ISSUE_TEMPLATE/*' 26 | # - 'docs/**' 27 | # - 'changelogs/**' 28 | # - '**.md' 29 | # - '**.rst' 30 | 31 | jobs: 32 | 33 | ### 34 | # Unit tests (OPTIONAL) 35 | # 36 | # https://docs.ansible.com/ansible/latest/dev_guide/testing_units.html 37 | 38 | units: 39 | runs-on: ubuntu-22.04 40 | name: Units (Ⓐ${{ matrix.ansible }}) 41 | strategy: 42 | fail-fast: true 43 | matrix: 44 | ansible: 45 | - stable-2.15 46 | - stable-2.16 47 | - stable-2.17 48 | - devel 49 | 50 | steps: 51 | - name: Check out code 52 | uses: actions/checkout@v4 53 | with: 54 | path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} 55 | 56 | - name: Set up Python 57 | uses: actions/setup-python@v5 58 | with: 59 | python-version: '3.11' 60 | 61 | - name: Install ansible-base (${{ matrix.ansible }}) 62 | run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check 63 | 64 | # OPTIONAL If your unit test requires Python libraries from other collections 65 | # Install them like this 66 | - name: Install collection dependencies 67 | run: ansible-galaxy collection install ansible.netcommon ansible.utils -p . 68 | 69 | # Run the unit tests 70 | - name: Run unit test 71 | run: ansible-test units -v --color --docker --coverage 72 | working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} 73 | -------------------------------------------------------------------------------- /.github/workflows/codeql.yaml: -------------------------------------------------------------------------------- 1 | name: "CodeQL" 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: '0 0 * * *' 7 | 8 | jobs: 9 | analyze: 10 | name: Analyze 11 | runs-on: ubuntu-22.04 12 | permissions: 13 | actions: read 14 | contents: read 15 | security-events: write 16 | 17 | strategy: 18 | fail-fast: false 19 | matrix: 20 | language: [ 'python' ] 21 | # Learn more about CodeQL language support at https://git.io/codeql-language-support 22 | 23 | steps: 24 | - name: Checkout repository 25 | uses: actions/checkout@v4 26 | 27 | # Initializes the CodeQL tools for scanning. 28 | - name: Initialize CodeQL 29 | uses: github/codeql-action/init@v3 30 | with: 31 | languages: ${{ matrix.language }} 32 | 33 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 34 | # If this step fails, then you should remove it and run the build manually (see below) 35 | - name: Autobuild 36 | uses: github/codeql-action/autobuild@v3 37 | 38 | - name: Perform CodeQL Analysis 39 | uses: github/codeql-action/analyze@v3 40 | -------------------------------------------------------------------------------- /.github/workflows/label-issues.yaml: -------------------------------------------------------------------------------- 1 | name: "Label Issues." 2 | on: 3 | issues: 4 | types: [opened, edited] 5 | 6 | permissions: 7 | contents: read 8 | issues: write 9 | 10 | jobs: 11 | label: 12 | runs-on: ubuntu-22.04 13 | steps: 14 | - name: "Label Issues." 15 | uses: github/issue-labeler@v3.4 16 | with: 17 | configuration-path: .github/labels-issues.yml 18 | include-title: 1 19 | repo-token: ${{ github.token }} 20 | enable-versioned-regex: 0 21 | sync-labels: 0 22 | -------------------------------------------------------------------------------- /.github/workflows/label-pulls.yaml: -------------------------------------------------------------------------------- 1 | name: "Label Pull Requests." 2 | on: 3 | pull_request_target: 4 | paths: 5 | - 'plugins/**' 6 | - 'roles/**' 7 | 8 | permissions: 9 | contents: read 10 | pull-requests: write 11 | 12 | jobs: 13 | label: 14 | runs-on: ubuntu-22.04 15 | steps: 16 | - name: "Label Pull Requests." 17 | uses: actions/labeler@v5 18 | with: 19 | configuration-path: .github/labels-prs.yml 20 | sync-labels: false 21 | -------------------------------------------------------------------------------- /.github/workflows/python-qa.yaml: -------------------------------------------------------------------------------- 1 | name: Python QA 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: '0 3 * * *' 7 | push: 8 | paths: 9 | - '**.py' 10 | pull_request: 11 | paths: 12 | - '**.py' 13 | jobs: 14 | run-qa: 15 | name: Run QA 16 | runs-on: ubuntu-22.04 17 | steps: 18 | - uses: actions/checkout@v4 19 | - uses: actions/setup-python@v5 20 | with: 21 | python-version: '3.11' 22 | cache: pip 23 | cache-dependency-path: qa-requirements.txt 24 | - name: Install linters 25 | run: python -m pip install -r qa-requirements.txt 26 | - name: Check format 27 | run: black --check --diff plugins 28 | if: always() 29 | - name: Check imports 30 | run: isort --check --diff plugins 31 | if: always() 32 | -------------------------------------------------------------------------------- /.github/workflows/stale.yaml: -------------------------------------------------------------------------------- 1 | # This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. 2 | # 3 | # You can adjust the behavior by modifying this file. 4 | # For more information, see: 5 | # https://github.com/actions/stale 6 | name: Stale Bot 7 | 8 | on: 9 | schedule: 10 | - cron: '38 3 * * *' 11 | 12 | jobs: 13 | stale: 14 | 15 | runs-on: ubuntu-22.04 16 | permissions: 17 | issues: write 18 | pull-requests: write 19 | 20 | steps: 21 | - uses: actions/stale@v9 22 | with: 23 | repo-token: ${{ secrets.GITHUB_TOKEN }} 24 | stale-issue-message: 'This issue has been stale for 60 days. It will close in 7 days.' 25 | stale-pr-message: 'This pull request has been stale for 60 days. It will close in 7 days.' 26 | days-before-stale: 60 27 | days-before-close: 7 28 | stale-issue-label: 'stale' 29 | stale-pr-label: 'stale' 30 | exempt-issue-labels: 'upstream, never-stale' 31 | exempt-pr-labels: 'upstream, never-stale' 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant 2 | .*.swp 3 | .*.swo 4 | *~ 5 | checkmk-general-*.tar.gz 6 | .vagrant/ 7 | build/ 8 | tests/output 9 | playbooks/vars/config.yml 10 | playbooks/test*.yml 11 | *venv/ 12 | .direnv/ 13 | .vscode/ 14 | uv.lock -------------------------------------------------------------------------------- /.yamllint: -------------------------------------------------------------------------------- 1 | --- 2 | extends: default 3 | 4 | rules: 5 | braces: 6 | min-spaces-inside: 0 # yamllint defaults to 0 7 | max-spaces-inside: 1 # yamllint defaults to 0 8 | level: error 9 | brackets: 10 | max-spaces-inside: 1 11 | level: error 12 | colons: 13 | max-spaces-after: -1 14 | level: error 15 | commas: 16 | max-spaces-after: -1 17 | level: error 18 | comments: 19 | # https://github.com/prettier/prettier/issues/6780 20 | min-spaces-from-content: 1 21 | # https://github.com/adrienverge/yamllint/issues/384 22 | comments-indentation: false 23 | document-start: disable 24 | empty-lines: 25 | max: 3 26 | level: error 27 | hyphens: 28 | level: error 29 | indentation: enable 30 | key-duplicates: enable 31 | # 160 chars was the default used by old E204 rule, but 32 | # you can easily change it or disable in your .yamllint file. 33 | line-length: disable 34 | # line-length: 35 | # max: 160 36 | new-line-at-end-of-file: enable 37 | new-lines: 38 | type: unix 39 | trailing-spaces: enable 40 | truthy: enable 41 | octal-values: 42 | forbid-implicit-octal: true # yamllint defaults to false 43 | forbid-explicit-octal: true # yamllint defaults to false 44 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @robin-checkmk 2 | *.md @robin-checkmk 3 | /plugins/ @lgetwan 4 | /plugins/doc_fragments/ @robin-checkmk 5 | /plugins/lookup/ @lgetwan 6 | /plugins/lookup/bakery.py @Max-checkmk 7 | /plugins/module_utils/ @lgetwan 8 | /plugins/modules/ @lgetwan 9 | /plugins/modules/bakery.py @Max-checkmk 10 | /plugins/modules/contact_group.py @lgetwan 11 | /plugins/modules/discovery.py @Max-checkmk 12 | /plugins/modules/host_group.py @lgetwan 13 | /plugins/modules/tag_group.py @Max-checkmk 14 | /plugins/modules/timeperiod.py @Max-checkmk 15 | /plugins/modules/password.py @Max-checkmk 16 | /plugins/modules/service_group.py @lgetwan 17 | /roles/agent/tasks/Windows.yml @Max-checkmk 18 | /roles/agent/vars/Windows.yml @Max-checkmk 19 | /roles/agent/tasks/Win32NT.yml @Max-checkmk -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | The `checkmk.general` collection follows the Ansible project's 3 | [Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html). 4 | -------------------------------------------------------------------------------- /COMMUNITY.md: -------------------------------------------------------------------------------- 1 | # Community 2 | 3 | ## Projects 4 | The following is a listing of projects, that build on this collection in some way and that were brought to our attention. 5 | - [Ansible Role: RobotMK](https://github.com/geof77/ansible-robotmk) by [Geoffroy Stévenne](https://github.com/geof77) 6 | - [Checkmk Rule Exporter for Ansible](https://github.com/muehlings/ansible-collection-checkmk.helper) 7 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Disambiguation 4 | 5 | This policy solely applies to the Checkmk Ansible Collection, not Checkmk itself! 6 | For Checkmk itself, please refer to [this Vulnerability disclosure policy](https://checkmk.com/responsible-disclosure-policy) 7 | 8 | ## Supported Versions 9 | 10 | Please always use the latest available version! 11 | Versions in this repository are used solely for stability, so your Ansible configuration 12 | does not break. 13 | However, we cannot and will not support older versions, especially security-wise. 14 | If you find a vulnerability, please report it as stated below, 15 | and we will do our best to fix it as soon as possible. 16 | 17 | ## Reporting a Vulnerability 18 | 19 | For now, please open a normal [issue](https://github.com/Checkmk/ansible-collection-checkmk.general/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) 20 | in the repository but try to disclose the vulnerability as reasonable as possible. 21 | -------------------------------------------------------------------------------- /changelogs/archive/0.10.0/rule_module.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | 3 | major_changes: 4 | - Add rule module. 5 | 6 | known_issues: 7 | - Rule exports made with Checkmk API on server versions <2.1.0p10 will not import correctly. 8 | -------------------------------------------------------------------------------- /changelogs/archive/0.11.0/agent_role.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Agent role - (Actually in v0.10.0) Fix authentication handling, where several tasks would fail, when using a secret. 3 | - Agent role - Add support for CME. 4 | 5 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 6 | 7 | ## Line Format 8 | 9 | # When writing a changelog entry, use the following format: 10 | 11 | # - scope - description starting with a uppercase letter and ending with a period at the very end. Multiple sentences are allowed. 12 | 13 | # The scope is usually a module or plugin name or group of modules or plugins, for example, lookup plugins. While module names can (and should) be mentioned directly (foo_module), plugin names should always be followed by the type (foo inventory plugin). 14 | 15 | # For changes that are not really scoped (for example, which affect a whole collection), use the following format: 16 | 17 | # - Description starting with an uppercase letter and ending with a dot at the very end. Multiple sentences are allowed. 18 | 19 | 20 | ## Possible keys: 21 | 22 | # breaking_changes 23 | 24 | # Changes that break existing playbooks or roles. This includes any change to existing behavior that forces users to update tasks. Displayed in both the changelogs and the Porting Guides. 25 | # major_changes 26 | 27 | # Major changes to Ansible itself. Generally does not include module or plugin changes. Displayed in both the changelogs and the Porting Guides. 28 | # minor_changes 29 | 30 | # Minor changes to Ansible, modules, or plugins. This includes new features, new parameters added to modules, or behavior changes to existing parameters. 31 | # deprecated_features 32 | 33 | # Features that have been deprecated and are scheduled for removal in a future release. Displayed in both the changelogs and the Porting Guides. 34 | # removed_features 35 | 36 | # Features that were previously deprecated and are now removed. Displayed in both the changelogs and the Porting Guides. 37 | # security_fixes 38 | 39 | # Fixes that address CVEs or resolve security concerns. Include links to CVE information. 40 | # bugfixes 41 | 42 | # Fixes that resolve issues. 43 | # known_issues 44 | 45 | # Known issues that are currently not fixed or will not be fixed. 46 | -------------------------------------------------------------------------------- /changelogs/archive/0.11.0/host_group_module.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | 3 | major_changes: 4 | - Add host_group module. 5 | -------------------------------------------------------------------------------- /changelogs/archive/0.11.0/tag_group_module.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | 3 | major_changes: 4 | - Add tag_group module. 5 | -------------------------------------------------------------------------------- /changelogs/archive/0.12.0/contact_group_module.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | 3 | major_changes: 4 | - Add contact_group module. 5 | -------------------------------------------------------------------------------- /changelogs/archive/0.12.0/fix-188-key-error.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | bugfixes: 3 | - Downtime module - A human-readable error message is now printed if there's an API error. 4 | -------------------------------------------------------------------------------- /changelogs/archive/0.13.0/new-passwd-hashing.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | 3 | minor_changes: 4 | - Agent role - Now supports new password hashing according to Werk 14391: https://checkmk.com/werk/14391 5 | 6 | ## Line Format 7 | 8 | # When writing a changelog entry, use the following format: 9 | 10 | # - scope - description starting with a uppercase letter and ending with a period at the very end. Multiple sentences are allowed. 11 | 12 | # The scope is usually a module or plugin name or group of modules or plugins, for example, lookup plugins. While module names can (and should) be mentioned directly (foo_module), plugin names should always be followed by the type (foo inventory plugin). 13 | 14 | # For changes that are not really scoped (for example, which affect a whole collection), use the following format: 15 | 16 | # - Description starting with an uppercase letter and ending with a dot at the very end. Multiple sentences are allowed. 17 | 18 | 19 | ## Possible keys: 20 | 21 | # breaking_changes 22 | 23 | # Changes that break existing playbooks or roles. This includes any change to existing behavior that forces users to update tasks. Displayed in both the changelogs and the Porting Guides. 24 | # major_changes 25 | 26 | # Major changes to Ansible itself. Generally does not include module or plugin changes. Displayed in both the changelogs and the Porting Guides. 27 | # minor_changes 28 | 29 | # Minor changes to Ansible, modules, or plugins. This includes new features, new parameters added to modules, or behavior changes to existing parameters. 30 | # deprecated_features 31 | 32 | # Features that have been deprecated and are scheduled for removal in a future release. Displayed in both the changelogs and the Porting Guides. 33 | # removed_features 34 | 35 | # Features that were previously deprecated and are now removed. Displayed in both the changelogs and the Porting Guides. 36 | # security_fixes 37 | 38 | # Fixes that address CVEs or resolve security concerns. Include links to CVE information. 39 | # bugfixes 40 | 41 | # Fixes that resolve issues. 42 | # known_issues 43 | 44 | # Known issues that are currently not fixed or will not be fixed. 45 | -------------------------------------------------------------------------------- /changelogs/archive/0.13.0/service_group_module.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | 3 | major_changes: 4 | - Add service_group module. 5 | -------------------------------------------------------------------------------- /changelogs/archive/0.15.0/agent_role.yml: -------------------------------------------------------------------------------- 1 | breaking_changes: 2 | - Agent role - Remove host attribute `tag_agent` from the defaults. 3 | Should not be a breaking change, but be aware of it. 4 | 5 | minor_changes: 6 | - Agent role - Respect the variable `checkmk_agent_host_name` when downloading host specific agents. -------------------------------------------------------------------------------- /changelogs/archive/0.15.0/playbooks.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | 3 | minor_changes: 4 | - The playbooks shipped with the collection were cleaned up and update. Just for awareness. 5 | 6 | ## Line Format 7 | 8 | # When writing a changelog entry, use the following format: 9 | 10 | # - scope - description starting with a uppercase letter and ending with a period at the very end. Multiple sentences are allowed. 11 | 12 | # The scope is usually a module or plugin name or group of modules or plugins, for example, lookup plugins. While module names can (and should) be mentioned directly (foo_module), plugin names should always be followed by the type (foo inventory plugin). 13 | 14 | # For changes that are not really scoped (for example, which affect a whole collection), use the following format: 15 | 16 | # - Description starting with an uppercase letter and ending with a dot at the very end. Multiple sentences are allowed. 17 | 18 | 19 | ## Possible keys: 20 | 21 | # breaking_changes 22 | 23 | # Changes that break existing playbooks or roles. This includes any change to existing behavior that forces users to update tasks. Displayed in both the changelogs and the Porting Guides. 24 | # major_changes 25 | 26 | # Major changes to Ansible itself. Generally does not include module or plugin changes. Displayed in both the changelogs and the Porting Guides. 27 | # minor_changes 28 | 29 | # Minor changes to Ansible, modules, or plugins. This includes new features, new parameters added to modules, or behavior changes to existing parameters. 30 | # deprecated_features 31 | 32 | # Features that have been deprecated and are scheduled for removal in a future release. Displayed in both the changelogs and the Porting Guides. 33 | # removed_features 34 | 35 | # Features that were previously deprecated and are now removed. Displayed in both the changelogs and the Porting Guides. 36 | # security_fixes 37 | 38 | # Fixes that address CVEs or resolve security concerns. Include links to CVE information. 39 | # bugfixes 40 | 41 | # Fixes that resolve issues. 42 | # known_issues 43 | 44 | # Known issues that are currently not fixed or will not be fixed. 45 | -------------------------------------------------------------------------------- /changelogs/archive/0.16.0/agent.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | 3 | minor_changes: 4 | - Agent role - Enable registration for TLS and agent updates on remote sites. 5 | - Agent role - Enable automatic activation of changes when needed for this role. Refer to the README for details. 6 | - Agent role - RedHat - Only try to configure firewalld, if the systemd service is present. 7 | -------------------------------------------------------------------------------- /changelogs/archive/0.16.0/playbooks.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | minor_changes: 3 | - Playbooks - Add use case playbook for registering agents on remote sites. 4 | -------------------------------------------------------------------------------- /changelogs/archive/0.16.1/agent.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | 3 | bugfixes: 4 | - Agent role - Fix erroneous usage of "checkmk_agent_pass" in activation handler. 5 | -------------------------------------------------------------------------------- /changelogs/archive/0.16.2/agent.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - 'Agent role - Add explicit "become: false" to the "Discover services and labels on host." task.' 3 | -------------------------------------------------------------------------------- /changelogs/archive/0.16.2/downtime.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | 3 | bugfixes: 4 | - Downtime module - Fix handling of parameters start_after and end_after. 5 | -------------------------------------------------------------------------------- /changelogs/archive/0.16.2/summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Bugfix Release" 2 | -------------------------------------------------------------------------------- /changelogs/archive/0.17.0/release.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Collected bugfixes." 2 | 3 | minor_changes: 4 | - "contact_group module - Fix Ansible Galaxy linting findings." 5 | - "discovery module - Fix Ansible Galaxy linting findings." 6 | - "downtime module - Fix Ansible Galaxy linting findings." 7 | - "host_group module - Fix Ansible Galaxy linting findings." 8 | - "rule module - Fix Ansible Galaxy linting findings." 9 | - "service_group module - Fix Ansible Galaxy linting findings." 10 | -------------------------------------------------------------------------------- /changelogs/archive/0.17.1/agent.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | 3 | minor_changes: 4 | - "Agent role - Add cloud edition support." 5 | -------------------------------------------------------------------------------- /changelogs/archive/0.18.0/agent.yml: -------------------------------------------------------------------------------- 1 | ########################################################### 2 | # # 3 | # Please use this template when writing changelogs. # 4 | # Remove all comment lines, once you added your changes. # 5 | # Refer to the archive, if you need examples. # 6 | # # 7 | ########################################################### 8 | 9 | bugfixes: 10 | - Agent role - Fix support for CCE. 11 | -------------------------------------------------------------------------------- /changelogs/archive/0.18.0/rule.yml: -------------------------------------------------------------------------------- 1 | ########################################################### 2 | # # 3 | # Please use this template when writing changelogs. # 4 | # Remove all comment lines, once you added your changes. # 5 | # Refer to the archive, if you need examples. # 6 | # # 7 | ########################################################### 8 | 9 | major_changes: 10 | - Rule module - Enable check mode. 11 | -------------------------------------------------------------------------------- /changelogs/archive/0.19.0/api.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | 3 | major_changes: 4 | - module_utils - Introduce a centralized library to call the Checkmk API. 5 | 6 | release_summary: "Centralizing functions." -------------------------------------------------------------------------------- /changelogs/archive/0.19.0/support.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | 3 | major_changes: 4 | - We dropped support for Ansible 2.11 and Python 2 entirely. That means you can still use this collection with older versions, we just do not test against them anymore. 5 | 6 | minor_changes: 7 | - We added support for Ansible 2.14. 8 | -------------------------------------------------------------------------------- /changelogs/archive/0.19.0/user.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | 3 | bugfixes: 4 | - User module - Fix creation of automation users. 5 | -------------------------------------------------------------------------------- /changelogs/archive/0.2.0/consistent_base_url.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - The way how the API URL is being created is now more consistent. Thus, users can now skip the 3 | trailing "/" in the "server_url" for all modules. Thanks to Jan Petto 4 | (https://github.com/Edgxxar)! 5 | known_issues: 6 | - We might extract the API call handling into a separate Python module. 7 | -------------------------------------------------------------------------------- /changelogs/archive/0.20.0/agent.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Agent role - Make firewall zone configurable on RedHat derivates. 3 | -------------------------------------------------------------------------------- /changelogs/archive/0.20.0/host.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Host module - Enable update and removal of attributes in addition to fully managing them. This is analogous to the Checkmk REST API. Additionally the "folder" attribute has no default value anymore except on creation. 3 | -------------------------------------------------------------------------------- /changelogs/archive/0.20.0/rule.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Rule module - Fix crash, if the Checkmk REST API does not return a value for the "disabled" property. 3 | -------------------------------------------------------------------------------- /changelogs/archive/0.21.0/agent.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Agent role - Fix activate changes handler failing with self-signed certificate 3 | -------------------------------------------------------------------------------- /changelogs/archive/0.21.0/almalinux.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Server role - Added support for almalinux 3 | -------------------------------------------------------------------------------- /changelogs/archive/0.21.0/bakery.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - Add Bakery module 3 | -------------------------------------------------------------------------------- /changelogs/archive/0.22.0/playbooks.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Playbooks - Reorganize and clean up playbooks. This is a constant work in progress. 3 | -------------------------------------------------------------------------------- /changelogs/archive/0.22.0/utils.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - module_utils - Extend centralization by providing types and further utils. 3 | 4 | release_summary: "Further centralizing." 5 | -------------------------------------------------------------------------------- /changelogs/archive/0.23.0/folder.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - folder module - Add support for 'update_attributes' and 'remove_attributes'. Read the documentation for further details. 3 | 4 | minor_changes: 5 | - folder module - Add support for check mode. 6 | -------------------------------------------------------------------------------- /changelogs/archive/0.23.0/tag_group.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - tag_group module - Code cleanup. Should have no effect on functionality, but mentioning it here for transparency. 3 | -------------------------------------------------------------------------------- /changelogs/archive/0.6.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | 3 | # WARNING Found no release_summary section in the changelog for this release. While this is not required, we suggest to add one with basic information on the release. 4 | release_summary: "Introducing upgrade management for Checkmk sites!" 5 | -------------------------------------------------------------------------------- /changelogs/archive/0.7.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | # https://docs.ansible.com/ansible/latest/community/development_process.html#changelogs-how-to 2 | 3 | release_summary: "Lots of love for the agent role!" 4 | -------------------------------------------------------------------------------- /changelogs/archive/1.0.0/renaming_preparation.yml: -------------------------------------------------------------------------------- 1 | release_summary: "This collection was renamed to checkmk.general. Please use the new name moving forward!" 2 | 3 | breaking_changes: 4 | - "This collection was renamed and module redirects have been activated. That means, if you are using this release, you also need the new collection to be installed. Otherwise things will break for you. In any way you should now move to the new collection name: checkmk.general." 5 | -------------------------------------------------------------------------------- /changelogs/archive/2.0.0/renaming_complete.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Welcome to the new world!" 2 | 3 | breaking_changes: 4 | - The renaming of the collection has concluded. If you are reading this, you on the right release and repository and should be able to use the collection just as you are used to. Make sure to double check, that you are using the new FQCNs! 5 | -------------------------------------------------------------------------------- /changelogs/archive/2.1.0/activation.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Utils - With Checkmk 2.2.0p3 the activation introduces a breaking change, which we need to handle. As a workaround we added the 'If-Match' header to all API requests. 3 | 4 | known_issues: 5 | - Utils - All API calls send the 'If-Match' header. This is a workaround and will be fixed in a future release. 6 | -------------------------------------------------------------------------------- /changelogs/archive/2.1.0/discovery.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Discovery module - Properly handle redirects to wait for completion of background jobs. 3 | -------------------------------------------------------------------------------- /changelogs/archive/2.1.0/downtime.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Downtime module - The module handles timezones properly now. 3 | -------------------------------------------------------------------------------- /changelogs/archive/2.1.0/modules.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - Bakery module - Migrated to use module_utils. 3 | - Discovery module - Migrated to use module_utils. 4 | - contact_group module - The module was not compatible with Checkmk 2.2. This is fixed now. 5 | - host_group module - The module was not compatible with Checkmk 2.2. This is fixed now. 6 | - service_group module - The module was not compatible with Checkmk 2.2. This is fixed now. 7 | -------------------------------------------------------------------------------- /changelogs/archive/2.2.0/activation.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Activation module - Properly add If-Match header. 3 | - Module utils - Remove workaround from version 2.1.0, where all modules were passed the If-Match header. 4 | -------------------------------------------------------------------------------- /changelogs/archive/2.2.0/downtime.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Downtime module - The comment has a default value now 3 | -------------------------------------------------------------------------------- /changelogs/archive/2.2.0/roles.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Agent role - Add support for AlmaLinux and Rocky Linux, both versions 8 and 9. 3 | - Agent role - Bump default Checkmk version to 2.2.0. 4 | - Server role - Add support for AlmaLinux and Rocky Linux, both versions 8 and 9. 5 | - Server role - Bump default Checkmk version to 2.2.0. 6 | -------------------------------------------------------------------------------- /changelogs/archive/2.2.0/summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Extend OS support in roles and fix some minor issues in modules." 2 | -------------------------------------------------------------------------------- /changelogs/archive/2.3.0/discovery.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - Discovery module - Add support for bulk discoveries. 3 | -------------------------------------------------------------------------------- /changelogs/archive/2.3.0/password.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - Password module - Add password module. 3 | -------------------------------------------------------------------------------- /changelogs/archive/2.3.0/server.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Server role - Add support for RHEL and CentOS 9 3 | -------------------------------------------------------------------------------- /changelogs/archive/2.3.0/summary.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Utils - Introduce retries for API calls in case of timeouts. 3 | 4 | release_summary: "Features all over the place!" 5 | -------------------------------------------------------------------------------- /changelogs/archive/2.4.0/agent.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Agent role - Ensure fresh data before adding services to host. 3 | 4 | known_issues: 5 | - Discovery module - The module does not work on a controller host with Python 2. 6 | -------------------------------------------------------------------------------- /changelogs/archive/2.4.0/debian12.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Agent role - Ensure support for Debian 12. 3 | - Server role - Ensure explicit support for Debian 12. 4 | -------------------------------------------------------------------------------- /changelogs/archive/2.4.0/discovery.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Discovery module - Improve resilience and stability. 3 | -------------------------------------------------------------------------------- /changelogs/archive/2.4.0/oraclelinux8.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Server role - Enable explicit support for Oracle Linux 8. 3 | -------------------------------------------------------------------------------- /changelogs/archive/2.4.0/release.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Enabling more operating systems!" 2 | -------------------------------------------------------------------------------- /changelogs/archive/2.4.0/server.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Server role - Add feature to clean up unused Checkmk versions on the server. 3 | -------------------------------------------------------------------------------- /changelogs/archive/2.4.1/agent.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Agent role - The activate changes handler was missing the server port. This is fixed now. 3 | -------------------------------------------------------------------------------- /changelogs/archive/3.0.0/agent.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Agent role - Allow throttling of discovery task to limit load on Checkmk server. 3 | -------------------------------------------------------------------------------- /changelogs/archive/3.0.0/breaking.yml: -------------------------------------------------------------------------------- 1 | breaking_changes: 2 | - Folder module - The module options 'attributes', 'update_attributes' and 'remove_attributes' are now mutually exclusive. Using more than one on a single task will cause a warning or error. 3 | - Host module - Deprecated option 'host_name' was removed. Use 'name' instead! 4 | - Host group module - Deprecated options 'host_group_name' and 'host_groups' were removed. Use 'name' and 'groups' instead! 5 | - Rule module - Deprecated option 'folder' was removed. Use 'location' instead! 6 | -------------------------------------------------------------------------------- /changelogs/archive/3.0.0/folder.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Folder module - Warn about mutually exclusive attribute options on older Checkmk versions and fail on recent Checkmk versions. See 'Breaking Changes'. 3 | -------------------------------------------------------------------------------- /changelogs/archive/3.0.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Removing deprecated module options and more cleaning." 2 | -------------------------------------------------------------------------------- /changelogs/archive/3.1.0/discovery.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Discovery module - Add handling for 409 response. 3 | -------------------------------------------------------------------------------- /changelogs/archive/3.1.0/lookup.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - Version lookup plugin - Add Version lookup plugin. 3 | -------------------------------------------------------------------------------- /changelogs/archive/3.1.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "It is summer and you want to look outside, so we added Windows." 2 | -------------------------------------------------------------------------------- /changelogs/archive/3.1.0/windows.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - Agent role - Add support for Windows. 3 | -------------------------------------------------------------------------------- /changelogs/archive/3.2.0/agent.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Agent role - Allow the role to download folder-specific agents. 3 | - Agent role - Add preflight check for correct Checkmk edition. 4 | bugfixes: 5 | - Agent role - Fix agent and update registration on remote sites. 6 | - Agent role - Fix activation handler URL. 7 | -------------------------------------------------------------------------------- /changelogs/archive/3.2.0/server.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Server role - Add preflight check for correct Checkmk edition. 3 | -------------------------------------------------------------------------------- /changelogs/archive/3.3.0/admin_pw.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Server role - Site management can now be done without specifying 'admin_pw'. 3 | 4 | known_issues: 5 | - Server role - Not having to provide an admin password introduces a problem though, as users could create sites without knowing the randomly generated password. A task is introduced to mitigate this, but the solution there could be improved. 6 | -------------------------------------------------------------------------------- /changelogs/archive/3.3.0/agent.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Agent role - Add support for firewall configuration on Debian derivates. 3 | bugfixes: 4 | - Agent role - Performing the agent registration on a remote would fail, if the host was just created. This release introduces a workaround to enable this. 5 | -------------------------------------------------------------------------------- /changelogs/archive/3.3.0/fix_folder_module.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Folder module - When creating a new folder with "attributes" parameter, the attributes were 3 | ignored. This is now fixed. 4 | -------------------------------------------------------------------------------- /changelogs/archive/3.3.0/lookup_plugins.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - Folder lookup plugin - Look up the configuration of a folder. 3 | - Folders lookup plugin - Look up all folders. 4 | - Host lookup plugin - Look up the configuration of a host. 5 | - Hosts lookup plugin - Look up all hosts. 6 | -------------------------------------------------------------------------------- /changelogs/archive/3.3.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "This is the librarian release: We added some lookups." 2 | -------------------------------------------------------------------------------- /changelogs/archive/3.3.0/timeperiod.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - Timeperiod module - Add timeperiod module. 3 | -------------------------------------------------------------------------------- /changelogs/archive/3.3.0/version_utils.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Utils - Provide a class CheckmkVersion to simplify version comparison. 3 | - Discovery module - Use the version comparison utils. 4 | -------------------------------------------------------------------------------- /changelogs/archive/3.4.0/agent_push.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Agent role - Introduce variable to configure agent mode. Refer to the README. 3 | 4 | bugfixes: 5 | - Agent role - Fix agent port check for agent modes other than "pull". 6 | -------------------------------------------------------------------------------- /changelogs/archive/3.4.0/cme_support.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - User module - Add support for the Checkmk Managed Edition (CME). 3 | - Service group module - Add support for the Checkmk Managed Edition (CME). 4 | - Password module - Add support for the Checkmk Managed Edition (CME). 5 | - Host group module - Add support for the Checkmk Managed Edition (CME). 6 | - Contact group module - Add support for the Checkmk Managed Edition (CME). 7 | -------------------------------------------------------------------------------- /changelogs/archive/3.4.0/no_log.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Agent role - Avoid logging passwords by default for extra security 3 | - Server role - Avoid logging passwords by default for extra security 4 | -------------------------------------------------------------------------------- /changelogs/archive/3.4.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Supporting managed service providers, admins and security. All in one release." 2 | -------------------------------------------------------------------------------- /changelogs/archive/3.4.0/server-omd-config.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Server role - Enable configuration of omd config values. Refer to the README for details. 3 | - Server role - Add new states "enabled" and "disabled" for site management. 4 | -------------------------------------------------------------------------------- /changelogs/archive/4.0.0/activation.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Activation module - Implement proper support for `redirect` parameter. 3 | This means, the activation module can now optionally wait for a completed 4 | activation or just trigger it and move on. 5 | -------------------------------------------------------------------------------- /changelogs/archive/4.0.0/breaking.yml: -------------------------------------------------------------------------------- 1 | breaking_changes: 2 | - Variable names - We aligned the names of variables throughout the collection. 3 | This can impact your existing configuration. 4 | Please review the variable names and apapt your configuration accordingly. 5 | For more details see `CONTRIBUTING.md`. 6 | - Agent role - We restructured the agent. 7 | That entails a lot of changes, and we tried to keep everything stable. 8 | However, we cannot guarantee stability as we do not know all use-cases out there. 9 | Hence this change is also considered breaking. 10 | - Server role - It became necessary to make the way states are handled more consistent. 11 | The most siginificant change is, that all sites not in state "started" will be stopped. 12 | For all other states please consult the role's README. 13 | -------------------------------------------------------------------------------- /changelogs/archive/4.0.0/discovery.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Discovery module - Print error message, when using state "tabula_rasa" 3 | in bulk discovery mode, because that state is not supported by the API. 4 | -------------------------------------------------------------------------------- /changelogs/archive/4.0.0/lookups.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - Bakery lookup plugin - Get the status of the Checkmk Agent Bakery. 3 | 4 | minor_changes: 5 | - Lookup API - Add improved error handling. 6 | -------------------------------------------------------------------------------- /changelogs/archive/4.0.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Move fast, break things." 2 | -------------------------------------------------------------------------------- /changelogs/archive/4.1.0/password.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Password module - Fix non-required module options being wrongly required. 3 | 4 | minor_changes: 5 | - Password module - Improve error handling. 6 | -------------------------------------------------------------------------------- /changelogs/archive/4.1.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Happy holidays, everyone!" 2 | -------------------------------------------------------------------------------- /changelogs/archive/4.1.0/rule_lookup_plugins.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - Rulesets lookup plugin - Search rulesets. 3 | - Ruleset lookup plugin - Show a particular ruleset. 4 | - Rules lookup plugin - List the rules of a ruleset. 5 | - Rule lookup plugin - Show a particular rule. 6 | -------------------------------------------------------------------------------- /changelogs/archive/4.2.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Happy New Year!" 2 | -------------------------------------------------------------------------------- /changelogs/archive/4.2.0/roles.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Agent role - Fix `become` in handler, which could cause errors on delegation. 3 | 4 | minor_changes: 5 | - Server role - Improve role speed by skipping downloads. 6 | -------------------------------------------------------------------------------- /changelogs/archive/4.2.0/rule.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Rule module - Fix idempotency for rule location relative to another rule_id, by getting the target folder from neighbour rule. 3 | -------------------------------------------------------------------------------- /changelogs/archive/4.2.0/tag_group.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - Tag_group module - Rewrite module and migrate to new collection API. 3 | 4 | minor_changes: 5 | - Tag_group module - Enable `help` and `repair` options. 6 | -------------------------------------------------------------------------------- /changelogs/archive/4.2.0/user.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - User module - Rewrite module and migrate to new collection API. 3 | 4 | minor_changes: 5 | - User module - Enable several interface options. 6 | -------------------------------------------------------------------------------- /changelogs/archive/4.3.0/fix_folder_module_idempotency.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Folder module - Fix idempotency when using "attributes" parameter for creating a folder. 3 | -------------------------------------------------------------------------------- /changelogs/archive/4.3.0/folder.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Folder module - Extend attribute management. Please refer to the module documentation 3 | for more details. 4 | -------------------------------------------------------------------------------- /changelogs/archive/4.3.0/lookups.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Lookup modules - Enable usage of ini files, environment and inventory variables 3 | to configure basic settings for the lookup plugins, like e.g., the server_url or site 4 | alongside the authentication options. Refer to the module documentation for details. 5 | 6 | known_issues: 7 | - Lookup modules - When using inventory variables to configure e.g., the server_url, 8 | it is not possible to assign other variables to these variables. 9 | This is a limitation of Ansible itself. 10 | -------------------------------------------------------------------------------- /changelogs/archive/4.3.0/parents.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Host module - Parents will be parsed properly now. 3 | This means, that parents given as a string will now be parsed as a list of one. 4 | - Folder module - Parents will be parsed properly now. 5 | This means, that parents given as a string will now be parsed as a list of one. 6 | -------------------------------------------------------------------------------- /changelogs/archive/4.3.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Reworking the CI, enhancing code quality and improving modules." 2 | -------------------------------------------------------------------------------- /changelogs/archive/4.3.0/rule.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Rule module - Introduce rule_id to uniquely identify rules. 3 | This ID can be retrieved e.g., using the lookup plugin. 4 | Refer to the module documentation for further details. 5 | -------------------------------------------------------------------------------- /changelogs/archive/4.3.0/user.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - User module - Fix bug, where an absent user was created, if 'reset_password' was used. 3 | -------------------------------------------------------------------------------- /changelogs/archive/4.3.1/fix_rule_conditions_missing.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Rule module - Fix empty rule conditions. 3 | -------------------------------------------------------------------------------- /changelogs/archive/4.3.1/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Bugfix Release." 2 | -------------------------------------------------------------------------------- /changelogs/archive/4.4.0/bakery.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Bakery module - Fix failing integration test due to wrong key passphrase. 3 | -------------------------------------------------------------------------------- /changelogs/archive/4.4.0/folder.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Folder module - Fix issues with uppercase and lowercase names. 3 | - Folder module - Fix issue where the `name` (alias `title`) was entirely ignored. 4 | -------------------------------------------------------------------------------- /changelogs/archive/4.4.0/host.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - Host module - Enable check mode. 3 | - Host module - Add support for cluster hosts. 4 | - Host module - Update attribute management behavior. Refer to the documentation for details. 5 | 6 | minor_changes: 7 | - Host module - Migrate module to the new collection API. 8 | -------------------------------------------------------------------------------- /changelogs/archive/4.4.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Spring is here! With a rewritten host module including check mode and cluster support." 2 | -------------------------------------------------------------------------------- /changelogs/archive/4.4.1/fix_host_initial_folder.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Host module - Fix hosts always being created in the main directory. 3 | -------------------------------------------------------------------------------- /changelogs/archive/4.4.1/meta.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Add 'ansible.utils' collection as an explicitely dependency. 3 | We already had this dependency, but are now declaring it explicitely. 4 | - Agent role - Add hint on depency for Python module 'netaddr' to role README. 5 | -------------------------------------------------------------------------------- /changelogs/archive/4.4.1/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Bugfix Release." 2 | -------------------------------------------------------------------------------- /changelogs/archive/5.0.0/agent.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Agent role - Add support to open firewall for a list of IPs. 3 | 4 | breaking_changes: 5 | - Agent role - Not really a breaking change, but we removed the internal variable `checkmk_agent_server_ip`. 6 | If you set this variable in your inventory, please make sure to update your configuration accordingly! 7 | -------------------------------------------------------------------------------- /changelogs/archive/5.0.0/build.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Testing - All tests now cover Checkmk 2.3.0. 3 | - Testing - Remove Checkmk 2.0.0 from all tests, as it is EOL. 4 | - Testing - The Molecule tests now run on Ubuntu 22.04. 5 | - Testing - Add Ubuntu 24.04 to the Molecule tests. 6 | - Testing - Remove Ansible 2.14 from all tests, as it is EOL. 7 | - Testing - Add Ansible 2.17 to all tests. 8 | Be advised, that this Ansible release drops support for Python 2.7 and 3.6. 9 | -------------------------------------------------------------------------------- /changelogs/archive/5.0.0/discovery.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - Discovery module - The module now fully supports Checkmk 2.3.0. 3 | Additionally, two new parameters were introduced, `update_service_labels` and `monitor_undecided_services`. 4 | Refer to the module documentation for further details. 5 | -------------------------------------------------------------------------------- /changelogs/archive/5.0.0/http.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Several modules - Remove unnecessary HTTP codes which get already imported via utils.py. 3 | -------------------------------------------------------------------------------- /changelogs/archive/5.0.0/lookup_folder.yml: -------------------------------------------------------------------------------- 1 | breaking_changes: 2 | - Folder lookup module - Return the complete folder information, not only the extensions. 3 | To keep the current behavior in your playbooks, you want to use `{{ my_lookup_result.extensions }}` 4 | instead of `{{ my_lookup_result }}`. 5 | -------------------------------------------------------------------------------- /changelogs/archive/5.0.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "(Re)writing history with overhauled modules and updated Checkmk, Ansible, Distribution and Python support." 2 | -------------------------------------------------------------------------------- /changelogs/archive/5.0.0/roles.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Agent role - Replace `ansible.builtin.yum` with the succeeding `ansible.builtin.dnf`. 3 | - Server role - Replace `ansible.builtin.yum` with the succeeding `ansible.builtin.dnf`. 4 | -------------------------------------------------------------------------------- /changelogs/archive/5.0.0/rule.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - Rule module - The complete module was rewritten to use the new module API. 3 | Additionally, a parameter "rule_id" was introduced to modify existing rules. 4 | Refer to the module documentation for further details. 5 | -------------------------------------------------------------------------------- /changelogs/archive/5.1.0/agent.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Agent role - For Windows hosts the download of correct setup files was broken 3 | due to a mixup in the modules used to fetch the files. The role would always 4 | fall back to the GENERIC agent, even if a specific agent was available. 5 | This is fixed now. 6 | 7 | minor_changes: 8 | - Agent role - Improve idempotency by reading the registration states both for 9 | Agent registration and Updater registration and skipping the registration 10 | if it is not necessary. 11 | -------------------------------------------------------------------------------- /changelogs/archive/5.1.0/build.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Testing - Testing against Python 3.8 was removed for all modules. 3 | -------------------------------------------------------------------------------- /changelogs/archive/5.1.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Some love for the agent role." 2 | -------------------------------------------------------------------------------- /changelogs/archive/5.1.0/variables.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Agent role - All internal variables are now prefixed with a double underscore (`__`). 3 | If you hooked into any variable, which is not in `defaults/main.yml` you need to check your inventory. 4 | Be advised, that it is bad practice, to use internal variables directly. 5 | - Server role - All internal variables are now prefixed with a double underscore (`__`). 6 | If you hooked into any variable, which is not in `defaults/main.yml` you need to check your inventory. 7 | Be advised, that it is bad practice, to use internal variables directly. 8 | -------------------------------------------------------------------------------- /changelogs/archive/5.10.0/feature_ansible_host_for_inventory.yml: -------------------------------------------------------------------------------- 1 | --- 2 | minor_changes: 3 | - Dynamic Inventory Source - Add possibility to update ansible_host with ip address from Checkmk 4 | -------------------------------------------------------------------------------- /changelogs/archive/5.10.0/fix-mkp-management.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Server role - The MKP management was using 'omd su site -c' to execute commands as site user but it does not work in all flavors/versions so changed to become_user instead. 3 | - Server role - The MKP management failed when try to install a mkp packages that already exists in the server. Added a conditional to validate stderr and don't fail if "exists on the site" is found. 4 | - Server role - The MKP management expects a boolean value for __mkp.installed and __mkp.enabled but in README.md and defaults.yml the usage examples set them as string. Changed README.md but also added "| bool" to force boolean even if string is defined. 5 | -------------------------------------------------------------------------------- /changelogs/archive/5.10.0/package_mgmt.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Server role - Use the generic `ansible.builtin.package` module for all packaging related tasks. 3 | - Agent role - Use the generic `ansible.builtin.package` module for all packaging related tasks. 4 | -------------------------------------------------------------------------------- /changelogs/archive/5.10.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Code cleaning and inventory organizing." 2 | -------------------------------------------------------------------------------- /changelogs/archive/5.10.0/utils.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - All modules - Move basic module parameters to utils. No functional changes. 3 | -------------------------------------------------------------------------------- /changelogs/archive/5.2.0/agent.yaml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Agent role - Allow registration on mixed protocol environments. 3 | This means the central and remote site do not both have to use either HTTP or HTTPS. 4 | 5 | bugfixes: 6 | - Agent role - Fix registration in cases where a prior registration failed. 7 | -------------------------------------------------------------------------------- /changelogs/archive/5.2.0/build.yaml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - The local development environment was cleaned up. We removed all traces of 3 | VirtualBox and now exclusively use KVM/QEMU virtualization. This has no 4 | effect on using the collection. It only affects you, if you develop for this 5 | collection and used the `Vagrantfile` or `Makefile`. 6 | -------------------------------------------------------------------------------- /changelogs/archive/5.2.0/downtime.yaml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Downtime module - Downtimes are now correctly removed when only specifying a single service. 3 | -------------------------------------------------------------------------------- /changelogs/archive/5.2.0/release_summary.yaml: -------------------------------------------------------------------------------- 1 | release_summary: "Some bug fixing and a module update." 2 | -------------------------------------------------------------------------------- /changelogs/archive/5.2.0/tag_group.yaml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Tag_group module - Enable module for Checkmk 2.4.0 by using 3 | `id` instead of `ident` to identify tag groups and their tags. 4 | See https://checkmk.com/werk/16364 for background information. 5 | - Tag_group module - Migrate module to new collection API. 6 | -------------------------------------------------------------------------------- /changelogs/archive/5.2.1/folder.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Folder module - Fix bug, where `update_attributes` failed on a folder with 3 | the Network Scan enabled. 4 | -------------------------------------------------------------------------------- /changelogs/archive/5.2.1/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Bugfix Release." 2 | -------------------------------------------------------------------------------- /changelogs/archive/5.3.0/checkmk.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - Dynamic Inventory Source - Add dynamic inventory source for Checkmk. 3 | -------------------------------------------------------------------------------- /changelogs/archive/5.3.0/folder.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Folder module - Fix an issue, where the folder module would create an 3 | uppercase folder but would not be able to find said folder. 4 | -------------------------------------------------------------------------------- /changelogs/archive/5.3.0/rule.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Rule module - Return 'content' and 'http_code', which includes the 'rule_id'. 3 | -------------------------------------------------------------------------------- /changelogs/archive/5.3.0/site.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - Site module - Add module for distributed monitoring. 3 | Refer to the module documentation for further details. 4 | - Site lookup module - Add module to lookup details of a single site. 5 | - Sites lookup module - Add module to lookup all sites and their details 6 | in a distributed monitoring setup. 7 | 8 | known_issues: 9 | - Site module - To completely enable a site, the livestatus certificate 10 | needs to be trusted. This cannot be done with the site module. 11 | As of now, there is no automatic way to do this, so you need to log into 12 | the site and add the certificate to the trusted certificates manually. 13 | -------------------------------------------------------------------------------- /changelogs/archive/5.3.1/groups.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - contact_group module - Fix the passing of the 'customer' attribute, when the 3 | 'groups' parameter is used. 4 | - host_group module - Fix the passing of the 'customer' attribute, when the 5 | 'groups' parameter is used. 6 | - service_group module - Fix the passing of the 'customer' attribute, when the 7 | 'groups' parameter is used. 8 | -------------------------------------------------------------------------------- /changelogs/archive/5.3.1/rule.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - rule module - Fix moving of existing rules to a different folder. 3 | -------------------------------------------------------------------------------- /changelogs/archive/5.3.2/release.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Build related changes and documentation fixes for the holiday season." 2 | -------------------------------------------------------------------------------- /changelogs/archive/5.4.0/agent.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Agent role - Add option to perform a proxy registration. Refer to the README for details. 3 | -------------------------------------------------------------------------------- /changelogs/archive/5.4.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Enabling proxy registration for the agent role." 2 | -------------------------------------------------------------------------------- /changelogs/archive/5.5.0/agent.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Agent role - Fix permissions on vanilla agent setup file. 3 | -------------------------------------------------------------------------------- /changelogs/archive/5.5.0/release.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Make the server tmp directory configurable." 2 | -------------------------------------------------------------------------------- /changelogs/archive/5.5.0/server.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - Server role - Fix argument spec for checkmk_server_sites.edition. 3 | 4 | minor_changes: 5 | - Server role - Make tmp directory configurable. 6 | -------------------------------------------------------------------------------- /changelogs/archive/5.6.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Enable MKP management for the server role." 2 | -------------------------------------------------------------------------------- /changelogs/archive/5.6.0/server.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Server role - Enable management of MKP packages. 3 | -------------------------------------------------------------------------------- /changelogs/archive/5.7.0/agent.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Agent role - Enable specifying a custom timeout for downloading the agent setup from the server. 3 | 4 | bugfixes: 5 | - Agent role - Fix quoting of passwords for agent registration. 6 | -------------------------------------------------------------------------------- /changelogs/archive/5.7.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Agent Smith approved." 2 | -------------------------------------------------------------------------------- /changelogs/archive/5.8.0/2.4.0.yml: -------------------------------------------------------------------------------- 1 | major_changes: 2 | - All modules and roles - Supporting Checkmk 2.4.0 from this version onwards. 3 | - Discovery module - Rewrite the whole module for better support across Checkmk versions. 4 | 5 | minor_changes: 6 | - Site module - Support the new mandatory broker port parameter. 7 | - All modules - Enable extended logging. 8 | -------------------------------------------------------------------------------- /changelogs/archive/5.8.0/gpg.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Server role - Make GPG key download URL configurable. 3 | -------------------------------------------------------------------------------- /changelogs/archive/5.8.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Checkmk 2.4.0 support is here!" 2 | -------------------------------------------------------------------------------- /changelogs/archive/5.8.0/user.yml: -------------------------------------------------------------------------------- 1 | bugfixes: 2 | - User role - No longer allow to modify the user that is used for API authorization. 3 | -------------------------------------------------------------------------------- /changelogs/archive/5.9.0/build.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Development - The main Vagrant box which supports development of this collection was moved to Debian 10, Podman and uv. 3 | This change does not affect the contents of the collection. It should also be mostly transparent for contributors, developing content for the collection. 4 | But be advised, if something feels off, these changes might be relevant. 5 | - Development - Many clean-ups and fixes in various places. No functional changes. 6 | -------------------------------------------------------------------------------- /changelogs/archive/5.9.0/discovery.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - Discovery module - Support the latest development version of Checkmk. 3 | This is a work in progress, but should enable using the collection with daily builds of Checkmk. 4 | -------------------------------------------------------------------------------- /changelogs/archive/5.9.0/release_summary.yml: -------------------------------------------------------------------------------- 1 | release_summary: "Spring cleaning. Some module maintenance and some quality of life improvements for developing the collection." 2 | -------------------------------------------------------------------------------- /changelogs/archive/5.9.0/tag_group.yml: -------------------------------------------------------------------------------- 1 | minor_changes: 2 | - tag_group module - Add "aux_tags" suboption for tags in tag_group module. 3 | 4 | known_issues: 5 | - tag_group module - The "aux_tags" suboption introduced in this version enables assigning existing "aux_tags" to tag groups. 6 | It does not enable management of "aux_tags" themselves. See issue 771 for progress on that module. 7 | -------------------------------------------------------------------------------- /changelogs/config.yaml: -------------------------------------------------------------------------------- 1 | changelog_filename_template: ../CHANGELOG.rst 2 | changelog_filename_version_depth: 0 3 | changes_file: changelog.yaml 4 | changes_format: combined 5 | ignore_other_fragment_extensions: true 6 | keep_fragments: false 7 | archive_path_template: changelogs/archive/{version}/ 8 | mention_ancestor: true 9 | new_plugins_after_name: removed_features 10 | notesdir: fragments 11 | prelude_section_name: release_summary 12 | prelude_section_title: Release Summary 13 | sanitize_changelog: true 14 | sections: 15 | - - major_changes 16 | - Major Changes 17 | - - minor_changes 18 | - Minor Changes 19 | - - breaking_changes 20 | - Breaking Changes / Porting Guide 21 | - - deprecated_features 22 | - Deprecated Features 23 | - - removed_features 24 | - Removed Features (previously deprecated) 25 | - - security_fixes 26 | - Security Fixes 27 | - - bugfixes 28 | - Bugfixes 29 | - - known_issues 30 | - Known Issues 31 | title: checkmk.general 32 | trivial_section_name: trivial 33 | use_fqcn: true 34 | -------------------------------------------------------------------------------- /changelogs/fragments/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Checkmk/ansible-collection-checkmk.general/7d82049c224b0734c9771b7b38205d2b893dedd3/changelogs/fragments/.gitkeep -------------------------------------------------------------------------------- /meta/runtime.yml: -------------------------------------------------------------------------------- 1 | requires_ansible: '>=2.15.0' 2 | 3 | action_groups: 4 | checkmk: 5 | - activation 6 | - bakery 7 | - contact_group 8 | - discovery 9 | - downtime 10 | - folder 11 | - host_group 12 | - host 13 | - password 14 | - rule 15 | - service_group 16 | - site 17 | - tag_group 18 | - timeperiod 19 | - user 20 | -------------------------------------------------------------------------------- /misc/README.md: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | This folder contains miscellaneous files, that might be relevant for this collection. 3 | They will not be released and are only intended to support development. 4 | 5 | ## Setup Files 6 | Files with the extension `.setup` are files that contain the output of the 7 | `ansible -m setup` command. They are intended as a reference, if one needs 8 | to look up the value of a certain variable. -------------------------------------------------------------------------------- /playbooks/README.md: -------------------------------------------------------------------------------- 1 | # Playbooks 2 | 3 | ## Getting started 4 | This playbooks folder has several sub folders. 5 | Depending on what you are looking for, dive into the folders 6 | and see the respective READMEs. 7 | 8 | Name | Description 9 | --- | --- 10 | [demo](./demo/)|Contains demo playbooks that showcase functionality of this collection in a generic way. 11 | [usecases](./usecases/)|Contains playbooks for specific use cases. 12 | [vars](./vars/)|Contains variable files. We ship a `config.yml.example` for you to copy and several files for the [demo](./demo/) folder. 13 | [roles.yml](./roles.yml)|Run the roles contained in this collection. Use the tags `agent` and `server` to limit the run to one role. Primarily used for testing. -------------------------------------------------------------------------------- /playbooks/demo/README.md: -------------------------------------------------------------------------------- 1 | # Demo Playbooks 2 | 3 | ## About 4 | These playbooks demonstrate the different modules contained in this collection. 5 | The naming should be rather obvious. The only *special* playbook is [full.yml](./full.yml). 6 | As the name suggests, it runs all the playbooks contained in this folder. 7 | 8 | ## Getting started 9 | To get started, inspect [../vars/auth.yml](../vars/auth.yml). 10 | You need to set up a local site, just as described, or provide the details to an existing site. Do **not** use a productive site here! 11 | 12 | Once the prerequisites are met, you can run the playbook with the inventory 13 | provided at [../hosts](../hosts): 14 | 15 | # You need to be in the project root for this to work! 16 | cd ../../ 17 | ansible-playbook -i playbooks/hosts playbooks/demo/full.yml 18 | -------------------------------------------------------------------------------- /playbooks/demo/full.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Lookup Plugins." 3 | ansible.builtin.import_playbook: lookup.yml 4 | - name: "Hosts and Folders." 5 | ansible.builtin.import_playbook: hosts-and-folders.yml 6 | - name: "Groups." 7 | ansible.builtin.import_playbook: groups.yml 8 | - name: "Users and Contacts." 9 | ansible.builtin.import_playbook: users-and-contacts.yml 10 | - name: "Rules." 11 | ansible.builtin.import_playbook: rules.yml 12 | - name: "Downtimes." 13 | ansible.builtin.import_playbook: downtimes.yml 14 | -------------------------------------------------------------------------------- /playbooks/hosts: -------------------------------------------------------------------------------- 1 | [test] 2 | test1.tld checkmk_var_folder_path="/test" 3 | test2.tld checkmk_var_folder_path="/foo" 4 | test3.tld checkmk_var_folder_path="/bar" 5 | test4.tld checkmk_var_folder_path="/" 6 | test5.tld checkmk_var_folder_path="/foo/bar" 7 | 8 | [linux] 9 | ansibuntu ansible_host=192.168.124.61 checkmk_var_folder_path="/test" 10 | debsible ansible_host=192.168.124.62 checkmk_var_folder_path="/foo" 11 | anstream ansible_host=192.168.124.63 checkmk_var_folder_path="foo/bar" 12 | ansuse ansible_host=192.168.124.64 checkmk_var_folder_path="/bar" 13 | ansles ansible_host=192.168.124.65 checkmk_var_folder_path="/bar/foo" 14 | ansoracle ansible_host=192.168.124.66 checkmk_var_folder_path="/foo" 15 | 16 | [windows] 17 | ansidows ansible_host=192.168.124.67 checkmk_var_folder_path="/" 18 | 19 | [windows:vars] 20 | ansible_shell_type = cmd 21 | ansible_winrm_scheme = http 22 | ansible_winrm_transport = basic 23 | ansible_winrm_server_cert_validation = ignore 24 | 25 | [vagrant:children] 26 | linux 27 | windows 28 | 29 | [vagrant:vars] 30 | ansible_user=vagrant 31 | -------------------------------------------------------------------------------- /playbooks/inventory/checkmk.yml: -------------------------------------------------------------------------------- 1 | plugin: checkmk.general.checkmk 2 | server_url: "http://localhost/" 3 | site: "hyde" 4 | automation_user: "cmkadmin" 5 | automation_secret: "cmk" 6 | validate_certs: false 7 | groupsources: ["hosttags", "sites"] 8 | want_ipv4: false 9 | -------------------------------------------------------------------------------- /playbooks/roles.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Run roles." 3 | hosts: vagrant 4 | strategy: linear 5 | 6 | vars_files: 7 | - ./vars/config.yml 8 | 9 | tasks: 10 | 11 | - name: "Run server role." 12 | tags: [server] 13 | ansible.builtin.import_role: 14 | name: server 15 | 16 | - name: "Create folders." 17 | tags: [agent] 18 | checkmk.general.folder: 19 | server_url: "{{ checkmk_var_server_url }}" 20 | site: "{{ checkmk_var_site }}" 21 | automation_user: "{{ checkmk_var_automation_user }}" 22 | automation_secret: "{{ checkmk_var_automation_secret }}" 23 | validate_certs: "{{ checkmk_agent_server_validate_certs }}" 24 | path: "{{ item.path }}" 25 | name: "{{ item.name }}" 26 | state: "present" 27 | delegate_to: localhost 28 | run_once: true # noqa run-once[task] 29 | loop: "{{ checkmk_var_folders }}" 30 | 31 | - name: "Run agent role." 32 | tags: [agent] 33 | ansible.builtin.import_role: 34 | name: agent 35 | -------------------------------------------------------------------------------- /playbooks/vars/auth.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Provice the URL and credentials to your Checkmk site here # 3 | checkmk_var_server_url: "http://myserver/" 4 | checkmk_var_site: "mysite" 5 | checkmk_var_automation_user: "myuser" 6 | checkmk_var_automation_secret: "mysecret" 7 | checkmk_agent_user: "{{ checkmk_var_automation_user }}" 8 | checkmk_agent_pass: "{{ checkmk_var_automation_secret }}" 9 | 10 | checkmk_var_version: "2.3.0p6" 11 | checkmk_var_edition: "cre" 12 | ############################################################# 13 | 14 | # Set to true, to skip the break points: 15 | checkmk_var_run_unattended: false 16 | -------------------------------------------------------------------------------- /playbooks/vars/config.yml.example: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_server_url: "http://myserver/" 3 | checkmk_var_site: "mysite" 4 | checkmk_var_automation_user: "myuser" 5 | checkmk_var_automation_secret: "mysecret" 6 | 7 | checkmk_var_folders: 8 | - path: /test 9 | title: Test 10 | - path: /foo 11 | title: Foo 12 | - path: /bar 13 | title: Bar 14 | - path: /foo/bar 15 | title: Bar 16 | - path: /bar/foo 17 | title: Foo 18 | - path: /foo/bar/treasure 19 | title: Treasure 20 | 21 | checkmk_var_ruleset: "checkgroup_parameters:memory_percentage_used" 22 | 23 | checkmk_var_rule: 24 | conditions: { 25 | "host_labels": [], 26 | "host_name": { 27 | "match_on": [ 28 | "test1.tld" 29 | ], 30 | "operator": "one_of" 31 | }, 32 | "host_tags": [], 33 | "service_labels": [] 34 | } 35 | properties: { 36 | "comment": "Warning at 80%\nCritical at 90%\n", 37 | "description": "Allow higher memory usage", 38 | "disabled": false, 39 | "documentation_url": "https://github.com/Checkmk/ansible-collection-checkmk.general/blob/main/plugins/modules/rules.py" 40 | } 41 | value_raw: "{'levels': (80.0, 90.0)}" 42 | -------------------------------------------------------------------------------- /playbooks/vars/folders.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_folders: 3 | - path: /test 4 | name: Test 5 | - path: /foo/ 6 | name: Foo 7 | - path: /bar 8 | name: Bar 9 | - path: /foo/bar 10 | name: Bar 11 | - path: /bar/foo 12 | name: Foo 13 | - path: /foo/bar/treasure 14 | name: Treasure 15 | -------------------------------------------------------------------------------- /playbooks/vars/rules.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_rules: 3 | 4 | - name: "Filesystem - Magic Factor." 5 | ruleset: "checkgroup_parameters:filesystem" 6 | rule: 7 | location: 8 | folder: "/" 9 | position: "bottom" 10 | conditions: { 11 | "host_labels": [], 12 | "host_tags": [], 13 | "service_labels": [] 14 | } 15 | properties: { 16 | "comment": "{{ ansible_date_time.iso8601 }} - Ansible managed", 17 | "description": "", 18 | "disabled": false 19 | } 20 | value_raw: "{'magic': 0.8}" 21 | -------------------------------------------------------------------------------- /playbooks/vars/users.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_users: 3 | - name: user1 4 | fullname: User Eins 5 | password: "123" 6 | newpassword: "abc" 7 | auth_type: password 8 | email: 123@company.com 9 | contactgroups: 10 | - server 11 | fallback_contact: true 12 | - name: user2 13 | fullname: User Zwei 14 | password: "234" 15 | newpassword: "bcd" 16 | auth_type: password 17 | email: 234@company.com 18 | contactgroups: 19 | - linux 20 | fallback_contact: true 21 | - name: user3 22 | fullname: User Drei 23 | password: "345" 24 | newpassword: "cde" 25 | auth_type: password 26 | email: 345@company.com 27 | contactgroups: 28 | - network 29 | fallback_contact: false 30 | -------------------------------------------------------------------------------- /plugins/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Checkmk/ansible-collection-checkmk.general/7d82049c224b0734c9771b7b38205d2b893dedd3/plugins/__init__.py -------------------------------------------------------------------------------- /plugins/doc_fragments/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Checkmk/ansible-collection-checkmk.general/7d82049c224b0734c9771b7b38205d2b893dedd3/plugins/doc_fragments/__init__.py -------------------------------------------------------------------------------- /plugins/doc_fragments/common.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, print_function 2 | 3 | __metaclass__ = type 4 | 5 | 6 | class ModuleDocFragment(object): 7 | DOCUMENTATION = r""" 8 | options: 9 | server_url: 10 | description: The base url of your Checkmk server including the protocol but excluding the site. 11 | required: true 12 | type: str 13 | site: 14 | description: The site you want to connect to. This will be appended to the server_url as part of the API request url. 15 | required: true 16 | type: str 17 | automation_user: 18 | description: The automation user you want to use. It has to be an 'Automation' user, not a normal one. 19 | required: true 20 | type: str 21 | automation_secret: 22 | description: The secret to authenticate your automation user. 23 | required: true 24 | type: str 25 | validate_certs: 26 | description: Whether to validate the SSL certificate of the Checkmk server. 27 | default: true 28 | type: bool 29 | """ 30 | -------------------------------------------------------------------------------- /plugins/lookup/README.md: -------------------------------------------------------------------------------- 1 | # Lookup Plugins 2 | 3 | ## Using variables for Lookup plugins 4 | It is possible to set variables for authentication globally for lookup plugins. 5 | This way, they do not need to be provided at task level. 6 | 7 | ### Method 1: Environment variables 8 | ```bash 9 | export ANSIBLE_LOOKUP_CHECKMK_SERVER_URL="https://myserver" 10 | export ANSIBLE_LOOKUP_CHECKMK_SITE=mysite 11 | export ANSIBLE_LOOKUP_CHECKMK_AUTOMATION_USER=automation 12 | export ANSIBLE_LOOKUP_CHECKMK_AUTOMATION_SECRET=mysecret 13 | export ANSIBLE_LOOKUP_CHECKMK_VALIDATE_CERTS=False 14 | ``` 15 | 16 | ### Method 2: In `ansible.cfg` 17 | ```ini 18 | [checkmk_lookup] 19 | server_url = https://myserver 20 | site = mysite 21 | automation_user = automation 22 | automation_secret = mysecret 23 | validate_certs = False 24 | 25 | ``` 26 | 27 | ### Method 3: In playbooks or the inventory 28 | ```yaml 29 | - name: My Task 30 | hosts: localhost 31 | gather_facts: false 32 | vars: 33 | ansible_lookup_checkmk_server_url: "https://myserver" 34 | ansible_lookup_checkmk_site: "mysite" 35 | ansible_lookup_checkmk_automation_user: "automation" 36 | ansible_lookup_checkmk_automation_secret: "mysecret" 37 | ansible_lookup_checkmk_validate_certs: false 38 | 39 | tasks: 40 | - name: Get the attributes of myhost 41 | ansible.builtin.debug: 42 | msg: "Attributes of myhost: {{ attributes }}" 43 | vars: 44 | attributes: "{{ lookup('checkmk.general.host', 'myhost', effective_attributes=True) }}" 45 | ``` 46 | 47 | ### Example 48 | The following task will work, if one of the above methods has been applied. 49 | ```yaml 50 | - name: My Task 51 | tasks: 52 | - name: Get the attributes of myhost 53 | ansible.builtin.debug: 54 | msg: "Attributes of myhost: {{ attributes }}" 55 | vars: 56 | attributes: "{{ lookup('checkmk.general.host', 'myhost', effective_attributes=True) }}" 57 | ``` 58 | -------------------------------------------------------------------------------- /plugins/module_utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Checkmk/ansible-collection-checkmk.general/7d82049c224b0734c9771b7b38205d2b893dedd3/plugins/module_utils/__init__.py -------------------------------------------------------------------------------- /plugins/module_utils/logger.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- encoding: utf-8; py-indent-offset: 4 -*- 3 | 4 | # Copyright: (c) 2024, Lars Getwan 5 | # GNU General Public License v3.0+ 6 | # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 7 | from __future__ import absolute_import, division, print_function 8 | 9 | __metaclass__ = type 10 | 11 | 12 | class Logger: 13 | def __init__(self): 14 | self.output = [] 15 | self.loglevel = 0 16 | 17 | def set_loglevel(self, loglevel): 18 | self.loglevel = loglevel 19 | 20 | def warn(self, msg): 21 | self.output.append("WARN: %s" % msg) 22 | 23 | def info(self, msg): 24 | if self.loglevel >= 1: 25 | self.output.append("INFO: %s" % msg) 26 | 27 | def debug(self, msg): 28 | if self.loglevel >= 2: 29 | self.output.append("DEBUG: %s" % msg) 30 | 31 | def trace(self, msg): 32 | if self.loglevel >= 3: 33 | self.output.append("TRACE: %s" % msg) 34 | 35 | def get_log(self): 36 | return "\n".join(self.output) 37 | -------------------------------------------------------------------------------- /plugins/module_utils/types.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- encoding: utf-8; py-indent-offset: 4 -*- 3 | 4 | # Copyright: (c) 2023, Marcel Arentz 5 | # GNU General Public License v3.0+ 6 | # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 7 | 8 | # Ensure compatibility to Python2 9 | from __future__ import absolute_import, division, print_function 10 | 11 | __metaclass__ = type 12 | 13 | from collections import namedtuple 14 | 15 | RESULT = namedtuple("Result", "http_code msg content etag changed failed") 16 | 17 | RESULT_DEFAULTS = { 18 | "msg": "", 19 | "http_code": -1, 20 | "failed": True, 21 | "changed": False, 22 | "content": "", 23 | "etag": "", 24 | } 25 | 26 | 27 | def generate_result( 28 | msg=RESULT_DEFAULTS["msg"], 29 | http_code=RESULT_DEFAULTS["http_code"], 30 | failed=RESULT_DEFAULTS["failed"], 31 | changed=RESULT_DEFAULTS["changed"], 32 | content=RESULT_DEFAULTS["content"], 33 | etag=RESULT_DEFAULTS["etag"], 34 | ): 35 | return RESULT( 36 | msg=msg, 37 | http_code=http_code, 38 | failed=failed, 39 | changed=changed, 40 | content=content, 41 | etag=etag, 42 | ) 43 | -------------------------------------------------------------------------------- /plugins/modules/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Checkmk/ansible-collection-checkmk.general/7d82049c224b0734c9771b7b38205d2b893dedd3/plugins/modules/__init__.py -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "checkmk_ansible_collection" 3 | version = "5.10.0" 4 | requires-python = ">=3.11" 5 | dependencies = [ 6 | "ansible", 7 | "antsibull-changelog", 8 | "antsibull-docs", 9 | "ansible-lint", 10 | "jinja2", 11 | "molecule<25.5.0", 12 | "molecule-plugins[docker]", 13 | "yamllint", 14 | "pywinrm", 15 | "netaddr", 16 | ] 17 | 18 | [dependency-groups] 19 | dev = [ 20 | "black==25.1.0", 21 | "click==8.2.0", 22 | "isort==6.0.1", 23 | "mypy-extensions==1.1.0", 24 | "pathspec==0.12.1", 25 | "platformdirs==4.3.8", 26 | "tomli==2.2.1", 27 | "typing-extensions==4.13.2", 28 | ] 29 | 30 | 31 | [tool.isort] 32 | profile = "black" 33 | -------------------------------------------------------------------------------- /qa-requirements.txt: -------------------------------------------------------------------------------- 1 | black==25.1.0 2 | click==8.2.1 3 | isort==6.0.1 4 | mypy-extensions==1.1.0 5 | pathspec==0.12.1 6 | platformdirs==4.3.8 7 | tomli==2.2.1 8 | typing-extensions==4.13.2 9 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | ansible 2 | antsibull-changelog 3 | antsibull-docs 4 | ansible-lint 5 | jinja2 6 | molecule < 25.5.0 7 | molecule-plugins[docker] 8 | yamllint 9 | pywinrm 10 | netaddr 11 | -------------------------------------------------------------------------------- /requirements.yml: -------------------------------------------------------------------------------- 1 | --- 2 | collections: 3 | - name: checkmk.general 4 | -------------------------------------------------------------------------------- /roles/agent/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Activate changes" 3 | checkmk.general.activation: 4 | server_url: "{{ checkmk_agent_server_protocol }}://{{ checkmk_agent_server }}:{{ checkmk_agent_server_port }}/" 5 | site: "{{ checkmk_agent_site }}" 6 | automation_user: "{{ checkmk_agent_user }}" 7 | automation_secret: "{{ __checkmk_agent_auth }}" 8 | force_foreign_changes: "{{ checkmk_agent_force_foreign_changes }}" 9 | redirect: 'true' 10 | validate_certs: "{{ checkmk_agent_server_validate_certs }}" 11 | become: false 12 | delegate_to: "{{ checkmk_agent_delegate_api_calls }}" 13 | run_once: true # noqa run-once[task] 14 | when: checkmk_agent_auto_activate | bool 15 | -------------------------------------------------------------------------------- /roles/agent/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | role_name: agent 4 | 5 | author: Robin Gierse 6 | company: Checkmk GmbH 7 | description: This role installs Checkmk agents. 8 | 9 | # If the issue tracker for your role is not on github, uncomment the 10 | # next line and provide a value 11 | # issue_tracker_url: http://example.com/issue/tracker 12 | 13 | # Choose a valid license ID from https://spdx.org - some suggested licenses: 14 | # - BSD-3-Clause (default) 15 | # - MIT 16 | # - GPL-2.0-or-later 17 | # - GPL-3.0-only 18 | # - Apache-2.0 19 | # - CC-BY-4.0 20 | license: GPL-2.0-or-later 21 | 22 | min_ansible_version: "2.4" 23 | 24 | # If this a Container Enabled role, provide the minimum Ansible Container version. 25 | # min_ansible_container_version: 26 | 27 | # 28 | # Provide a list of supported platforms, and for each platform a list of versions. 29 | # If you don't wish to enumerate all versions for a particular platform, use 'all'. 30 | # To view available platforms and versions (or releases), visit: 31 | # https://galaxy.ansible.com/api/v1/platforms/ 32 | # 33 | platforms: 34 | - name: Debian 35 | versions: 36 | - all 37 | - name: Ubuntu 38 | versions: 39 | - all 40 | - name: EL 41 | versions: 42 | - all 43 | - name: opensuse 44 | versions: 45 | - all 46 | - name: SLES 47 | versions: 48 | - all 49 | - name: Windows 50 | versions: 51 | - all 52 | 53 | galaxy_tags: [checkmk, monitoring, agent] 54 | # List tags for your role here, one per line. A tag is a keyword that describes 55 | # and categorizes the role. Users find roles by searching for tags. Be sure to 56 | # remove the '[]' above, if you add tags to this list. 57 | # 58 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 59 | # Maximum 20 tags per role. 60 | 61 | dependencies: [] 62 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 63 | # if you add dependencies to this list. 64 | -------------------------------------------------------------------------------- /roles/agent/molecule/2.2.0/converge.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Converge 3 | hosts: all 4 | 5 | pre_tasks: 6 | 7 | - name: Update apt cache. 8 | ansible.builtin.package: 9 | update_cache: true 10 | cache_valid_time: 600 11 | when: ansible_os_family == 'Debian' 12 | 13 | - name: Install prerequisites. 14 | ansible.builtin.package: 15 | name: "{{ item }}" 16 | state: present 17 | loop: 18 | - apt-utils 19 | - man 20 | - ufw 21 | when: ansible_os_family == 'Debian' 22 | 23 | - name: Install prerequisites. 24 | ansible.builtin.package: 25 | name: "{{ item }}" 26 | state: present 27 | loop: 28 | - firewalld 29 | when: ansible_os_family == 'RedHat' 30 | 31 | - name: Create '/usr/share/man/man8/' on Ubuntu. 32 | ansible.builtin.file: 33 | path: /usr/share/man/man8/ 34 | state: directory 35 | mode: "0755" 36 | owner: root 37 | group: root 38 | when: ansible_distribution == 'Ubuntu' 39 | 40 | tasks: 41 | 42 | - name: "Run server role." 43 | ansible.builtin.include_role: 44 | name: server 45 | 46 | - name: "Run agent role." 47 | ansible.builtin.include_role: 48 | name: agent 49 | -------------------------------------------------------------------------------- /roles/agent/molecule/2.2.0/molecule.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # cgroupv2 support: https://github.com/geerlingguy/docker-ubuntu2204-ansible/issues/6 3 | dependency: 4 | name: galaxy 5 | driver: 6 | name: docker 7 | platforms: 8 | - name: ubuntu2204 9 | image: geerlingguy/docker-ubuntu2204-ansible 10 | command: ${MOLECULE_DOCKER_COMMAND:-""} 11 | cgroupns_mode: host 12 | tmpfs: 13 | - /run 14 | volumes: 15 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 16 | privileged: true 17 | pre_build_image: true 18 | - name: ubuntu2404 19 | image: geerlingguy/docker-ubuntu2404-ansible 20 | command: ${MOLECULE_DOCKER_COMMAND:-""} 21 | cgroupns_mode: host 22 | tmpfs: 23 | - /run 24 | volumes: 25 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 26 | privileged: true 27 | pre_build_image: true 28 | - name: debian11 29 | image: geerlingguy/docker-debian11-ansible 30 | command: ${MOLECULE_DOCKER_COMMAND:-""} 31 | cgroupns_mode: host 32 | tmpfs: 33 | - /run 34 | volumes: 35 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 36 | privileged: true 37 | pre_build_image: true 38 | - name: debian12 39 | image: geerlingguy/docker-debian12-ansible 40 | command: ${MOLECULE_DOCKER_COMMAND:-""} 41 | cgroupns_mode: host 42 | tmpfs: 43 | - /run 44 | volumes: 45 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 46 | privileged: true 47 | pre_build_image: true 48 | - name: rockylinux9 49 | image: geerlingguy/docker-rockylinux9-ansible 50 | command: ${MOLECULE_DOCKER_COMMAND:-""} 51 | cgroupns_mode: host 52 | tmpfs: 53 | - /run 54 | volumes: 55 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 56 | privileged: true 57 | pre_build_image: true 58 | provisioner: 59 | name: ansible 60 | config_options: 61 | defaults: 62 | roles_path: "$MOLECULE_PROJECT_DIRECTORY/.." 63 | verifier: 64 | name: ansible 65 | scenario: 66 | test_sequence: 67 | - dependency 68 | - cleanup 69 | - destroy 70 | - syntax 71 | - create 72 | - prepare 73 | - converge 74 | # - idempotence # disable for now, as we have non-idempotent tasks 75 | # - side_effect 76 | - verify 77 | - cleanup 78 | - destroy 79 | -------------------------------------------------------------------------------- /roles/agent/molecule/2.2.0/verify.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Verify 3 | hosts: all 4 | gather_facts: false 5 | tasks: 6 | 7 | - name: Populate service facts. 8 | ansible.builtin.service_facts: 9 | 10 | - name: "Test Agent is present." 11 | ansible.builtin.stat: 12 | path: "/usr/bin/check_mk_agent" 13 | register: checkmk_agent_file 14 | 15 | - name: "Verify Agent is present." 16 | ansible.builtin.assert: 17 | that: checkmk_agent_file.stat.exists | bool 18 | 19 | - name: "Test Agent Service is running." 20 | ansible.builtin.assert: 21 | that: "'check-mk-agent-async.service' in ansible_facts.services" 22 | 23 | - name: "Test that the Agent is listening on the default Port." 24 | ansible.builtin.wait_for: 25 | port: "{{ checkmk_agent_port }}" 26 | connect_timeout: 30 27 | register: checkmk_agent_port_state 28 | 29 | - name: "Test Agent Service is listening on port {{ checkmk_agent_port }}." 30 | ansible.builtin.assert: 31 | that: "(checkmk_agent_port_state.port == checkmk_agent_port) and (checkmk_agent_port_state.state == 'started')" 32 | -------------------------------------------------------------------------------- /roles/agent/molecule/2.3.0/converge.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Converge 3 | hosts: all 4 | 5 | pre_tasks: 6 | 7 | - name: Update apt cache. 8 | ansible.builtin.package: 9 | update_cache: true 10 | cache_valid_time: 600 11 | when: ansible_os_family == 'Debian' 12 | 13 | - name: Install prerequisites. 14 | ansible.builtin.package: 15 | name: "{{ item }}" 16 | state: present 17 | loop: 18 | - apt-utils 19 | - man 20 | - ufw 21 | when: ansible_os_family == 'Debian' 22 | 23 | - name: Install prerequisites. 24 | ansible.builtin.package: 25 | name: "{{ item }}" 26 | state: present 27 | loop: 28 | - firewalld 29 | when: ansible_os_family == 'RedHat' 30 | 31 | - name: Create '/usr/share/man/man8/' on Ubuntu. 32 | ansible.builtin.file: 33 | path: /usr/share/man/man8/ 34 | state: directory 35 | mode: "0755" 36 | owner: root 37 | group: root 38 | when: ansible_distribution == 'Ubuntu' 39 | 40 | tasks: 41 | 42 | - name: "Run server role." 43 | ansible.builtin.include_role: 44 | name: server 45 | 46 | - name: "Run agent role." 47 | ansible.builtin.include_role: 48 | name: agent 49 | -------------------------------------------------------------------------------- /roles/agent/molecule/2.3.0/molecule.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # cgroupv2 support: https://github.com/geerlingguy/docker-ubuntu2204-ansible/issues/6 3 | dependency: 4 | name: galaxy 5 | driver: 6 | name: docker 7 | platforms: 8 | - name: ubuntu2204 9 | image: geerlingguy/docker-ubuntu2204-ansible 10 | command: ${MOLECULE_DOCKER_COMMAND:-""} 11 | cgroupns_mode: host 12 | tmpfs: 13 | - /run 14 | volumes: 15 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 16 | privileged: true 17 | pre_build_image: true 18 | - name: ubuntu2404 19 | image: geerlingguy/docker-ubuntu2404-ansible 20 | command: ${MOLECULE_DOCKER_COMMAND:-""} 21 | cgroupns_mode: host 22 | tmpfs: 23 | - /run 24 | volumes: 25 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 26 | privileged: true 27 | pre_build_image: true 28 | - name: debian11 29 | image: geerlingguy/docker-debian11-ansible 30 | command: ${MOLECULE_DOCKER_COMMAND:-""} 31 | cgroupns_mode: host 32 | tmpfs: 33 | - /run 34 | volumes: 35 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 36 | privileged: true 37 | pre_build_image: true 38 | - name: debian12 39 | image: geerlingguy/docker-debian12-ansible 40 | command: ${MOLECULE_DOCKER_COMMAND:-""} 41 | cgroupns_mode: host 42 | tmpfs: 43 | - /run 44 | volumes: 45 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 46 | privileged: true 47 | pre_build_image: true 48 | - name: rockylinux9 49 | image: geerlingguy/docker-rockylinux9-ansible 50 | command: ${MOLECULE_DOCKER_COMMAND:-""} 51 | cgroupns_mode: host 52 | tmpfs: 53 | - /run 54 | volumes: 55 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 56 | privileged: true 57 | pre_build_image: true 58 | provisioner: 59 | name: ansible 60 | config_options: 61 | defaults: 62 | roles_path: "$MOLECULE_PROJECT_DIRECTORY/.." 63 | verifier: 64 | name: ansible 65 | scenario: 66 | test_sequence: 67 | - dependency 68 | - cleanup 69 | - destroy 70 | - syntax 71 | - create 72 | - prepare 73 | - converge 74 | # - idempotence # disable for now, as we have non-idempotent tasks 75 | # - side_effect 76 | - verify 77 | - cleanup 78 | - destroy 79 | -------------------------------------------------------------------------------- /roles/agent/molecule/2.3.0/verify.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Verify 3 | hosts: all 4 | gather_facts: false 5 | tasks: 6 | 7 | - name: Populate service facts. 8 | ansible.builtin.service_facts: 9 | 10 | - name: "Test Agent is present." 11 | ansible.builtin.stat: 12 | path: "/usr/bin/check_mk_agent" 13 | register: checkmk_agent_file 14 | 15 | - name: "Verify Agent is present." 16 | ansible.builtin.assert: 17 | that: checkmk_agent_file.stat.exists | bool 18 | 19 | - name: "Test Agent Service is running." 20 | ansible.builtin.assert: 21 | that: "'check-mk-agent-async.service' in ansible_facts.services" 22 | 23 | - name: "Test that the Agent is listening on the default Port." 24 | ansible.builtin.wait_for: 25 | port: "{{ checkmk_agent_port }}" 26 | connect_timeout: 30 27 | register: checkmk_agent_port_state 28 | 29 | - name: "Test Agent Service is listening on port {{ checkmk_agent_port }}." 30 | ansible.builtin.assert: 31 | that: "(checkmk_agent_port_state.port == checkmk_agent_port) and (checkmk_agent_port_state.state == 'started')" 32 | -------------------------------------------------------------------------------- /roles/agent/molecule/2.4.0/converge.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Converge 3 | hosts: all 4 | 5 | pre_tasks: 6 | 7 | - name: Update apt cache. 8 | ansible.builtin.package: 9 | update_cache: true 10 | cache_valid_time: 600 11 | when: ansible_os_family == 'Debian' 12 | 13 | - name: Install prerequisites. 14 | ansible.builtin.package: 15 | name: "{{ item }}" 16 | state: present 17 | loop: 18 | - apt-utils 19 | - man 20 | - ufw 21 | when: ansible_os_family == 'Debian' 22 | 23 | - name: Install prerequisites. 24 | ansible.builtin.package: 25 | name: "{{ item }}" 26 | state: present 27 | loop: 28 | - firewalld 29 | when: ansible_os_family == 'RedHat' 30 | 31 | - name: Create '/usr/share/man/man8/' on Ubuntu. 32 | ansible.builtin.file: 33 | path: /usr/share/man/man8/ 34 | state: directory 35 | mode: "0755" 36 | owner: root 37 | group: root 38 | when: ansible_distribution == 'Ubuntu' 39 | 40 | tasks: 41 | 42 | - name: "Run server role." 43 | ansible.builtin.include_role: 44 | name: server 45 | 46 | - name: "Run agent role." 47 | ansible.builtin.include_role: 48 | name: agent 49 | -------------------------------------------------------------------------------- /roles/agent/molecule/2.4.0/molecule.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # cgroupv2 support: https://github.com/geerlingguy/docker-ubuntu2204-ansible/issues/6 3 | dependency: 4 | name: galaxy 5 | driver: 6 | name: docker 7 | platforms: 8 | - name: ubuntu2204 9 | image: geerlingguy/docker-ubuntu2204-ansible 10 | command: ${MOLECULE_DOCKER_COMMAND:-""} 11 | cgroupns_mode: host 12 | tmpfs: 13 | - /run 14 | volumes: 15 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 16 | privileged: true 17 | pre_build_image: true 18 | - name: ubuntu2404 19 | image: geerlingguy/docker-ubuntu2404-ansible 20 | command: ${MOLECULE_DOCKER_COMMAND:-""} 21 | cgroupns_mode: host 22 | tmpfs: 23 | - /run 24 | volumes: 25 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 26 | privileged: true 27 | pre_build_image: true 28 | - name: debian11 29 | image: geerlingguy/docker-debian11-ansible 30 | command: ${MOLECULE_DOCKER_COMMAND:-""} 31 | cgroupns_mode: host 32 | tmpfs: 33 | - /run 34 | volumes: 35 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 36 | privileged: true 37 | pre_build_image: true 38 | - name: debian12 39 | image: geerlingguy/docker-debian12-ansible 40 | command: ${MOLECULE_DOCKER_COMMAND:-""} 41 | cgroupns_mode: host 42 | tmpfs: 43 | - /run 44 | volumes: 45 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 46 | privileged: true 47 | pre_build_image: true 48 | - name: rockylinux9 49 | image: geerlingguy/docker-rockylinux9-ansible 50 | command: ${MOLECULE_DOCKER_COMMAND:-""} 51 | cgroupns_mode: host 52 | tmpfs: 53 | - /run 54 | volumes: 55 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 56 | privileged: true 57 | pre_build_image: true 58 | provisioner: 59 | name: ansible 60 | config_options: 61 | defaults: 62 | roles_path: "$MOLECULE_PROJECT_DIRECTORY/.." 63 | verifier: 64 | name: ansible 65 | scenario: 66 | test_sequence: 67 | - dependency 68 | - cleanup 69 | - destroy 70 | - syntax 71 | - create 72 | - prepare 73 | - converge 74 | # - idempotence # disable for now, as we have non-idempotent tasks 75 | # - side_effect 76 | - verify 77 | - cleanup 78 | - destroy 79 | -------------------------------------------------------------------------------- /roles/agent/molecule/2.4.0/verify.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Verify 3 | hosts: all 4 | gather_facts: false 5 | tasks: 6 | 7 | - name: Populate service facts. 8 | ansible.builtin.service_facts: 9 | 10 | - name: "Test Agent is present." 11 | ansible.builtin.stat: 12 | path: "/usr/bin/check_mk_agent" 13 | register: checkmk_agent_file 14 | 15 | - name: "Verify Agent is present." 16 | ansible.builtin.assert: 17 | that: checkmk_agent_file.stat.exists | bool 18 | 19 | - name: "Test Agent Service is running." 20 | ansible.builtin.assert: 21 | that: "'check-mk-agent-async.service' in ansible_facts.services" 22 | 23 | - name: "Test that the Agent is listening on the default Port." 24 | ansible.builtin.wait_for: 25 | port: "{{ checkmk_agent_port }}" 26 | connect_timeout: 30 27 | register: checkmk_agent_port_state 28 | 29 | - name: "Test Agent Service is listening on port {{ checkmk_agent_port }}." 30 | ansible.builtin.assert: 31 | that: "(checkmk_agent_port_state.port == checkmk_agent_port) and (checkmk_agent_port_state.state == 'started')" 32 | -------------------------------------------------------------------------------- /roles/agent/tasks/Suse.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "{{ ansible_os_family }} Derivatives: Install host-specific {{ checkmk_agent_edition | upper }} Agent." 3 | become: true 4 | community.general.zypper: 5 | name: "{{ __checkmk_agent_agent.file.host }}" 6 | force: "{{ checkmk_agent_force_install | bool }}" 7 | state: present 8 | disable_gpg_check: true 9 | when: | 10 | checkmk_agent_edition | lower != "cre" 11 | and checkmk_agent_host_specific | bool 12 | tags: 13 | - install-package 14 | 15 | - name: "{{ ansible_os_family }} Derivatives: Install GENERIC or folder-specific {{ checkmk_agent_edition | upper }} Agent." 16 | become: true 17 | community.general.zypper: 18 | name: "{{ __checkmk_agent_agent.file.cee }}" 19 | force: "{{ checkmk_agent_force_install | bool }}" 20 | state: present 21 | disable_gpg_check: true 22 | when: | 23 | checkmk_agent_edition | lower != "cre" 24 | and not checkmk_agent_host_specific | bool 25 | tags: 26 | - install-package 27 | 28 | - name: "{{ ansible_os_family }} Derivatives: Transfer Vanilla agent." 29 | ansible.builtin.copy: 30 | src: "{{ __checkmk_agent_agent.file.cre }}" 31 | dest: "{{ __checkmk_agent_agent.file.cre }}" 32 | mode: "0644" 33 | when: | 34 | checkmk_agent_edition | lower == "cre" 35 | and checkmk_agent_delegate_download != inventory_hostname 36 | tags: 37 | - download-package 38 | 39 | - name: "{{ ansible_os_family }} Derivatives: Install Vanilla agent." 40 | become: true 41 | community.general.zypper: 42 | name: "{{ __checkmk_agent_agent.file.cre }}" 43 | force: "{{ checkmk_agent_force_install | bool }}" 44 | state: present 45 | disable_gpg_check: true 46 | when: checkmk_agent_edition | lower == "cre" 47 | tags: 48 | - install-package 49 | -------------------------------------------------------------------------------- /roles/agent/tasks/Windows.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "{{ ansible_os_family }}: Install host-specific {{ checkmk_agent_edition | upper }} Agent." 3 | ansible.windows.win_package: 4 | path: "{{ __checkmk_agent_agent.file.host }}" 5 | state: present 6 | when: | 7 | checkmk_agent_edition | lower != "cre" 8 | and checkmk_agent_host_specific | bool 9 | tags: 10 | - install-package 11 | 12 | - name: "{{ ansible_os_family }}: Install GENERIC or folder-specific {{ checkmk_agent_edition | upper }} Agent." 13 | ansible.windows.win_package: 14 | path: "{{ __checkmk_agent_agent.file.cee }}" 15 | state: present 16 | when: | 17 | checkmk_agent_edition | lower != "cre" 18 | and not checkmk_agent_host_specific | bool 19 | tags: 20 | - install-package 21 | 22 | - name: "{{ ansible_os_family }}: Install Vanilla agent." 23 | ansible.windows.win_package: 24 | path: "{{ __checkmk_agent_agent.file.cre }}" 25 | state: present 26 | when: checkmk_agent_edition | lower == "cre" 27 | tags: 28 | - install-package 29 | -------------------------------------------------------------------------------- /roles/agent/vars/Debian.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __checkmk_agent_host_tmp_dir: "/tmp" 3 | 4 | __checkmk_agent_agent: 5 | url: 6 | cre: "{{ __checkmk_agent_site_url }}/check_mk/agents/check-mk-agent_{{ checkmk_agent_version }}-1_all.deb" 7 | cee: "{{ __checkmk_agent_site_url }}/check_mk/api/1.0/domain-types/agent/actions/download_by_host/invoke" 8 | file: 9 | cre: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent_{{ checkmk_agent_version }}-vanilla.deb" 10 | cee: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent_{{ checkmk_agent_version }}-generic.deb" 11 | host: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent_{{ checkmk_agent_version }}-{{ inventory_hostname }}.deb" 12 | -------------------------------------------------------------------------------- /roles/agent/vars/RedHat.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __checkmk_agent_host_tmp_dir: "/tmp" 3 | 4 | __checkmk_agent_agent: 5 | url: 6 | cre: "{{ __checkmk_agent_site_url }}/check_mk/agents/check-mk-agent-{{ checkmk_agent_version }}-1.noarch.rpm" 7 | cee: "{{ __checkmk_agent_site_url }}/check_mk/api/1.0/domain-types/agent/actions/download_by_host/invoke" 8 | file: 9 | cre: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-vanilla.rpm" 10 | cee: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-generic.rpm" 11 | host: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-{{ inventory_hostname }}.rpm" 12 | -------------------------------------------------------------------------------- /roles/agent/vars/Suse.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __checkmk_agent_host_tmp_dir: "/tmp" 3 | 4 | __checkmk_agent_agent: 5 | url: 6 | cre: "{{ __checkmk_agent_site_url }}/check_mk/agents/check-mk-agent-{{ checkmk_agent_version }}-1.noarch.rpm" 7 | cee: "{{ __checkmk_agent_site_url }}/check_mk/api/1.0/domain-types/agent/actions/download_by_host/invoke" 8 | file: 9 | cre: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-vanilla.rpm" 10 | cee: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-generic.rpm" 11 | host: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-{{ inventory_hostname }}.rpm" 12 | -------------------------------------------------------------------------------- /roles/agent/vars/Windows.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __checkmk_agent_host_tmp_dir: "C:\\Windows\\Temp" 3 | __checkmk_agent_controller_binary_path: "C:\\Program Files (x86)\\checkmk\\service\\cmk-agent-ctl.exe" 4 | __checkmk_agent_binary_path: "C:\\Program Files (x86)\\checkmk\\service\\check_mk_agent.exe" 5 | 6 | __checkmk_agent_agent: 7 | url: 8 | cre: "{{ __checkmk_agent_site_url }}/check_mk/agents/windows/check_mk_agent.msi" 9 | cee: "{{ __checkmk_agent_site_url }}/check_mk/api/1.0/domain-types/agent/actions/download_by_host/invoke" 10 | file: 11 | cre: "{{ __checkmk_agent_host_tmp_dir }}\\check-mk-agent_{{ checkmk_agent_version }}.msi" 12 | cee: "{{ __checkmk_agent_host_tmp_dir }}\\check-mk-agent_{{ checkmk_agent_version }}.msi" 13 | host: "{{ __checkmk_agent_host_tmp_dir }}\\check-mk-agent_{{ checkmk_agent_version }}-{{ inventory_hostname }}.msi" 14 | -------------------------------------------------------------------------------- /roles/agent/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __checkmk_agent_site_url: "{{ checkmk_agent_server_protocol }}://{{ checkmk_agent_server }}:{{ checkmk_agent_server_port }}/{{ checkmk_agent_site }}" 3 | 4 | __checkmk_agent_auth: |- 5 | {% if checkmk_agent_secret is defined and checkmk_agent_secret | length %}{{ checkmk_agent_secret }}{% else %}{{ checkmk_agent_pass }}{% endif %} 6 | 7 | # Due to inconsistent naming of editions, we normalize them here for convenience 8 | __checkmk_agent_edition_mapping: 9 | cre: raw 10 | cfe: free 11 | cee: enterprise 12 | cce: cloud 13 | cme: managed 14 | 15 | __checkmk_agent_files_mapping: 16 | Debian: linux_deb 17 | RedHat: linux_rpm 18 | Suse: linux_rpm 19 | Windows: windows_msi 20 | -------------------------------------------------------------------------------- /roles/server/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # This variable is used to declare explicit support for distinct distributions. 3 | # Adding a distribution here states, that you tested this role against that 4 | # distribution and found it working. Many distributions might work without 5 | # modification of the role. This should be tested however, so this variable 6 | # actually provides value. That being said, this is a artificial limitation 7 | # and you are free to circumvent it at your own risk. 8 | checkmk_server_server_stable_os: 9 | - AlmaLinux-8 10 | - AlmaLinux-9 11 | - CentOS-7 12 | - CentOS-8 13 | - CentOS-9 14 | - Debian-10 15 | - Debian-11 16 | - Debian-12 17 | - RedHat-7 18 | - RedHat-8 19 | - RedHat-9 20 | - OracleLinux-8 21 | - Rocky-8 22 | - Rocky-9 23 | - Ubuntu-18 24 | - Ubuntu-20 25 | - Ubuntu-22 26 | - Ubuntu-24 27 | 28 | checkmk_server_version: "2.3.0p29" 29 | checkmk_server_edition: 'cre' 30 | checkmk_server_verify_setup: 'true' 31 | 32 | checkmk_server_download_user: [] 33 | checkmk_server_download_pass: [] 34 | 35 | checkmk_server_sites: [] 36 | # - name: mysite 37 | # version: "{{ checkmk_server_version }}" 38 | # edition: "{{ checkmk_server_edition }}" 39 | # state: started 40 | # admin_pw: "{{ automation_secret | default(omit) }}" 41 | # update_conflict_resolution: abort 42 | # omd_auto_restart: 'false' 43 | # omd_config: 44 | # - var: LIVESTATUS_TCP 45 | # value: 'on' 46 | # - var: LIVESTATUS_TCP_PORT 47 | # value: '6557' 48 | # mkp_packages: 49 | # - name: 'mypackage' 50 | # version: 1.0.0 51 | # src: '/path/to/my.mkp' 52 | # url: 'https://exchange.checkmk.com/packages/mypackage/4711/mypackage-1.0.0.mkp' 53 | # checksum: 'md5:mychecksum' 54 | # installed: true 55 | # enabled: true 56 | 57 | checkmk_server_configure_firewall: 'true' 58 | 59 | checkmk_server_backup_on_update: 'true' # Not recommended to disable this option 60 | checkmk_server_backup_dir: '/tmp' 61 | checkmk_server_backup_opts: '--no-past' 62 | checkmk_server_allow_downgrades: 'false' 63 | 64 | checkmk_server_epel_gpg_check: 'true' 65 | 66 | checkmk_server_cleanup: 'false' 67 | checkmk_server_no_log: 'true' 68 | -------------------------------------------------------------------------------- /roles/server/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Start Apache" 3 | ansible.builtin.service: 4 | name: apache2 5 | state: started 6 | 7 | - name: "Start httpd" 8 | ansible.builtin.service: 9 | name: httpd 10 | state: started 11 | 12 | - name: "Warn site admin password" 13 | ansible.builtin.debug: 14 | msg: 15 | - "You created at least one site without specifying an admin password!" 16 | - "Please make sure to set it by different means, if you do not want to do it here." 17 | -------------------------------------------------------------------------------- /roles/server/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | galaxy_info: 3 | role_name: server 4 | 5 | author: Robin Gierse 6 | company: Checkmk GmbH 7 | description: This role installs Checkmk on servers and manages sites. 8 | 9 | # If the issue tracker for your role is not on github, uncomment the 10 | # next line and provide a value 11 | # issue_tracker_url: http://example.com/issue/tracker 12 | 13 | # Choose a valid license ID from https://spdx.org - some suggested licenses: 14 | # - BSD-3-Clause (default) 15 | # - MIT 16 | # - GPL-2.0-or-later 17 | # - GPL-3.0-only 18 | # - Apache-2.0 19 | # - CC-BY-4.0 20 | license: GPL-2.0-or-later 21 | 22 | min_ansible_version: "2.4" 23 | 24 | # If this a Container Enabled role, provide the minimum Ansible Container version. 25 | # min_ansible_container_version: 26 | 27 | # 28 | # Provide a list of supported platforms, and for each platform a list of versions. 29 | # If you don't wish to enumerate all versions for a particular platform, use 'all'. 30 | # To view available platforms and versions (or releases), visit: 31 | # https://galaxy.ansible.com/api/v1/platforms/ 32 | # 33 | platforms: 34 | - name: Debian 35 | versions: 36 | - buster 37 | - bullseye 38 | - name: Ubuntu 39 | versions: 40 | - bionic 41 | - focal 42 | - jammy 43 | 44 | galaxy_tags: [checkmk, monitoring, server] 45 | # List tags for your role here, one per line. A tag is a keyword that describes 46 | # and categorizes the role. Users find roles by searching for tags. Be sure to 47 | # remove the '[]' above, if you add tags to this list. 48 | # 49 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 50 | # Maximum 20 tags per role. 51 | 52 | dependencies: [] 53 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 54 | # if you add dependencies to this list. 55 | -------------------------------------------------------------------------------- /roles/server/molecule/2.2.0/converge.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Converge 3 | hosts: all 4 | 5 | pre_tasks: 6 | 7 | - name: "Update apt cache." 8 | ansible.builtin.package: 9 | update_cache: true 10 | cache_valid_time: 600 11 | when: ansible_os_family == 'Debian' 12 | 13 | - name: "Install prerequisites." 14 | ansible.builtin.package: 15 | name: "{{ item }}" 16 | state: present 17 | loop: 18 | - apt-utils 19 | - man 20 | when: ansible_os_family == 'Debian' 21 | 22 | - name: "Create '/usr/share/man/man8/' on Ubuntu." 23 | ansible.builtin.file: 24 | path: /usr/share/man/man8/ 25 | state: directory 26 | mode: "0755" 27 | owner: root 28 | group: root 29 | when: ansible_distribution == 'Ubuntu' 30 | 31 | - name: "Download MKP." 32 | ansible.builtin.get_url: 33 | url: https://exchange.checkmk.com/packages/sslcertificates/1570/sslcertificates-8.9.1.mkp 34 | dest: /tmp/sslcertificates.mkp 35 | mode: "0644" 36 | delegate_to: localhost 37 | 38 | tasks: 39 | 40 | - name: "Run server role." 41 | ansible.builtin.include_role: 42 | name: server 43 | -------------------------------------------------------------------------------- /roles/server/molecule/2.3.0/converge.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Converge 3 | hosts: all 4 | 5 | pre_tasks: 6 | 7 | - name: "Update apt cache." 8 | ansible.builtin.package: 9 | update_cache: true 10 | cache_valid_time: 600 11 | when: ansible_os_family == 'Debian' 12 | 13 | - name: "Install prerequisites." 14 | ansible.builtin.package: 15 | name: "{{ item }}" 16 | state: present 17 | loop: 18 | - apt-utils 19 | - man 20 | when: ansible_os_family == 'Debian' 21 | 22 | - name: "Create '/usr/share/man/man8/' on Ubuntu." 23 | ansible.builtin.file: 24 | path: /usr/share/man/man8/ 25 | state: directory 26 | mode: "0755" 27 | owner: root 28 | group: root 29 | when: ansible_distribution == 'Ubuntu' 30 | 31 | - name: "Download MKP." 32 | ansible.builtin.get_url: 33 | url: https://exchange.checkmk.com/packages/sslcertificates/1570/sslcertificates-8.9.1.mkp 34 | dest: /tmp/sslcertificates.mkp 35 | mode: "0644" 36 | delegate_to: localhost 37 | 38 | tasks: 39 | 40 | - name: "Run server role." 41 | ansible.builtin.include_role: 42 | name: server 43 | -------------------------------------------------------------------------------- /roles/server/molecule/2.4.0/converge.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Converge 3 | hosts: all 4 | 5 | pre_tasks: 6 | 7 | - name: "Update apt cache." 8 | ansible.builtin.package: 9 | update_cache: true 10 | cache_valid_time: 600 11 | when: ansible_os_family == 'Debian' 12 | 13 | - name: "Install prerequisites." 14 | ansible.builtin.package: 15 | name: "{{ item }}" 16 | state: present 17 | loop: 18 | - apt-utils 19 | - man 20 | when: ansible_os_family == 'Debian' 21 | 22 | - name: "Create '/usr/share/man/man8/' on Ubuntu." 23 | ansible.builtin.file: 24 | path: /usr/share/man/man8/ 25 | state: directory 26 | mode: "0755" 27 | owner: root 28 | group: root 29 | when: ansible_distribution == 'Ubuntu' 30 | 31 | - name: "Download MKP." 32 | ansible.builtin.get_url: 33 | url: https://exchange.checkmk.com/packages/sslcertificates/1570/sslcertificates-8.9.1.mkp 34 | dest: /tmp/sslcertificates.mkp 35 | mode: "0644" 36 | delegate_to: localhost 37 | 38 | tasks: 39 | 40 | - name: "Run server role." 41 | ansible.builtin.include_role: 42 | name: server 43 | -------------------------------------------------------------------------------- /roles/server/molecule/2.4.0/molecule.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # cgroupv2 support: https://github.com/geerlingguy/docker-ubuntu2204-ansible/issues/6 3 | dependency: 4 | name: galaxy 5 | driver: 6 | name: docker 7 | platforms: 8 | - name: ubuntu2204 9 | image: geerlingguy/docker-ubuntu2204-ansible 10 | command: ${MOLECULE_DOCKER_COMMAND:-""} 11 | cgroupns_mode: host 12 | tmpfs: 13 | - /run 14 | volumes: 15 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 16 | privileged: true 17 | pre_build_image: true 18 | - name: ubuntu2404 19 | image: geerlingguy/docker-ubuntu2404-ansible 20 | command: ${MOLECULE_DOCKER_COMMAND:-""} 21 | cgroupns_mode: host 22 | tmpfs: 23 | - /run 24 | volumes: 25 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 26 | privileged: true 27 | pre_build_image: true 28 | - name: debian11 29 | image: geerlingguy/docker-debian11-ansible 30 | command: ${MOLECULE_DOCKER_COMMAND:-""} 31 | cgroupns_mode: host 32 | tmpfs: 33 | - /run 34 | volumes: 35 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 36 | privileged: true 37 | pre_build_image: true 38 | - name: debian12 39 | image: geerlingguy/docker-debian12-ansible 40 | command: ${MOLECULE_DOCKER_COMMAND:-""} 41 | cgroupns_mode: host 42 | tmpfs: 43 | - /run 44 | volumes: 45 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 46 | privileged: true 47 | pre_build_image: true 48 | - name: rockylinux9 49 | image: geerlingguy/docker-rockylinux9-ansible 50 | command: ${MOLECULE_DOCKER_COMMAND:-""} 51 | cgroupns_mode: host 52 | tmpfs: 53 | - /run 54 | volumes: 55 | - /sys/fs/cgroup:/sys/fs/cgroup:rw 56 | privileged: true 57 | pre_build_image: true 58 | provisioner: 59 | name: ansible 60 | config_options: 61 | defaults: 62 | roles_path: "$MOLECULE_PROJECT_DIRECTORY/.." 63 | verifier: 64 | name: ansible 65 | scenario: 66 | test_sequence: 67 | - dependency 68 | - cleanup 69 | - destroy 70 | - syntax 71 | - create 72 | - prepare 73 | - converge 74 | # - idempotence # disable for now, as we have non-idempotent tasks 75 | # - side_effect 76 | - verify 77 | - cleanup 78 | - destroy 79 | -------------------------------------------------------------------------------- /roles/server/tasks/Debian.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Install Checkmk Server." 3 | when: not 'check-mk-' + __checkmk_server_edition_mapping[checkmk_server_edition] + '-' +checkmk_server_version in ansible_facts.packages 4 | become: true 5 | ansible.builtin.package: 6 | deb: "{{ __checkmk_server_tmp_dir }}/{{ __checkmk_server_setup_file }}" 7 | update_cache: 'yes' 8 | state: present 9 | notify: Start Apache 10 | tags: 11 | - install-package 12 | -------------------------------------------------------------------------------- /roles/server/tasks/configure-site.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Stop Site." 3 | become: true 4 | ansible.builtin.shell: | 5 | set -o pipefail 6 | omd stop {{ outer_item.name }} 7 | args: 8 | executable: /bin/bash 9 | removes: "/opt/omd/sites/{{ outer_item.name }}/tmp/run/live" 10 | when: outer_item.state != "absent" 11 | tags: 12 | - configure-sites 13 | 14 | - name: "Configure Site '{{ outer_item.name }}'." # noqa no-changed-when 15 | become: true 16 | ansible.builtin.shell: | 17 | set -o pipefail 18 | omd config {{ outer_item.name }} set {{ item.var }} {{ item.value }} 19 | args: 20 | executable: /bin/bash 21 | loop: "{{ outer_item.omd_config }}" 22 | when: outer_item.state != "absent" and outer_item.omd_config | length 23 | tags: 24 | - configure-sites 25 | 26 | - name: "Start Site." 27 | become: true 28 | ansible.builtin.shell: | 29 | set -o pipefail 30 | omd start {{ outer_item.name }} 31 | args: 32 | executable: /bin/bash 33 | creates: "/opt/omd/sites/{{ outer_item.name }}/tmp/run/live" 34 | when: outer_item.state == "started" 35 | tags: 36 | - configure-sites 37 | -------------------------------------------------------------------------------- /roles/server/vars/Debian.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __checkmk_server_setup_file: |- 3 | check-mk-{{ __checkmk_server_edition_mapping[checkmk_server_edition | lower] }}-{{ checkmk_server_version }}_0.{{ ansible_distribution_release }}_amd64.deb 4 | 5 | __checkmk_server_prerequisites: 6 | - freeipmi 7 | - gpg 8 | - gpg-agent 9 | -------------------------------------------------------------------------------- /roles/server/vars/RedHat.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | __checkmk_server_setup_file: |- 4 | check-mk-{{ __checkmk_server_edition_mapping[checkmk_server_edition | lower] }}-{{ checkmk_server_version }}-el{{ ansible_distribution_major_version }}-38.x86_64.rpm 5 | 6 | __checkmk_server_ports: 7 | - 80/tcp 8 | - 443/tcp 9 | - 8000/tcp 10 | 11 | __checkmk_server_prerequisites_per_distro: 12 | RedHat: 13 | - firewalld 14 | - dnf-plugins-core 15 | - python3-libsemanage 16 | CentOS: 17 | - firewalld 18 | - dnf-plugins-core 19 | - python3-libsemanage 20 | CentOS-7: 21 | - firewalld 22 | - dnf-plugins-core 23 | - libsemanage-python 24 | CentOS-8: 25 | - firewalld 26 | - dnf-plugins-core 27 | - python3-libsemanage 28 | RedHat-7: 29 | - firewalld 30 | - libsemanage-python 31 | RedHat-8: 32 | - firewalld 33 | - dnf-plugins-core 34 | - python3-libsemanage 35 | OracleLinux-8: 36 | - firewalld 37 | - dnf-plugins-core 38 | - python3-libsemanage 39 | 40 | __checkmk_server_prerequisites: "{{ __checkmk_server_prerequisites_per_distro[ansible_facts.distribution ~ '-' ~ ansible_facts.distribution_major_version] 41 | | default( __checkmk_server_prerequisites_per_distro[ ansible_distribution_file_variety ]) }}" 42 | 43 | __checkmk_server_epel_url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_facts.distribution_major_version }}.noarch.rpm" 44 | __checkmk_server_epel_gpg_key: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_facts.distribution_major_version }}" 45 | -------------------------------------------------------------------------------- /roles/server/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __checkmk_server_base_url: "https://download.checkmk.com/checkmk" 3 | checkmk_server_download_url: "{{ __checkmk_server_base_url }}/{{ checkmk_server_version }}/{{ __checkmk_server_setup_file }}" 4 | checkmk_server_gpg_download_url: "{{ __checkmk_server_base_url }}/Check_MK-pubkey.gpg" 5 | 6 | # Due to inconsistent naming of editions, we normalize them here for convenience 7 | __checkmk_server_edition_mapping: 8 | cre: raw 9 | cfe: free 10 | cee: enterprise 11 | cce: cloud 12 | cme: managed 13 | 14 | __checkmk_server_tmp_dir: "/tmp" 15 | -------------------------------------------------------------------------------- /tests/container/README.md: -------------------------------------------------------------------------------- 1 | # Custom Docker Containers for Integration Tests 2 | ## Why 3 | TBD 4 | 5 | ## How-to 6 | - `docker build -t ansible-checkmk-test ./` 7 | - `ansible-test integration activation --docker-privileged --python 3.10 --docker ansible-checkmk-test` 8 | 9 | ## Recognition 10 | This project uses https://github.com/gdraheim/docker-systemctl-replacement. 11 | -------------------------------------------------------------------------------- /tests/container/files/deadsnakes.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Checkmk/ansible-collection-checkmk.general/7d82049c224b0734c9771b7b38205d2b893dedd3/tests/container/files/deadsnakes.gpg -------------------------------------------------------------------------------- /tests/container/files/deadsnakes.list: -------------------------------------------------------------------------------- 1 | deb [signed-by=/etc/apt/keyrings/deadsnakes.gpg] http://ppa.launchpad.net/deadsnakes/ppa/ubuntu jammy main 2 | deb-src [signed-by=/etc/apt/keyrings/deadsnakes.gpg] http://ppa.launchpad.net/deadsnakes/ppa/ubuntu jammy main 3 | -------------------------------------------------------------------------------- /tests/integration/files/README.md: -------------------------------------------------------------------------------- 1 | # Files 2 | This folder is currently used to provide files to the `ansible-test` container 3 | on GitHub Action execution. Primarily this currently concerns secrets for which 4 | there is no other way of providing them to the container. 5 | The folder `includes` contains shared resources, which are required by all tests. 6 | **Please do not store anything in here unless you know, what you are doing!** 7 | -------------------------------------------------------------------------------- /tests/integration/files/includes/tasks/prep.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Install dependencies." 3 | ansible.builtin.package: 4 | name: python3-apt 5 | state: present 6 | 7 | - name: "Get installed Packages." 8 | ansible.builtin.package_facts: 9 | 10 | - name: "Download Checkmk Versions." 11 | ansible.builtin.get_url: 12 | url: "{{ checkmk_var_download_url }}" 13 | dest: /tmp/checkmk-server-{{ item.site }}.deb 14 | mode: "0640" 15 | url_username: "{{ checkmk_var_download_user | default(omit) }}" 16 | url_password: "{{ checkmk_var_download_pass | default(omit) }}" 17 | loop: "{{ checkmk_var_test_sites }}" 18 | when: | 19 | not 'check-mk-' + __checkmk_server_edition_mapping[item.edition] + '-' +item.version in ansible_facts.packages 20 | 21 | - name: "Install Checkmk Versions." 22 | ansible.builtin.package: 23 | name: /tmp/checkmk-server-{{ item.site }}.deb 24 | state: present 25 | loop: "{{ checkmk_var_test_sites }}" 26 | when: | 27 | not 'check-mk-' + __checkmk_server_edition_mapping[item.edition] + '-' +item.version in ansible_facts.packages 28 | 29 | - name: "Create Sites." 30 | ansible.builtin.command: "omd -V {{ item.version }}.{{ item.edition }} create --no-tmpfs --admin-password {{ checkmk_var_automation_secret }} {{ item.site }}" 31 | args: 32 | creates: "/omd/sites/{{ item.site }}" 33 | loop: "{{ checkmk_var_test_sites }}" 34 | 35 | - name: "Configure Sites." # noqa no-changed-when 36 | ansible.builtin.command: omd config {{ item.site }} set APACHE_TCP_PORT {{ item.port }} 37 | loop: "{{ checkmk_var_test_sites }}" 38 | 39 | - name: "Start Apache2." 40 | ansible.builtin.service: 41 | name: apache2 42 | state: started 43 | 44 | - name: "Start Sites." 45 | ansible.builtin.shell: "omd status -b {{ item.site }} || omd start {{ item.site }}" 46 | register: __checkmk_var_site_status 47 | changed_when: __checkmk_var_site_status.rc == "0" 48 | loop: "{{ checkmk_var_test_sites }}" 49 | 50 | - name: "Wait for site to be ready." 51 | ansible.builtin.pause: 52 | seconds: 5 53 | when: | 54 | item.stdout_lines is defined and 'OVERALL 1' in item.stdout_lines 55 | loop: "{{ __checkmk_var_site_status.results }}" 56 | -------------------------------------------------------------------------------- /tests/integration/files/includes/vars/global.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Configure location and credentials for the Checkmk REST API 3 | checkmk_var_server_url: "http://127.0.0.1:{{ outer_item.port | default('80') }}/" 4 | checkmk_var_automation_user: "cmkadmin" 5 | checkmk_var_automation_secret: "Sup3rSec4et!" 6 | 7 | # Generate download URL and provide credentials to download Checkmk setups 8 | checkmk_var_download_url: "https://download.checkmk.com/checkmk/{{ item.version }}/check-mk-{{ __checkmk_server_edition_mapping[item.edition] }}-{{ item.version }}_0.{{ ansible_distribution_release }}_amd64.deb" # noqa yaml[line-length] 9 | checkmk_var_download_user: "d-gh-ansible-dl" 10 | checkmk_var_download_pass: "{{ lookup('ansible.builtin.file', '/root/ansible_collections/checkmk/general/tests/integration/files/.dl-secret', errors='ignore') | default(omit) }}" # noqa yaml[line-length] 11 | 12 | # Due to inconsistent naming of editions, we normalize them here for convenience 13 | __checkmk_server_edition_mapping: 14 | cre: raw 15 | cee: enterprise 16 | cce: cloud 17 | cme: managed 18 | 19 | 20 | # This is a very hacky workaround, as it is not possible to assign variables 21 | # to other variables when using them in lookup modules. 22 | ansible_lookup_checkmk_server_url: "http://127.0.0.1" # noqa var-naming[pattern] 23 | # The variable below is especially hacky. 24 | # All integration tests were adapted to run the specific task only on this site. 25 | ansible_lookup_checkmk_site: "stable_cme" # noqa var-naming[pattern] 26 | ansible_lookup_checkmk_automation_user: "cmkadmin" # noqa var-naming[pattern] 27 | ansible_lookup_checkmk_automation_secret: "Sup3rSec4et!" # noqa var-naming[pattern] 28 | ansible_lookup_checkmk_validate_certs: false # noqa var-naming[pattern] 29 | -------------------------------------------------------------------------------- /tests/integration/targets/activation/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/activation/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cre" 5 | site: "ancient_cre" 6 | port: "5022" 7 | - version: "2.3.0p33" 8 | edition: "cre" 9 | site: "old_cre" 10 | port: "5023" 11 | - version: "2.3.0p33" 12 | edition: "cme" 13 | site: "old_cme" 14 | port: "5323" 15 | - version: "2.4.0p2" 16 | edition: "cre" 17 | site: "stable_cre" 18 | port: "5024" 19 | - version: "2.4.0p2" 20 | edition: "cme" 21 | site: "stable_cme" 22 | port: "5324" 23 | 24 | checkmk_var_hosts: 25 | - name: test1.tld 26 | folder: "/" 27 | - name: test2.tld 28 | folder: "/" 29 | - name: test3.tld 30 | folder: "/" 31 | - name: test4.tld 32 | folder: "/" 33 | - name: test5.tld 34 | folder: "/" 35 | -------------------------------------------------------------------------------- /tests/integration/targets/bakery/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cce" 5 | site: "ancient_cce" 6 | port: "5222" 7 | - version: "2.3.0p33" 8 | edition: "cme" 9 | site: "old_cme" 10 | port: "5323" 11 | - version: "2.4.0p2" 12 | edition: "cme" 13 | site: "stable_cme" 14 | port: "5324" 15 | 16 | checkmk_var_signature_key_id: 1 17 | checkmk_var_signature_key_passphrase: "{{ checkmk_var_automation_secret }}" 18 | 19 | checkmk_var_hosts: 20 | - name: test1.tld 21 | folder: "/" 22 | - name: test2.tld 23 | folder: "/" 24 | - name: test3.tld 25 | folder: "/" 26 | - name: test4.tld 27 | folder: "/" 28 | - name: test5.tld 29 | folder: "/" 30 | -------------------------------------------------------------------------------- /tests/integration/targets/contact_group/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/contact_group/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cre" 5 | site: "ancient_cre" 6 | port: "5022" 7 | - version: "2.3.0p33" 8 | edition: "cre" 9 | site: "old_cre" 10 | port: "5023" 11 | - version: "2.3.0p33" 12 | edition: "cme" 13 | site: "old_cme" 14 | port: "5323" 15 | - version: "2.4.0p2" 16 | edition: "cre" 17 | site: "stable_cre" 18 | port: "5024" 19 | - version: "2.4.0p2" 20 | edition: "cme" 21 | site: "stable_cme" 22 | port: "5324" 23 | 24 | checkmk_var_contact_groups_create: 25 | - name: "test1" 26 | title: "Test_1" 27 | - name: "test2" 28 | - name: "test3" 29 | - name: "test4" 30 | title: "Test_4" 31 | - name: "test5" 32 | title: "Test_5" 33 | 34 | # 2 and 3 remains unchanged, good for idempotency check 35 | checkmk_var_contact_groups_modify: 36 | - name: "test1" 37 | title: "Test_one" 38 | - name: "test2" 39 | title: "Test_2" 40 | - name: "test3" 41 | title: "Test_3" 42 | - name: "test4" 43 | title: "Test_four" 44 | - name: "test5" 45 | title: "Test_five" 46 | 47 | checkmk_var_contact_groups_delete: 48 | - name: "test1" 49 | - name: "test3" 50 | -------------------------------------------------------------------------------- /tests/integration/targets/discovery/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/discovery/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cre" 5 | site: "ancient_cre" 6 | port: "5022" 7 | - version: "2.3.0p33" 8 | edition: "cre" 9 | site: "old_cre" 10 | port: "5023" 11 | - version: "2.3.0p33" 12 | edition: "cme" 13 | site: "old_cme" 14 | port: "5323" 15 | - version: "2.4.0p2" 16 | edition: "cre" 17 | site: "stable_cre" 18 | port: "5024" 19 | - version: "2.4.0p2" 20 | edition: "cme" 21 | site: "stable_cme" 22 | port: "5324" 23 | 24 | checkmk_var_hosts: 25 | - name: test1.tld 26 | folder: "/" 27 | - name: test2.tld 28 | folder: "/" 29 | - name: test3.tld 30 | folder: "/" 31 | - name: test4.tld 32 | folder: "/" 33 | - name: test5.tld 34 | folder: "/" 35 | 36 | checkmk_var_host_names: "{{ checkmk_var_hosts | map(attribute='name') }}" 37 | -------------------------------------------------------------------------------- /tests/integration/targets/downtime/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/downtime/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cre" 5 | site: "ancient_cre" 6 | port: "5022" 7 | - version: "2.3.0p33" 8 | edition: "cre" 9 | site: "old_cre" 10 | port: "5023" 11 | - version: "2.3.0p33" 12 | edition: "cme" 13 | site: "old_cme" 14 | port: "5323" 15 | - version: "2.4.0p2" 16 | edition: "cre" 17 | site: "stable_cre" 18 | port: "5024" 19 | - version: "2.4.0p2" 20 | edition: "cme" 21 | site: "stable_cme" 22 | port: "5324" 23 | 24 | checkmk_var_hosts: 25 | - name: test1.tld 26 | folder: "/" 27 | - name: test2.tld 28 | folder: "/" 29 | - name: test3.tld 30 | folder: "/" 31 | - name: test4.tld 32 | folder: "/" 33 | - name: test5.tld 34 | folder: "/" 35 | -------------------------------------------------------------------------------- /tests/integration/targets/folder/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/folder/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cre" 5 | site: "ancient_cre" 6 | port: "5022" 7 | - version: "2.3.0p33" 8 | edition: "cre" 9 | site: "old_cre" 10 | port: "5023" 11 | - version: "2.3.0p33" 12 | edition: "cme" 13 | site: "old_cme" 14 | port: "5323" 15 | - version: "2.4.0p2" 16 | edition: "cre" 17 | site: "stable_cre" 18 | port: "5024" 19 | - version: "2.4.0p2" 20 | edition: "cme" 21 | site: "stable_cme" 22 | port: "5324" 23 | 24 | checkmk_var_folders: 25 | - path: /test 26 | name: Test 27 | - path: /foo 28 | name: Foo 29 | - path: /bar 30 | name: Bar 31 | - path: /foo/bar 32 | name: Bar 33 | - path: /bar/foo 34 | name: Foo 35 | - path: /foo/bar/treasure 36 | name: Treasure 37 | - path: /foo/bar1 38 | name: Digital 39 | 40 | checkmk_var_folder_attr_test: 41 | path: /test 42 | name: Test 43 | attributes: 44 | tag_criticality: "test" 45 | tag_networking: "dmz" 46 | 47 | checkmk_var_folders_defaults_test: 48 | - path: /foo 49 | verify_name: "foo" 50 | - path: /bar 51 | name: Bar 52 | verify_name: "Bar" 53 | -------------------------------------------------------------------------------- /tests/integration/targets/host/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/host/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cre" 5 | site: "ancient_cre" 6 | port: "5022" 7 | - version: "2.3.0p33" 8 | edition: "cre" 9 | site: "old_cre" 10 | port: "5023" 11 | - version: "2.3.0p33" 12 | edition: "cme" 13 | site: "old_cme" 14 | port: "5323" 15 | - version: "2.4.0p2" 16 | edition: "cre" 17 | site: "stable_cre" 18 | port: "5024" 19 | - version: "2.4.0p2" 20 | edition: "cme" 21 | site: "stable_cme" 22 | port: "5324" 23 | 24 | checkmk_var_folders: 25 | - path: /foo 26 | name: Foo 27 | - path: /bar 28 | name: Bar 29 | - path: /foo/bar 30 | name: Bar 31 | - path: /foo/bar1 32 | name: Digital 33 | 34 | checkmk_var_hosts: 35 | - name: test0.tld 36 | - name: test1.tld 37 | folder: "/" 38 | - name: test2.tld 39 | folder: "/foo" 40 | - name: test3.tld 41 | folder: "/bar" 42 | - name: test4.tld 43 | folder: "/foo/bar" 44 | - name: test5.tld 45 | folder: "/foo/bar1" 46 | 47 | checkmk_var_cluster_hosts: 48 | - name: cluster_test0.tld 49 | nodes: 50 | - "test0.tld" 51 | - "test4.tld" 52 | - name: cluster_test1.tld 53 | folder: "/" 54 | nodes: 55 | - "test1.tld" 56 | - "test2.tld" 57 | - name: cluster_test2.tld 58 | folder: "/" 59 | nodes: 60 | - "test3.tld" 61 | - name: cluster_test3.tld 62 | folder: "/" 63 | nodes: "test4.tld" 64 | 65 | checkmk_var_cluster_hosts_add_nodes: 66 | - name: cluster_test1.tld 67 | folder: "/" 68 | add_nodes: 69 | - "test1.tld" 70 | - "test2.tld" 71 | - "test3.tld" 72 | - "test4.tld" 73 | - name: cluster_test2.tld 74 | folder: "/" 75 | add_nodes: 76 | - "test2.tld" 77 | - "test3.tld" 78 | - name: cluster_test3.tld 79 | folder: "/" 80 | add_nodes: 81 | - "test3.tld" 82 | - "test4.tld" 83 | 84 | checkmk_var_cluster_hosts_remove_nodes: 85 | - name: cluster_test1.tld 86 | folder: "/" 87 | remove_nodes: 88 | - "test3.tld" 89 | - "test4.tld" 90 | - name: cluster_test2.tld 91 | folder: "/" 92 | remove_nodes: 93 | - "test2.tld" 94 | - name: cluster_test3.tld 95 | folder: "/" 96 | remove_nodes: "test3.tld" 97 | -------------------------------------------------------------------------------- /tests/integration/targets/host_group/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/host_group/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cre" 5 | site: "ancient_cre" 6 | port: "5022" 7 | - version: "2.3.0p33" 8 | edition: "cre" 9 | site: "old_cre" 10 | port: "5023" 11 | - version: "2.3.0p33" 12 | edition: "cme" 13 | site: "old_cme" 14 | port: "5323" 15 | - version: "2.4.0p2" 16 | edition: "cre" 17 | site: "stable_cre" 18 | port: "5024" 19 | - version: "2.4.0p2" 20 | edition: "cme" 21 | site: "stable_cme" 22 | port: "5324" 23 | 24 | checkmk_var_host_groups_create: 25 | - name: "test1" 26 | title: "Test_1" 27 | - name: "test2" 28 | - name: "test3" 29 | - name: "test4" 30 | title: "Test_4" 31 | - name: "test5" 32 | title: "Test_5" 33 | 34 | # 2 and 3 remains unchanged, good for idempotency check 35 | checkmk_var_host_groups_modify: 36 | - name: "test1" 37 | title: "Test_one" 38 | - name: "test2" 39 | title: "Test_2" 40 | - name: "test3" 41 | title: "Test_3" 42 | - name: "test4" 43 | title: "Test_four" 44 | - name: "test5" 45 | title: "Test_five" 46 | 47 | checkmk_var_host_groups_delete: 48 | - name: "test1" 49 | - name: "test3" 50 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_bakery/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_bakery/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cce" 5 | site: "ancient_cce" 6 | port: "5222" 7 | - version: "2.3.0p33" 8 | edition: "cme" 9 | site: "old_cme" 10 | port: "5323" 11 | - version: "2.4.0p2" 12 | edition: "cme" 13 | site: "stable_cme" 14 | port: "5324" 15 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_folder/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_folder/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cre" 5 | site: "ancient_cre" 6 | port: "5022" 7 | - version: "2.3.0p33" 8 | edition: "cre" 9 | site: "old_cre" 10 | port: "5023" 11 | - version: "2.3.0p33" 12 | edition: "cme" 13 | site: "old_cme" 14 | port: "5323" 15 | - version: "2.4.0p2" 16 | edition: "cre" 17 | site: "stable_cre" 18 | port: "5024" 19 | - version: "2.4.0p2" 20 | edition: "cme" 21 | site: "stable_cme" 22 | port: "5324" 23 | 24 | checkmk_var_folder: 25 | name: "Folder 1" 26 | path: "/folder1" 27 | criticality: "test" 28 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_folders/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_folders/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cre" 5 | site: "ancient_cre" 6 | port: "5022" 7 | - version: "2.3.0p33" 8 | edition: "cre" 9 | site: "old_cre" 10 | port: "5023" 11 | - version: "2.3.0p33" 12 | edition: "cme" 13 | site: "old_cme" 14 | port: "5323" 15 | - version: "2.4.0p2" 16 | edition: "cre" 17 | site: "stable_cre" 18 | port: "5024" 19 | - version: "2.4.0p2" 20 | edition: "cme" 21 | site: "stable_cme" 22 | port: "5324" 23 | 24 | checkmk_var_folders: 25 | - name: "Folder 1" 26 | path: "/folder1" 27 | criticality: "test" 28 | - name: "Folder 2" 29 | path: "/folder2" 30 | criticality: "test" 31 | - name: "Folder 3" 32 | path: "/folder3" 33 | criticality: "test" 34 | - name: "Folder 3a" 35 | path: "/folder3/a" 36 | criticality: "prod" 37 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_host/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_host/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cre" 5 | site: "ancient_cre" 6 | port: "5022" 7 | - version: "2.3.0p33" 8 | edition: "cre" 9 | site: "old_cre" 10 | port: "5023" 11 | - version: "2.3.0p33" 12 | edition: "cme" 13 | site: "old_cme" 14 | port: "5323" 15 | - version: "2.4.0p2" 16 | edition: "cre" 17 | site: "stable_cre" 18 | port: "5024" 19 | - version: "2.4.0p2" 20 | edition: "cme" 21 | site: "stable_cme" 22 | port: "5324" 23 | 24 | checkmk_var_host: 25 | name: "host1.tld" 26 | folder: "/" 27 | alias: "Host 1" 28 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_hosts/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_hosts/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cre" 5 | site: "ancient_cre" 6 | port: "5022" 7 | - version: "2.3.0p33" 8 | edition: "cre" 9 | site: "old_cre" 10 | port: "5023" 11 | - version: "2.3.0p33" 12 | edition: "cme" 13 | site: "old_cme" 14 | port: "5323" 15 | - version: "2.4.0p2" 16 | edition: "cre" 17 | site: "stable_cre" 18 | port: "5024" 19 | - version: "2.4.0p2" 20 | edition: "cme" 21 | site: "stable_cme" 22 | port: "5324" 23 | 24 | checkmk_var_hosts: 25 | - name: "host1.tld" 26 | folder: "/" 27 | alias: "Host 1" 28 | - name: "host2.tld" 29 | folder: "/" 30 | alias: "Host 2" 31 | - name: "host3.tld" 32 | folder: "/" 33 | alias: "Host 3" 34 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_rules/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_rulesets/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_site/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_site/tasks/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: " {{ outer_item.version }} - {{ outer_item.edition | upper }} - Get config of the site." 3 | ansible.builtin.debug: 4 | msg: "Config of site {{ __checkmk_var_site.basic_settings.site_id }}: {{ __checkmk_var_site }}" 5 | vars: 6 | __checkmk_var_site: "{{ lookup('checkmk.general.site', 7 | outer_item.site, 8 | server_url=checkmk_var_server_url, 9 | site=outer_item.site, 10 | validate_certs=False, 11 | automation_user=checkmk_var_automation_user, 12 | automation_secret=checkmk_var_automation_secret) 13 | }}" 14 | delegate_to: localhost 15 | run_once: true # noqa run-once[task] 16 | 17 | - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Verify local connection." 18 | ansible.builtin.assert: 19 | that: "__checkmk_var_site.status_connection.connection.socket_type == 'local'" 20 | vars: 21 | __checkmk_var_site: "{{ lookup('checkmk.general.site', 22 | outer_item.site, 23 | server_url=checkmk_var_server_url, 24 | site=outer_item.site, 25 | validate_certs=False, 26 | automation_user=checkmk_var_automation_user, 27 | automation_secret=checkmk_var_automation_secret) 28 | }}" 29 | delegate_to: localhost 30 | run_once: true # noqa run-once[task] 31 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_site/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cre" 5 | site: "ancient_cre" 6 | port: "5022" 7 | - version: "2.3.0p33" 8 | edition: "cre" 9 | site: "old_cre" 10 | port: "5023" 11 | - version: "2.3.0p33" 12 | edition: "cme" 13 | site: "old_cme" 14 | port: "5323" 15 | - version: "2.4.0p2" 16 | edition: "cre" 17 | site: "stable_cre" 18 | port: "5024" 19 | - version: "2.4.0p2" 20 | edition: "cme" 21 | site: "stable_cme" 22 | port: "5324" 23 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_sites/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_sites/tasks/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: " {{ outer_item.version }} - {{ outer_item.edition | upper }} - Get config of the site." 3 | ansible.builtin.debug: 4 | msg: "Config of site {{ item.id }} is {{ item.extensions }}" 5 | loop: "{{ lookup('checkmk.general.sites', 6 | server_url=checkmk_var_server_url, 7 | site=outer_item.site, 8 | validate_certs=False, 9 | automation_user=checkmk_var_automation_user, 10 | automation_secret=checkmk_var_automation_secret) 11 | }}" 12 | loop_control: 13 | label: "{{ item.id }}" 14 | delegate_to: localhost 15 | run_once: true # noqa run-once[task] 16 | 17 | - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Verify local connection." 18 | ansible.builtin.debug: 19 | msg: "{{ __checkmk_var_sites }}" 20 | vars: 21 | __checkmk_var_sites: "{{ lookup('checkmk.general.sites', 22 | server_url=checkmk_var_server_url, 23 | site=outer_item.site, 24 | validate_certs=False, 25 | automation_user=checkmk_var_automation_user, 26 | automation_secret=checkmk_var_automation_secret) 27 | }}" 28 | delegate_to: localhost 29 | run_once: true # noqa run-once[task] 30 | 31 | - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Verify local connection." 32 | ansible.builtin.assert: 33 | that: "__checkmk_var_sites[0].extensions.status_connection.connection.socket_type == 'local'" 34 | vars: 35 | __checkmk_var_sites: "{{ lookup('checkmk.general.sites', 36 | server_url=checkmk_var_server_url, 37 | site=outer_item.site, 38 | validate_certs=False, 39 | automation_user=checkmk_var_automation_user, 40 | automation_secret=checkmk_var_automation_secret) 41 | }}" 42 | delegate_to: localhost 43 | run_once: true # noqa run-once[task] 44 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_sites/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cre" 5 | site: "ancient_cre" 6 | port: "5022" 7 | - version: "2.3.0p33" 8 | edition: "cre" 9 | site: "old_cre" 10 | port: "5023" 11 | - version: "2.3.0p33" 12 | edition: "cme" 13 | site: "old_cme" 14 | port: "5323" 15 | - version: "2.4.0p2" 16 | edition: "cre" 17 | site: "stable_cre" 18 | port: "5024" 19 | - version: "2.4.0p2" 20 | edition: "cme" 21 | site: "stable_cme" 22 | port: "5324" 23 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_version/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_version/tasks/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Set customer when needed." 3 | ansible.builtin.set_fact: 4 | checkmk_var_customer: "provider" 5 | when: outer_item.edition == "cme" 6 | 7 | - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Unset customer when needed." 8 | ansible.builtin.set_fact: 9 | checkmk_var_customer: null 10 | when: outer_item.edition != "cme" 11 | 12 | - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Get Checkmk version." 13 | ansible.builtin.debug: 14 | msg: "Version is {{ __checkmk_var_result_internal }}" 15 | vars: 16 | __checkmk_var_result_internal: "{{ lookup('checkmk.general.version', 17 | server_url=checkmk_var_server_url, 18 | site=outer_item.site, 19 | validate_certs=False, 20 | automation_user=checkmk_var_automation_user, 21 | automation_secret=checkmk_var_automation_secret) 22 | }}" 23 | delegate_to: localhost 24 | register: __checkmk_var_result_version 25 | 26 | - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Verify Checkmk version." 27 | ansible.builtin.assert: 28 | that: "outer_item.version in __checkmk_var_result_version.msg" 29 | 30 | - name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Use variables outside the module call." 31 | ansible.builtin.assert: 32 | that: "outer_item.version in __checkmk_var_result_module.msg" 33 | vars: 34 | __checkmk_var_result_module: "{{ lookup('checkmk.general.version') }}" 35 | delegate_to: localhost 36 | # register: __checkmk_var_result_module 37 | when: outer_item.edition == "stable_cme" 38 | -------------------------------------------------------------------------------- /tests/integration/targets/lookup_version/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cre" 5 | site: "ancient_cre" 6 | port: "5022" 7 | - version: "2.3.0p33" 8 | edition: "cre" 9 | site: "old_cre" 10 | port: "5023" 11 | - version: "2.3.0p33" 12 | edition: "cme" 13 | site: "old_cme" 14 | port: "5323" 15 | - version: "2.4.0p2" 16 | edition: "cre" 17 | site: "stable_cre" 18 | port: "5024" 19 | - version: "2.4.0p2" 20 | edition: "cme" 21 | site: "stable_cme" 22 | port: "5324" 23 | -------------------------------------------------------------------------------- /tests/integration/targets/password/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/rule/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/rule/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cre" 5 | site: "ancient_cre" 6 | port: "5022" 7 | - version: "2.3.0p33" 8 | edition: "cre" 9 | site: "old_cre" 10 | port: "5023" 11 | - version: "2.3.0p33" 12 | edition: "cme" 13 | site: "old_cme" 14 | port: "5323" 15 | - version: "2.4.0p2" 16 | edition: "cre" 17 | site: "stable_cre" 18 | port: "5024" 19 | - version: "2.4.0p2" 20 | edition: "cme" 21 | site: "stable_cme" 22 | port: "5324" 23 | -------------------------------------------------------------------------------- /tests/integration/targets/service_group/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/service_group/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | checkmk_var_test_sites: 3 | - version: "2.2.0p42" 4 | edition: "cre" 5 | site: "ancient_cre" 6 | port: "5022" 7 | - version: "2.3.0p33" 8 | edition: "cre" 9 | site: "old_cre" 10 | port: "5023" 11 | - version: "2.3.0p33" 12 | edition: "cme" 13 | site: "old_cme" 14 | port: "5323" 15 | - version: "2.4.0p2" 16 | edition: "cre" 17 | site: "stable_cre" 18 | port: "5024" 19 | - version: "2.4.0p2" 20 | edition: "cme" 21 | site: "stable_cme" 22 | port: "5324" 23 | 24 | checkmk_var_service_groups_create: 25 | - name: "test1" 26 | title: "Test_1" 27 | - name: "test2" 28 | - name: "test3" 29 | - name: "test4" 30 | title: "Test_4" 31 | - name: "test5" 32 | title: "Test_5" 33 | 34 | # 2 and 3 remains unchanged, good for idempotency check 35 | checkmk_var_service_groups_modify: 36 | - name: "test1" 37 | title: "Test_one" 38 | - name: "test2" 39 | title: "Test_2" 40 | - name: "test3" 41 | title: "Test_3" 42 | - name: "test4" 43 | title: "Test_four" 44 | - name: "test5" 45 | title: "Test_five" 46 | 47 | checkmk_var_service_groups_delete: 48 | - name: "test1" 49 | - name: "test3" 50 | -------------------------------------------------------------------------------- /tests/integration/targets/site/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/tag_group/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/timeperiod/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/integration/targets/user/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Include Global Variables." 3 | ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 4 | vars: 5 | checkmk_var_params: 6 | files: 7 | - global.yml 8 | paths: 9 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 10 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/vars/ 11 | - tests/integration/files/includes/vars/ 12 | 13 | - name: "Print Identifier." 14 | ansible.builtin.debug: 15 | msg: "{{ ansible_facts.system_vendor }} {{ ansible_facts.product_name }} running {{ ansible_facts.virtualization_type }}" 16 | 17 | - name: "Run preparations." 18 | ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', checkmk_var_params) }}" 19 | vars: 20 | checkmk_var_params: 21 | files: 22 | - prep.yml 23 | paths: 24 | - /home/runner/work/ansible-collection-checkmk.general/ansible-collection-checkmk.general/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 25 | - /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/ 26 | - tests/integration/files/includes/tasks/ 27 | when: | 28 | (ansible_facts.system_vendor == "Dell Inc." and 'Latitude' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 29 | or (ansible_facts.system_vendor == "QEMU" and 'Ubuntu' in ansible_facts.product_name and ansible_facts.virtualization_type == "container") 30 | 31 | - name: "Testing." 32 | ansible.builtin.include_tasks: test.yml 33 | loop: "{{ checkmk_var_test_sites }}" 34 | loop_control: 35 | loop_var: outer_item 36 | -------------------------------------------------------------------------------- /tests/sanity/ignore-2.14.txt: -------------------------------------------------------------------------------- 1 | tests/container/files/systemctl3.py pep8!skip 2 | tests/container/files/systemctl3.py no-basestring!skip 3 | tests/container/files/systemctl3.py pylint!skip 4 | tests/container/files/systemctl3.py shebang!skip -------------------------------------------------------------------------------- /tests/sanity/ignore-2.15.txt: -------------------------------------------------------------------------------- 1 | tests/container/files/systemctl3.py pep8!skip 2 | tests/container/files/systemctl3.py no-basestring!skip 3 | tests/container/files/systemctl3.py pylint!skip 4 | tests/container/files/systemctl3.py shebang!skip -------------------------------------------------------------------------------- /tests/sanity/ignore-2.16.txt: -------------------------------------------------------------------------------- 1 | tests/container/files/systemctl3.py pep8!skip 2 | tests/container/files/systemctl3.py no-basestring!skip 3 | tests/container/files/systemctl3.py pylint!skip 4 | tests/container/files/systemctl3.py shebang!skip 5 | tests/container/files/systemctl3.py compile-3.12!skip -------------------------------------------------------------------------------- /tests/sanity/ignore-2.17.txt: -------------------------------------------------------------------------------- 1 | tests/container/files/systemctl3.py pep8!skip 2 | tests/container/files/systemctl3.py pylint!skip 3 | tests/container/files/systemctl3.py shebang!skip 4 | tests/container/files/systemctl3.py compile-3.12!skip -------------------------------------------------------------------------------- /tests/sanity/ignore-2.18.txt: -------------------------------------------------------------------------------- 1 | tests/container/files/systemctl3.py pep8!skip 2 | tests/container/files/systemctl3.py pylint!skip 3 | tests/container/files/systemctl3.py shebang!skip 4 | tests/container/files/systemctl3.py compile-3.12!skip 5 | tests/container/files/systemctl3.py compile-3.13!skip -------------------------------------------------------------------------------- /tests/sanity/ignore-2.19.txt: -------------------------------------------------------------------------------- 1 | tests/container/files/systemctl3.py pep8!skip 2 | tests/container/files/systemctl3.py pylint!skip 3 | tests/container/files/systemctl3.py shebang!skip 4 | tests/container/files/systemctl3.py compile-3.12!skip 5 | tests/container/files/systemctl3.py compile-3.13!skip -------------------------------------------------------------------------------- /tests/unit/plugins/inventory/conftest.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import sys 4 | import importlib 5 | 6 | fake_lookupapi = importlib.import_module( 7 | "ansible_collections.checkmk.general.tests.unit.plugins.module_utils.lookup_api" 8 | ) 9 | sys.modules[ 10 | "ansible_collections.checkmk.general.plugins.module_utils.lookup_api" 11 | ] = fake_lookupapi 12 | --------------------------------------------------------------------------------