From 15780c33925ec0fc9c8978ccb5a9bf29d67037a5 Mon Sep 17 00:00:00 2001 From: robin-checkmk <93658105+robin-checkmk@users.noreply.github.com> Date: Fri, 16 Feb 2024 21:09:31 +0000 Subject: [PATCH] Update Docs and Changelogs upon Release --- CHANGELOG.rst | 28 ++++- changelogs/.plugin-cache.yaml | 8 +- .../4.3.0}/fix_folder_module_idempotency.yml | 0 .../{fragments => archive/4.3.0}/folder.yml | 0 .../{fragments => archive/4.3.0}/lookups.yml | 0 .../{fragments => archive/4.3.0}/parents.yml | 0 .../4.3.0}/release_summary.yml | 0 .../{fragments => archive/4.3.0}/rule.yml | 0 .../{fragments => archive/4.3.0}/user.yml | 0 changelogs/changelog.yaml | 35 ++++++ docs/activation_module.rst | 6 +- docs/bakery_lookup.rst | 111 ++++++++++++++-- docs/bakery_module.rst | 6 +- docs/contact_group_module.rst | 6 +- docs/discovery_module.rst | 6 +- docs/downtime_module.rst | 6 +- docs/environment_variables.rst | 78 +++++++++++- docs/folder_lookup.rst | 112 ++++++++++++++++- docs/folder_module.rst | 50 +++++++- docs/folders_lookup.rst | 119 +++++++++++++++++- docs/host_group_module.rst | 6 +- docs/host_lookup.rst | 112 ++++++++++++++++- docs/host_module.rst | 6 +- docs/hosts_lookup.rst | 119 +++++++++++++++++- docs/index.rst | 10 +- docs/password_module.rst | 6 +- docs/rule_lookup.rst | 114 ++++++++++++++++- docs/rule_module.rst | 50 +++++++- docs/rules_lookup.rst | 117 ++++++++++++++++- docs/ruleset_lookup.rst | 114 ++++++++++++++++- docs/rulesets_lookup.rst | 115 ++++++++++++++++- docs/service_group_module.rst | 6 +- docs/tag_group_module.rst | 6 +- docs/timeperiod_module.rst | 6 +- docs/user_module.rst | 6 +- docs/version_lookup.rst | 103 ++++++++++++++- 36 files changed, 1359 insertions(+), 108 deletions(-) rename changelogs/{fragments => archive/4.3.0}/fix_folder_module_idempotency.yml (100%) rename changelogs/{fragments => archive/4.3.0}/folder.yml (100%) rename changelogs/{fragments => archive/4.3.0}/lookups.yml (100%) rename changelogs/{fragments => archive/4.3.0}/parents.yml (100%) rename changelogs/{fragments => archive/4.3.0}/release_summary.yml (100%) rename changelogs/{fragments => archive/4.3.0}/rule.yml (100%) rename changelogs/{fragments => archive/4.3.0}/user.yml (100%) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6ea37fcde..bcb2476d9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,33 @@ checkmk.general Release Notes .. contents:: Topics +v4.3.0 +====== + +Release Summary +--------------- + +Reworking the CI, enhancing code quality and improving modules. + +Minor Changes +------------- + +- Folder module - Extend attribute management. Please refer to the module documentation for more details. +- Lookup modules - Enable usage of ini files, environment and inventory variables to configure basic settings for the lookup plugins, like e.g., the server_url or site alongside the authentication options. Refer to the module documentation for details. +- Rule module - Introduce rule_id to uniquely identify rules. This ID can be retrieved e.g., using the lookup plugin. Refer to the module documentation for further details. + +Bugfixes +-------- + +- Folder module - Fix idempotency when using "attributes" parameter for creating a folder. +- Folder module - Parents will be parsed properly now. This means, that parents given as a string will now be parsed as a list of one. +- Host module - Parents will be parsed properly now. This means, that parents given as a string will now be parsed as a list of one. +- User module - Fix bug, where an absent user was created, if 'reset_password' was used. + +Known Issues +------------ + +- Lookup modules - When using inventory variables to configure e.g., the server_url, it is not possible to assign other variables to these variables. This is a limitation of Ansble itself. v4.2.0 ====== @@ -604,7 +631,6 @@ Major Changes Minor Changes ------------- - v0.12.0 ======= diff --git a/changelogs/.plugin-cache.yaml b/changelogs/.plugin-cache.yaml index 5dbfd4d98..980e55b7f 100644 --- a/changelogs/.plugin-cache.yaml +++ b/changelogs/.plugin-cache.yaml @@ -31,15 +31,15 @@ plugins: name: hosts version_added: 3.3.0 rule: - description: Show rule + description: Show a rule name: rule version_added: 3.5.0 rules: - description: List rules + description: Get a list rules name: rules version_added: 3.5.0 ruleset: - description: Show ruleset + description: Show a ruleset name: ruleset version_added: 3.5.0 rulesets: @@ -126,4 +126,4 @@ plugins: strategy: {} test: {} vars: {} -version: 4.2.0 +version: 4.3.0 diff --git a/changelogs/fragments/fix_folder_module_idempotency.yml b/changelogs/archive/4.3.0/fix_folder_module_idempotency.yml similarity index 100% rename from changelogs/fragments/fix_folder_module_idempotency.yml rename to changelogs/archive/4.3.0/fix_folder_module_idempotency.yml diff --git a/changelogs/fragments/folder.yml b/changelogs/archive/4.3.0/folder.yml similarity index 100% rename from changelogs/fragments/folder.yml rename to changelogs/archive/4.3.0/folder.yml diff --git a/changelogs/fragments/lookups.yml b/changelogs/archive/4.3.0/lookups.yml similarity index 100% rename from changelogs/fragments/lookups.yml rename to changelogs/archive/4.3.0/lookups.yml diff --git a/changelogs/fragments/parents.yml b/changelogs/archive/4.3.0/parents.yml similarity index 100% rename from changelogs/fragments/parents.yml rename to changelogs/archive/4.3.0/parents.yml diff --git a/changelogs/fragments/release_summary.yml b/changelogs/archive/4.3.0/release_summary.yml similarity index 100% rename from changelogs/fragments/release_summary.yml rename to changelogs/archive/4.3.0/release_summary.yml diff --git a/changelogs/fragments/rule.yml b/changelogs/archive/4.3.0/rule.yml similarity index 100% rename from changelogs/fragments/rule.yml rename to changelogs/archive/4.3.0/rule.yml diff --git a/changelogs/fragments/user.yml b/changelogs/archive/4.3.0/user.yml similarity index 100% rename from changelogs/fragments/user.yml rename to changelogs/archive/4.3.0/user.yml diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 27a17b96a..ae2f95745 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -823,3 +823,38 @@ releases: - tag_group.yml - user.yml release_date: '2024-01-23' + 4.3.0: + changes: + bugfixes: + - Folder module - Fix idempotency when using "attributes" parameter for creating + a folder. + - Folder module - Parents will be parsed properly now. This means, that parents + given as a string will now be parsed as a list of one. + - Host module - Parents will be parsed properly now. This means, that parents + given as a string will now be parsed as a list of one. + - User module - Fix bug, where an absent user was created, if 'reset_password' + was used. + known_issues: + - Lookup modules - When using inventory variables to configure e.g., the server_url, + it is not possible to assign other variables to these variables. This is a + limitation of Ansble itself. + minor_changes: + - Folder module - Extend attribute management. Please refer to the module documentation + for more details. + - Lookup modules - Enable usage of ini files, environment and inventory variables + to configure basic settings for the lookup plugins, like e.g., the server_url + or site alongside the authentication options. Refer to the module documentation + for details. + - Rule module - Introduce rule_id to uniquely identify rules. This ID can be + retrieved e.g., using the lookup plugin. Refer to the module documentation + for further details. + release_summary: Reworking the CI, enhancing code quality and improving modules. + fragments: + - fix_folder_module_idempotency.yml + - folder.yml + - lookups.yml + - parents.yml + - release_summary.yml + - rule.yml + - user.yml + release_date: '2024-02-16' diff --git a/docs/activation_module.rst b/docs/activation_module.rst index 833b227a3..f3e352620 100644 --- a/docs/activation_module.rst +++ b/docs/activation_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.activation module -- Activate changes in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.2.0). + This module is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -259,7 +259,7 @@ Parameters
- The base url of your Checkmk server. + The base url of your Checkmk server including the protocol. .. raw:: html diff --git a/docs/bakery_lookup.rst b/docs/bakery_lookup.rst index 5aaac065f..13946203f 100644 --- a/docs/bakery_lookup.rst +++ b/docs/bakery_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.bakery lookup -- Get the bakery status of a Checkmk server .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.2.0). + This lookup plugin is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -112,7 +112,24 @@ examples: ``lookup('checkmk.general.bakery', key1=value1, key2=value2, ...)`` an
- automation secret for the REST API access + Automation secret for the REST API access. + + + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_secret = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_SECRET` + + - Variable: ansible\_lookup\_checkmk\_automation\_secret .. raw:: html @@ -149,7 +166,24 @@ examples: ``lookup('checkmk.general.bakery', key1=value1, key2=value2, ...)`` an
- automation user for the REST API access + Automation user for the REST API access. + + + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_user = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_USER` + + - Variable: ansible\_lookup\_checkmk\_automation\_user .. raw:: html @@ -189,6 +223,23 @@ examples: ``lookup('checkmk.general.bakery', key1=value1, key2=value2, ...)`` an URL of the Checkmk server + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + server_url = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SERVER\_URL` + + - Variable: ansible\_lookup\_checkmk\_server\_url + + .. raw:: html
@@ -223,7 +274,24 @@ examples: ``lookup('checkmk.general.bakery', key1=value1, key2=value2, ...)`` an
- site name + Site name. + + + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + site = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SITE` + + - Variable: ansible\_lookup\_checkmk\_site .. raw:: html @@ -260,7 +328,7 @@ examples: ``lookup('checkmk.general.bakery', key1=value1, key2=value2, ...)`` an
- Wether or not to validate TLS certificates + Whether or not to validate TLS certificates. .. rst-class:: ansible-option-line @@ -271,6 +339,23 @@ examples: ``lookup('checkmk.general.bakery', key1=value1, key2=value2, ...)`` an - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + validate_certs = true + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_VALIDATE\_CERTS` + + - Variable: ansible\_lookup\_checkmk\_validate\_certs + + .. raw:: html
@@ -288,6 +373,7 @@ Notes - Like all lookups, this runs on the Ansible controller and is unaffected by other keywords such as 'become'. If you need to use different permissions, you must change the command or run Ansible as another user. - Alternatively, you can use a shell/command task that runs against localhost and registers the result. - The directory of the play is used as the current working directory. + - It is \ :strong:`NOT`\ possible to assign other variables to the variables mentioned in the \ :literal:`vars`\ section! This is a limitation of Ansible itself. .. Seealso @@ -301,7 +387,7 @@ Examples - name: "Show bakery status" - debug: + ansible.builtin.debug: msg: "Bakery status is {{ bakery }}" vars: bakery: "{{ lookup('checkmk.general.bakery', @@ -312,6 +398,17 @@ Examples automation_secret=automation_secret )}}" + - name: "Use variables outside the module call." + ansible.builtin.debug: + msg: "Bakery status is {{ bakery }}" + vars: + ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}" + ansible_lookup_checkmk_site: "{{ outer_item.site }}" + ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}" + ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}" + ansible_lookup_checkmk_validate_certs: false + bakery: "{{ lookup('checkmk.general.bakery') }}" + diff --git a/docs/bakery_module.rst b/docs/bakery_module.rst index e67c155e1..14a417862 100644 --- a/docs/bakery_module.rst +++ b/docs/bakery_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.bakery module -- Trigger baking and signing in the agent bakery. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.2.0). + This module is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -174,7 +174,7 @@ Parameters
- The base url of your Checkmk server. + The base url of your Checkmk server including the protocol. .. raw:: html diff --git a/docs/contact_group_module.rst b/docs/contact_group_module.rst index e8c39b575..be1e21f0c 100644 --- a/docs/contact_group_module.rst +++ b/docs/contact_group_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.contact_group module -- Manage contact groups in Checkmk (bulk v .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.2.0). + This module is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -280,7 +280,7 @@ Parameters
- The base url of your Checkmk server. + The base url of your Checkmk server including the protocol. .. raw:: html diff --git a/docs/discovery_module.rst b/docs/discovery_module.rst index 41290fe02..edcd49017 100644 --- a/docs/discovery_module.rst +++ b/docs/discovery_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.discovery module -- Discover services in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.2.0). + This module is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -368,7 +368,7 @@ Parameters
- The base url of your Checkmk server. + The base url of your Checkmk server including the protocol. .. raw:: html diff --git a/docs/downtime_module.rst b/docs/downtime_module.rst index 71133f598..04a9abcca 100644 --- a/docs/downtime_module.rst +++ b/docs/downtime_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.downtime module -- Manage downtimes in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.2.0). + This module is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -402,7 +402,7 @@ Parameters
- The base url of your Checkmk server. + The base url of your Checkmk server including the protocol. .. raw:: html diff --git a/docs/environment_variables.rst b/docs/environment_variables.rst index e7b90605a..d0d332eb1 100644 --- a/docs/environment_variables.rst +++ b/docs/environment_variables.rst @@ -2,7 +2,7 @@ :orphan: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. _list_of_collection_env_vars: @@ -12,4 +12,78 @@ Index of all Collection Environment Variables The following index documents all environment variables declared by plugins in collections. Environment variables used by the ansible-core configuration are documented in :ref:`ansible_configuration_settings`. -No environment variables have been defined. +.. envvar:: ANSIBLE_LOOKUP_CHECKMK_AUTOMATION_SECRET + + Automation secret for the REST API access. + + *Used by:* + :ansplugin:`checkmk.general.bakery lookup plugin `, + :ansplugin:`checkmk.general.folder lookup plugin `, + :ansplugin:`checkmk.general.folders lookup plugin `, + :ansplugin:`checkmk.general.host lookup plugin `, + :ansplugin:`checkmk.general.hosts lookup plugin `, + :ansplugin:`checkmk.general.rule lookup plugin `, + :ansplugin:`checkmk.general.rules lookup plugin `, + :ansplugin:`checkmk.general.ruleset lookup plugin `, + :ansplugin:`checkmk.general.rulesets lookup plugin `, + :ansplugin:`checkmk.general.version lookup plugin ` +.. envvar:: ANSIBLE_LOOKUP_CHECKMK_AUTOMATION_USER + + Automation user for the REST API access. + + *Used by:* + :ansplugin:`checkmk.general.bakery lookup plugin `, + :ansplugin:`checkmk.general.folder lookup plugin `, + :ansplugin:`checkmk.general.folders lookup plugin `, + :ansplugin:`checkmk.general.host lookup plugin `, + :ansplugin:`checkmk.general.hosts lookup plugin `, + :ansplugin:`checkmk.general.rule lookup plugin `, + :ansplugin:`checkmk.general.rules lookup plugin `, + :ansplugin:`checkmk.general.ruleset lookup plugin `, + :ansplugin:`checkmk.general.rulesets lookup plugin `, + :ansplugin:`checkmk.general.version lookup plugin ` +.. envvar:: ANSIBLE_LOOKUP_CHECKMK_SERVER_URL + + See the documentations for the options where this environment variable is used. + + *Used by:* + :ansplugin:`checkmk.general.bakery lookup plugin `, + :ansplugin:`checkmk.general.folder lookup plugin `, + :ansplugin:`checkmk.general.folders lookup plugin `, + :ansplugin:`checkmk.general.host lookup plugin `, + :ansplugin:`checkmk.general.hosts lookup plugin `, + :ansplugin:`checkmk.general.rule lookup plugin `, + :ansplugin:`checkmk.general.rules lookup plugin `, + :ansplugin:`checkmk.general.ruleset lookup plugin `, + :ansplugin:`checkmk.general.rulesets lookup plugin `, + :ansplugin:`checkmk.general.version lookup plugin ` +.. envvar:: ANSIBLE_LOOKUP_CHECKMK_SITE + + Site name. + + *Used by:* + :ansplugin:`checkmk.general.bakery lookup plugin `, + :ansplugin:`checkmk.general.folder lookup plugin `, + :ansplugin:`checkmk.general.folders lookup plugin `, + :ansplugin:`checkmk.general.host lookup plugin `, + :ansplugin:`checkmk.general.hosts lookup plugin `, + :ansplugin:`checkmk.general.rule lookup plugin `, + :ansplugin:`checkmk.general.rules lookup plugin `, + :ansplugin:`checkmk.general.ruleset lookup plugin `, + :ansplugin:`checkmk.general.rulesets lookup plugin `, + :ansplugin:`checkmk.general.version lookup plugin ` +.. envvar:: ANSIBLE_LOOKUP_CHECKMK_VALIDATE_CERTS + + Whether or not to validate TLS certificates. + + *Used by:* + :ansplugin:`checkmk.general.bakery lookup plugin `, + :ansplugin:`checkmk.general.folder lookup plugin `, + :ansplugin:`checkmk.general.folders lookup plugin `, + :ansplugin:`checkmk.general.host lookup plugin `, + :ansplugin:`checkmk.general.hosts lookup plugin `, + :ansplugin:`checkmk.general.rule lookup plugin `, + :ansplugin:`checkmk.general.rules lookup plugin `, + :ansplugin:`checkmk.general.ruleset lookup plugin `, + :ansplugin:`checkmk.general.rulesets lookup plugin `, + :ansplugin:`checkmk.general.version lookup plugin ` diff --git a/docs/folder_lookup.rst b/docs/folder_lookup.rst index 59945519e..3233819fb 100644 --- a/docs/folder_lookup.rst +++ b/docs/folder_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.folder lookup -- Get folder attributes .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.2.0). + This lookup plugin is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -167,7 +167,24 @@ examples: ``lookup('checkmk.general.folder', key1=value1, key2=value2, ...)`` an
- automation secret for the REST API access + Automation secret for the REST API access. + + + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_secret = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_SECRET` + + - Variable: ansible\_lookup\_checkmk\_automation\_secret .. raw:: html @@ -204,7 +221,24 @@ examples: ``lookup('checkmk.general.folder', key1=value1, key2=value2, ...)`` an
- automation user for the REST API access + Automation user for the REST API access. + + + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_user = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_USER` + + - Variable: ansible\_lookup\_checkmk\_automation\_user .. raw:: html @@ -244,6 +278,23 @@ examples: ``lookup('checkmk.general.folder', key1=value1, key2=value2, ...)`` an URL of the Checkmk server + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + server_url = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SERVER\_URL` + + - Variable: ansible\_lookup\_checkmk\_server\_url + + .. raw:: html
@@ -278,7 +329,24 @@ examples: ``lookup('checkmk.general.folder', key1=value1, key2=value2, ...)`` an
- site name + Site name. + + + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + site = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SITE` + + - Variable: ansible\_lookup\_checkmk\_site .. raw:: html @@ -315,7 +383,7 @@ examples: ``lookup('checkmk.general.folder', key1=value1, key2=value2, ...)`` an
- Wether or not to validate TLS certificates + Whether or not to validate TLS certificates. .. rst-class:: ansible-option-line @@ -326,6 +394,23 @@ examples: ``lookup('checkmk.general.folder', key1=value1, key2=value2, ...)`` an - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + validate_certs = true + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_VALIDATE\_CERTS` + + - Variable: ansible\_lookup\_checkmk\_validate\_certs + + .. raw:: html
@@ -342,6 +427,10 @@ Notes .. note:: - When keyword and positional parameters are used together, positional parameters must be listed before keyword parameters: ``lookup('checkmk.general.folder', term1, term2, key1=value1, key2=value2)`` and ``query('checkmk.general.folder', term1, term2, key1=value1, key2=value2)`` + - Like all lookups, this runs on the Ansible controller and is unaffected by other keywords such as 'become'. If you need to use different permissions, you must change the command or run Ansible as another user. + - Alternatively, you can use a shell/command task that runs against localhost and registers the result. + - The directory of the play is used as the current working directory. + - It is \ :strong:`NOT`\ possible to assign other variables to the variables mentioned in the \ :literal:`vars`\ section! This is a limitation of Ansible itself. .. Seealso @@ -369,6 +458,17 @@ Examples ) }}" + - name: "Use variables outside the module call." + ansible.builtin.debug: + msg: "Attributes of folder /network: {{ attributes }}" + vars: + ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}" + ansible_lookup_checkmk_site: "{{ outer_item.site }}" + ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}" + ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}" + ansible_lookup_checkmk_validate_certs: false + attributes: "{{ lookup('checkmk.general.folder', '~tests') }}" + diff --git a/docs/folder_module.rst b/docs/folder_module.rst index 2c3d68992..ec27bc4d3 100644 --- a/docs/folder_module.rst +++ b/docs/folder_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.folder module -- Manage folders in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.2.0). + This module is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -177,6 +177,48 @@ Parameters The automation user you want to use. It has to be an 'Automation' user, not a normal one. + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. _ansible_collections.checkmk.general.folder_module__parameter-extended_functionality: + + .. rst-class:: ansible-option-title + + **extended_functionality** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`boolean` + + .. raw:: html + +
+ + - .. raw:: html + +
+ + Allow extended functionality instead of the expected REST API behavior. + + + .. rst-class:: ansible-option-line + + :ansible-option-choices:`Choices:` + + - :ansible-option-choices-entry:`false` + - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` + + .. raw:: html
@@ -280,7 +322,7 @@ Parameters
- The remove\_attributes of your host as described in the API documentation. This will only remove the given attributes. As of Check MK v2.2.0p7 and v2.3.0b1, simultaneous use of \ :emphasis:`attributes`\ , \ :emphasis:`remove\_attributes`\ , and \ :emphasis:`update\_attributes`\ is no longer supported. + The remove\_attributes of your host as described in the API documentation. \ :strong:`If a list of strings is supplied, the listed attributes are removed.`\ \ :strong:`If extended\_functionality and a dict is supplied, the attributes that exactly match the passed attributes are removed.`\ This will only remove the given attributes. As of Check MK v2.2.0p7 and v2.3.0b1, simultaneous use of \ :emphasis:`attributes`\ , \ :emphasis:`remove\_attributes`\ , and \ :emphasis:`update\_attributes`\ is no longer supported. .. raw:: html @@ -314,7 +356,7 @@ Parameters
- The base url of your Checkmk server. + The base url of your Checkmk server including the protocol. .. raw:: html diff --git a/docs/folders_lookup.rst b/docs/folders_lookup.rst index 243c341ba..cf46723a7 100644 --- a/docs/folders_lookup.rst +++ b/docs/folders_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.folders lookup -- Get various information about a folder .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.2.0). + This lookup plugin is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -168,7 +168,24 @@ examples: ``lookup('checkmk.general.folders', key1=value1, key2=value2, ...)`` a
- automation secret for the REST API access + Automation secret for the REST API access. + + + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_secret = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_SECRET` + + - Variable: ansible\_lookup\_checkmk\_automation\_secret .. raw:: html @@ -205,7 +222,24 @@ examples: ``lookup('checkmk.general.folders', key1=value1, key2=value2, ...)`` a
- automation user for the REST API access + Automation user for the REST API access. + + + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_user = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_USER` + + - Variable: ansible\_lookup\_checkmk\_automation\_user .. raw:: html @@ -290,6 +324,23 @@ examples: ``lookup('checkmk.general.folders', key1=value1, key2=value2, ...)`` a URL of the Checkmk server + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + server_url = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SERVER\_URL` + + - Variable: ansible\_lookup\_checkmk\_server\_url + + .. raw:: html
@@ -369,7 +420,24 @@ examples: ``lookup('checkmk.general.folders', key1=value1, key2=value2, ...)`` a
- site name + Site name. + + + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + site = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SITE` + + - Variable: ansible\_lookup\_checkmk\_site .. raw:: html @@ -406,7 +474,7 @@ examples: ``lookup('checkmk.general.folders', key1=value1, key2=value2, ...)`` a
- Wether or not to validate TLS cerificates + Whether or not to validate TLS certificates. .. rst-class:: ansible-option-line @@ -417,6 +485,23 @@ examples: ``lookup('checkmk.general.folders', key1=value1, key2=value2, ...)`` a - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + validate_certs = true + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_VALIDATE\_CERTS` + + - Variable: ansible\_lookup\_checkmk\_validate\_certs + + .. raw:: html
@@ -433,6 +518,10 @@ Notes .. note:: - When keyword and positional parameters are used together, positional parameters must be listed before keyword parameters: ``lookup('checkmk.general.folders', term1, term2, key1=value1, key2=value2)`` and ``query('checkmk.general.folders', term1, term2, key1=value1, key2=value2)`` + - Like all lookups, this runs on the Ansible controller and is unaffected by other keywords such as 'become'. If you need to use different permissions, you must change the command or run Ansible as another user. + - Alternatively, you can use a shell/command task that runs against localhost and registers the result. + - The directory of the play is used as the current working directory. + - It is \ :strong:`NOT`\ possible to assign other variables to the variables mentioned in the \ :literal:`vars`\ section! This is a limitation of Ansible itself. .. Seealso @@ -483,6 +572,24 @@ Examples loop_control: label: "{{ item.0.id }}" + - name: "Use variables outside the module call." + ansible.builtin.debug: + msg: "Folder tree: {{ item.id }}" + vars: + ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}" + ansible_lookup_checkmk_site: "{{ outer_item.site }}" + ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}" + ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}" + ansible_lookup_checkmk_validate_certs: false + loop: "{{ + lookup('checkmk.general.folders', + '~', + show_hosts=False, + recursive=True, + ) }}" + loop_control: + label: "{{ item.id }}" + diff --git a/docs/host_group_module.rst b/docs/host_group_module.rst index 31633c1ce..00fcf6893 100644 --- a/docs/host_group_module.rst +++ b/docs/host_group_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.host_group module -- Manage host groups in Checkmk (bulk version .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.2.0). + This module is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -280,7 +280,7 @@ Parameters
- The base url of your Checkmk server. + The base url of your Checkmk server including the protocol. .. raw:: html diff --git a/docs/host_lookup.rst b/docs/host_lookup.rst index 306a3a4dc..20df10c55 100644 --- a/docs/host_lookup.rst +++ b/docs/host_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.host lookup -- Get host attributes .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.2.0). + This lookup plugin is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -167,7 +167,24 @@ examples: ``lookup('checkmk.general.host', key1=value1, key2=value2, ...)`` and
- automation secret for the REST API access + Automation secret for the REST API access. + + + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_secret = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_SECRET` + + - Variable: ansible\_lookup\_checkmk\_automation\_secret .. raw:: html @@ -204,7 +221,24 @@ examples: ``lookup('checkmk.general.host', key1=value1, key2=value2, ...)`` and
- automation user for the REST API access + Automation user for the REST API access. + + + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_user = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_USER` + + - Variable: ansible\_lookup\_checkmk\_automation\_user .. raw:: html @@ -289,6 +323,23 @@ examples: ``lookup('checkmk.general.host', key1=value1, key2=value2, ...)`` and URL of the Checkmk server + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + server_url = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SERVER\_URL` + + - Variable: ansible\_lookup\_checkmk\_server\_url + + .. raw:: html
@@ -323,7 +374,24 @@ examples: ``lookup('checkmk.general.host', key1=value1, key2=value2, ...)`` and
- site name + Site name. + + + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + site = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SITE` + + - Variable: ansible\_lookup\_checkmk\_site .. raw:: html @@ -360,7 +428,7 @@ examples: ``lookup('checkmk.general.host', key1=value1, key2=value2, ...)`` and
- Wether or not to validate TLS cerificates + Whether or not to validate TLS certificates. .. rst-class:: ansible-option-line @@ -371,6 +439,23 @@ examples: ``lookup('checkmk.general.host', key1=value1, key2=value2, ...)`` and - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + validate_certs = true + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_VALIDATE\_CERTS` + + - Variable: ansible\_lookup\_checkmk\_validate\_certs + + .. raw:: html
@@ -387,6 +472,10 @@ Notes .. note:: - When keyword and positional parameters are used together, positional parameters must be listed before keyword parameters: ``lookup('checkmk.general.host', term1, term2, key1=value1, key2=value2)`` and ``query('checkmk.general.host', term1, term2, key1=value1, key2=value2)`` + - Like all lookups, this runs on the Ansible controller and is unaffected by other keywords such as 'become'. If you need to use different permissions, you must change the command or run Ansible as another user. + - Alternatively, you can use a shell/command task that runs against localhost and registers the result. + - The directory of the play is used as the current working directory. + - It is \ :strong:`NOT`\ possible to assign other variables to the variables mentioned in the \ :literal:`vars`\ section! This is a limitation of Ansible itself. .. Seealso @@ -415,6 +504,17 @@ Examples ) }}" + - name: "Use variables outside the module call." + ansible.builtin.debug: + msg: "Attributes of host example: {{ attributes }}" + vars: + ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}" + ansible_lookup_checkmk_site: "{{ outer_item.site }}" + ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}" + ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}" + ansible_lookup_checkmk_validate_certs: false + attributes: "{{ lookup('checkmk.general.host', 'example.com', effective_attributes=True) }}" + diff --git a/docs/host_module.rst b/docs/host_module.rst index c0b8a4510..8e699fcec 100644 --- a/docs/host_module.rst +++ b/docs/host_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.host module -- Manage hosts in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.2.0). + This module is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -318,7 +318,7 @@ Parameters
- The base url of your Checkmk server. + The base url of your Checkmk server including the protocol. .. raw:: html diff --git a/docs/hosts_lookup.rst b/docs/hosts_lookup.rst index cdb4f881c..444d3e617 100644 --- a/docs/hosts_lookup.rst +++ b/docs/hosts_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.hosts lookup -- Get various information about a host .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.2.0). + This lookup plugin is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -113,7 +113,24 @@ examples: ``lookup('checkmk.general.hosts', key1=value1, key2=value2, ...)`` and
- automation secret for the REST API access + Automation secret for the REST API access. + + + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_secret = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_SECRET` + + - Variable: ansible\_lookup\_checkmk\_automation\_secret .. raw:: html @@ -150,7 +167,24 @@ examples: ``lookup('checkmk.general.hosts', key1=value1, key2=value2, ...)`` and
- automation user for the REST API access + Automation user for the REST API access. + + + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_user = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_USER` + + - Variable: ansible\_lookup\_checkmk\_automation\_user .. raw:: html @@ -235,6 +269,23 @@ examples: ``lookup('checkmk.general.hosts', key1=value1, key2=value2, ...)`` and URL of the Checkmk server + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + server_url = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SERVER\_URL` + + - Variable: ansible\_lookup\_checkmk\_server\_url + + .. raw:: html
@@ -269,7 +320,24 @@ examples: ``lookup('checkmk.general.hosts', key1=value1, key2=value2, ...)`` and
- site name + Site name. + + + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + site = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SITE` + + - Variable: ansible\_lookup\_checkmk\_site .. raw:: html @@ -306,7 +374,7 @@ examples: ``lookup('checkmk.general.hosts', key1=value1, key2=value2, ...)`` and
- Wether or not to validate TLS cerificates + Whether or not to validate TLS certificates. .. rst-class:: ansible-option-line @@ -317,6 +385,23 @@ examples: ``lookup('checkmk.general.hosts', key1=value1, key2=value2, ...)`` and - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + validate_certs = true + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_VALIDATE\_CERTS` + + - Variable: ansible\_lookup\_checkmk\_validate\_certs + + .. raw:: html
@@ -327,6 +412,14 @@ examples: ``lookup('checkmk.general.hosts', key1=value1, key2=value2, ...)`` and .. Notes +Notes +----- + +.. note:: + - Like all lookups, this runs on the Ansible controller and is unaffected by other keywords such as 'become'. If you need to use different permissions, you must change the command or run Ansible as another user. + - Alternatively, you can use a shell/command task that runs against localhost and registers the result. + - The directory of the play is used as the current working directory. + - It is \ :strong:`NOT`\ possible to assign other variables to the variables mentioned in the \ :literal:`vars`\ section! This is a limitation of Ansible itself. .. Seealso @@ -355,6 +448,20 @@ Examples loop_control: label: "{{ item.id }}" + - name: "Use variables outside the module call." + ansible.builtin.debug: + msg: "Host: {{ item.id }} in folder {{ item.extensions.folder }}, IP: {{ item.extensions.effective_attributes.ipaddress }}" + vars: + ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}" + ansible_lookup_checkmk_site: "{{ outer_item.site }}" + ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}" + ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}" + ansible_lookup_checkmk_validate_certs: false + loop: "{{ + lookup('checkmk.general.hosts', effective_attributes=True) }}" + loop_control: + label: "{{ item.id }}" + diff --git a/docs/index.rst b/docs/index.rst index 9e4033ad8..6fa6c5930 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,7 +1,7 @@ .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. _plugins_in_checkmk.general: @@ -9,7 +9,7 @@ Checkmk.General =============== -Collection version 4.2.0 +Collection version 4.3.0 .. contents:: :local: @@ -99,9 +99,9 @@ Lookup Plugins * :ansplugin:`folders lookup ` -- Get various information about a folder * :ansplugin:`host lookup ` -- Get host attributes * :ansplugin:`hosts lookup ` -- Get various information about a host -* :ansplugin:`rule lookup ` -- Show rule -* :ansplugin:`rules lookup ` -- List rules -* :ansplugin:`ruleset lookup ` -- Show ruleset +* :ansplugin:`rule lookup ` -- Show a rule +* :ansplugin:`rules lookup ` -- Get a list rules +* :ansplugin:`ruleset lookup ` -- Show a ruleset * :ansplugin:`rulesets lookup ` -- Search rulesets * :ansplugin:`version lookup ` -- Get the version of a Checkmk server diff --git a/docs/password_module.rst b/docs/password_module.rst index 3768602a1..e0b8634e0 100644 --- a/docs/password_module.rst +++ b/docs/password_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.password module -- Manage passwords in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.2.0). + This module is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -378,7 +378,7 @@ Parameters
- The base url of your Checkmk server. + The base url of your Checkmk server including the protocol. .. raw:: html diff --git a/docs/rule_lookup.rst b/docs/rule_lookup.rst index 9c3651195..b32c830f7 100644 --- a/docs/rule_lookup.rst +++ b/docs/rule_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -17,13 +17,13 @@ .. Title -checkmk.general.rule lookup -- Show rule -++++++++++++++++++++++++++++++++++++++++ +checkmk.general.rule lookup -- Show a rule +++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.2.0). + This lookup plugin is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -115,6 +115,23 @@ examples: ``lookup('checkmk.general.rule', key1=value1, key2=value2, ...)`` and Automation secret for the REST API access. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_secret = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_SECRET` + + - Variable: ansible\_lookup\_checkmk\_automation\_secret + + .. raw:: html
@@ -152,6 +169,23 @@ examples: ``lookup('checkmk.general.rule', key1=value1, key2=value2, ...)`` and Automation user for the REST API access. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_user = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_USER` + + - Variable: ansible\_lookup\_checkmk\_automation\_user + + .. raw:: html
@@ -226,6 +260,23 @@ examples: ``lookup('checkmk.general.rule', key1=value1, key2=value2, ...)`` and URL of the Checkmk server. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + server_url = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SERVER\_URL` + + - Variable: ansible\_lookup\_checkmk\_server\_url + + .. raw:: html
@@ -263,6 +314,23 @@ examples: ``lookup('checkmk.general.rule', key1=value1, key2=value2, ...)`` and Site name. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + site = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SITE` + + - Variable: ansible\_lookup\_checkmk\_site + + .. raw:: html
@@ -297,7 +365,7 @@ examples: ``lookup('checkmk.general.rule', key1=value1, key2=value2, ...)`` and
- Whether or not to validate TLS cerificates. + Whether or not to validate TLS certificates. .. rst-class:: ansible-option-line @@ -308,6 +376,23 @@ examples: ``lookup('checkmk.general.rule', key1=value1, key2=value2, ...)`` and - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + validate_certs = true + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_VALIDATE\_CERTS` + + - Variable: ansible\_lookup\_checkmk\_validate\_certs + + .. raw:: html
@@ -318,6 +403,14 @@ examples: ``lookup('checkmk.general.rule', key1=value1, key2=value2, ...)`` and .. Notes +Notes +----- + +.. note:: + - Like all lookups, this runs on the Ansible controller and is unaffected by other keywords such as 'become'. If you need to use different permissions, you must change the command or run Ansible as another user. + - Alternatively, you can use a shell/command task that runs against localhost and registers the result. + - The directory of the play is used as the current working directory. + - It is \ :strong:`NOT`\ possible to assign other variables to the variables mentioned in the \ :literal:`vars`\ section! This is a limitation of Ansible itself. .. Seealso @@ -345,6 +438,17 @@ Examples ) }}" + - name: "Use variables outside the module call." + ansible.builtin.debug: + msg: "Rule: {{ extensions }}" + vars: + ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}" + ansible_lookup_checkmk_site: "{{ outer_item.site }}" + ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}" + ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}" + ansible_lookup_checkmk_validate_certs: false + attributes: "{{ lookup('checkmk.general.rule', rule_id='a9285bc1-dcaf-45e0-a3ba-ad398ef06a49') }}" + diff --git a/docs/rule_module.rst b/docs/rule_module.rst index bd973c7bd..9fa3ca7e2 100644 --- a/docs/rule_module.rst +++ b/docs/rule_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.rule module -- Manage rules in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.2.0). + This module is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -461,6 +461,50 @@ Parameters Properties of the rule. + .. raw:: html + +
+ + * - .. raw:: html + +
+
+ + .. raw:: latex + + \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} + + .. _ansible_collections.checkmk.general.rule_module__parameter-rule/rule_id: + + .. rst-class:: ansible-option-title + + **rule_id** + + .. raw:: html + + + + .. ansible-option-type-line:: + + :ansible-option-type:`string` + + .. raw:: html + +
+ + .. raw:: latex + + \end{minipage} + + - .. raw:: html + +
+ + If given, it will be \ :literal:`the only condition`\ to identify the rule to work on. + + When there's no rule found with this id, the task will fail. + + .. raw:: html
@@ -569,7 +613,7 @@ Parameters
- The base url of your Checkmk server. + The base url of your Checkmk server including the protocol. .. raw:: html diff --git a/docs/rules_lookup.rst b/docs/rules_lookup.rst index 65409420e..285e5b5dc 100644 --- a/docs/rules_lookup.rst +++ b/docs/rules_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -17,13 +17,13 @@ .. Title -checkmk.general.rules lookup -- List rules -++++++++++++++++++++++++++++++++++++++++++ +checkmk.general.rules lookup -- Get a list rules +++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.2.0). + This lookup plugin is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -115,6 +115,23 @@ examples: ``lookup('checkmk.general.rules', key1=value1, key2=value2, ...)`` and Automation secret for the REST API access. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_secret = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_SECRET` + + - Variable: ansible\_lookup\_checkmk\_automation\_secret + + .. raw:: html
@@ -152,6 +169,23 @@ examples: ``lookup('checkmk.general.rules', key1=value1, key2=value2, ...)`` and Automation user for the REST API access. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_user = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_USER` + + - Variable: ansible\_lookup\_checkmk\_automation\_user + + .. raw:: html
@@ -308,6 +342,23 @@ examples: ``lookup('checkmk.general.rules', key1=value1, key2=value2, ...)`` and URL of the Checkmk server. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + server_url = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SERVER\_URL` + + - Variable: ansible\_lookup\_checkmk\_server\_url + + .. raw:: html
@@ -345,6 +396,23 @@ examples: ``lookup('checkmk.general.rules', key1=value1, key2=value2, ...)`` and Site name. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + site = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SITE` + + - Variable: ansible\_lookup\_checkmk\_site + + .. raw:: html
@@ -379,7 +447,7 @@ examples: ``lookup('checkmk.general.rules', key1=value1, key2=value2, ...)`` and
- Whether or not to validate TLS cerificates. + Whether or not to validate TLS certificates. .. rst-class:: ansible-option-line @@ -390,6 +458,23 @@ examples: ``lookup('checkmk.general.rules', key1=value1, key2=value2, ...)`` and - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + validate_certs = true + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_VALIDATE\_CERTS` + + - Variable: ansible\_lookup\_checkmk\_validate\_certs + + .. raw:: html
@@ -400,6 +485,14 @@ examples: ``lookup('checkmk.general.rules', key1=value1, key2=value2, ...)`` and .. Notes +Notes +----- + +.. note:: + - Like all lookups, this runs on the Ansible controller and is unaffected by other keywords such as 'become'. If you need to use different permissions, you must change the command or run Ansible as another user. + - Alternatively, you can use a shell/command task that runs against localhost and registers the result. + - The directory of the play is used as the current working directory. + - It is \ :strong:`NOT`\ possible to assign other variables to the variables mentioned in the \ :literal:`vars`\ section! This is a limitation of Ansible itself. .. Seealso @@ -446,6 +539,20 @@ Examples loop_control: label: "{{ item.id }}" + - name: "Use variables outside the module call." + ansible.builtin.debug: + msg: "Rule: {{ item.extensions }}" + vars: + ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}" + ansible_lookup_checkmk_site: "{{ outer_item.site }}" + ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}" + ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}" + ansible_lookup_checkmk_validate_certs: false + loop: "{{ + lookup('checkmk.general.rules', ruleset='host_groups') }}" + loop_control: + label: "{{ item.id }}" + diff --git a/docs/ruleset_lookup.rst b/docs/ruleset_lookup.rst index 5d0df3cb3..544918bba 100644 --- a/docs/ruleset_lookup.rst +++ b/docs/ruleset_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -17,13 +17,13 @@ .. Title -checkmk.general.ruleset lookup -- Show ruleset -++++++++++++++++++++++++++++++++++++++++++++++ +checkmk.general.ruleset lookup -- Show a ruleset +++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.2.0). + This lookup plugin is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -115,6 +115,23 @@ examples: ``lookup('checkmk.general.ruleset', key1=value1, key2=value2, ...)`` a Automation secret for the REST API access. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_secret = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_SECRET` + + - Variable: ansible\_lookup\_checkmk\_automation\_secret + + .. raw:: html
@@ -152,6 +169,23 @@ examples: ``lookup('checkmk.general.ruleset', key1=value1, key2=value2, ...)`` a Automation user for the REST API access. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_user = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_USER` + + - Variable: ansible\_lookup\_checkmk\_automation\_user + + .. raw:: html
@@ -226,6 +260,23 @@ examples: ``lookup('checkmk.general.ruleset', key1=value1, key2=value2, ...)`` a URL of the Checkmk server. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + server_url = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SERVER\_URL` + + - Variable: ansible\_lookup\_checkmk\_server\_url + + .. raw:: html
@@ -263,6 +314,23 @@ examples: ``lookup('checkmk.general.ruleset', key1=value1, key2=value2, ...)`` a Site name. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + site = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SITE` + + - Variable: ansible\_lookup\_checkmk\_site + + .. raw:: html
@@ -297,7 +365,7 @@ examples: ``lookup('checkmk.general.ruleset', key1=value1, key2=value2, ...)`` a
- Whether or not to validate TLS cerificates. + Whether or not to validate TLS certificates. .. rst-class:: ansible-option-line @@ -308,6 +376,23 @@ examples: ``lookup('checkmk.general.ruleset', key1=value1, key2=value2, ...)`` a - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + validate_certs = true + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_VALIDATE\_CERTS` + + - Variable: ansible\_lookup\_checkmk\_validate\_certs + + .. raw:: html
@@ -318,6 +403,14 @@ examples: ``lookup('checkmk.general.ruleset', key1=value1, key2=value2, ...)`` a .. Notes +Notes +----- + +.. note:: + - Like all lookups, this runs on the Ansible controller and is unaffected by other keywords such as 'become'. If you need to use different permissions, you must change the command or run Ansible as another user. + - Alternatively, you can use a shell/command task that runs against localhost and registers the result. + - The directory of the play is used as the current working directory. + - It is \ :strong:`NOT`\ possible to assign other variables to the variables mentioned in the \ :literal:`vars`\ section! This is a limitation of Ansible itself. .. Seealso @@ -345,6 +438,17 @@ Examples ) }}" + - name: "Use variables outside the module call." + ansible.builtin.debug: + msg: "Ruleset: {{ extensions }}" + vars: + ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}" + ansible_lookup_checkmk_site: "{{ outer_item.site }}" + ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}" + ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}" + ansible_lookup_checkmk_validate_certs: false + extensions: "{{ lookup('checkmk.general.ruleset', ruleset='host_groups') }}" + diff --git a/docs/rulesets_lookup.rst b/docs/rulesets_lookup.rst index 3c1850bac..b8b0cbf81 100644 --- a/docs/rulesets_lookup.rst +++ b/docs/rulesets_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.rulesets lookup -- Search rulesets .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.2.0). + This lookup plugin is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -115,6 +115,23 @@ examples: ``lookup('checkmk.general.rulesets', key1=value1, key2=value2, ...)`` Automation secret for the REST API access. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_secret = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_SECRET` + + - Variable: ansible\_lookup\_checkmk\_automation\_secret + + .. raw:: html
@@ -152,6 +169,23 @@ examples: ``lookup('checkmk.general.rulesets', key1=value1, key2=value2, ...)`` Automation user for the REST API access. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_user = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_USER` + + - Variable: ansible\_lookup\_checkmk\_automation\_user + + .. raw:: html
@@ -359,6 +393,23 @@ examples: ``lookup('checkmk.general.rulesets', key1=value1, key2=value2, ...)`` URL of the Checkmk server. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + server_url = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SERVER\_URL` + + - Variable: ansible\_lookup\_checkmk\_server\_url + + .. raw:: html
@@ -393,7 +444,24 @@ examples: ``lookup('checkmk.general.rulesets', key1=value1, key2=value2, ...)``
- Site name + Site name. + + + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + site = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SITE` + + - Variable: ansible\_lookup\_checkmk\_site .. raw:: html @@ -430,7 +498,7 @@ examples: ``lookup('checkmk.general.rulesets', key1=value1, key2=value2, ...)``
- Whether or not to validate TLS cerificates. + Whether or not to validate TLS certificates. .. rst-class:: ansible-option-line @@ -441,6 +509,23 @@ examples: ``lookup('checkmk.general.rulesets', key1=value1, key2=value2, ...)`` - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + validate_certs = true + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_VALIDATE\_CERTS` + + - Variable: ansible\_lookup\_checkmk\_validate\_certs + + .. raw:: html
@@ -451,6 +536,14 @@ examples: ``lookup('checkmk.general.rulesets', key1=value1, key2=value2, ...)`` .. Notes +Notes +----- + +.. note:: + - Like all lookups, this runs on the Ansible controller and is unaffected by other keywords such as 'become'. If you need to use different permissions, you must change the command or run Ansible as another user. + - Alternatively, you can use a shell/command task that runs against localhost and registers the result. + - The directory of the play is used as the current working directory. + - It is \ :strong:`NOT`\ possible to assign other variables to the variables mentioned in the \ :literal:`vars`\ section! This is a limitation of Ansible itself. .. Seealso @@ -498,6 +591,20 @@ Examples loop_control: label: "{{ item.0.id }}" + - name: "Use variables outside the module call." + ansible.builtin.debug: + msg: "Ruleset {{ item.extension.name }} is deprecated." + vars: + ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}" + ansible_lookup_checkmk_site: "{{ outer_item.site }}" + ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}" + ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}" + ansible_lookup_checkmk_validate_certs: false + loop: "{{ + lookup('checkmk.general.rulesets', regex='', rulesets_deprecated=True, rulesets_used=True) }}" + loop_control: + label: "{{ item.0.id }}" + diff --git a/docs/service_group_module.rst b/docs/service_group_module.rst index 23823acc0..ff0d1a444 100644 --- a/docs/service_group_module.rst +++ b/docs/service_group_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.service_group module -- Manage service groups in Checkmk (bulk v .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.2.0). + This module is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -280,7 +280,7 @@ Parameters
- The base url of your Checkmk server. + The base url of your Checkmk server including the protocol. .. raw:: html diff --git a/docs/tag_group_module.rst b/docs/tag_group_module.rst index 474bac84c..b04875a73 100644 --- a/docs/tag_group_module.rst +++ b/docs/tag_group_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.tag_group module -- Manage tag groups in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.2.0). + This module is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -292,7 +292,7 @@ Parameters
- The base url of your Checkmk server. + The base url of your Checkmk server including the protocol. .. raw:: html diff --git a/docs/timeperiod_module.rst b/docs/timeperiod_module.rst index 42d060689..1666e6506 100644 --- a/docs/timeperiod_module.rst +++ b/docs/timeperiod_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.timeperiod module -- Manage time periods in checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.2.0). + This module is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -344,7 +344,7 @@ Parameters
- The base url of your Checkmk server. + The base url of your Checkmk server including the protocol. .. raw:: html diff --git a/docs/user_module.rst b/docs/user_module.rst index 5ec6d55ce..9fb54be1b 100644 --- a/docs/user_module.rst +++ b/docs/user_module.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.user module -- Manage users in Checkmk. .. Collection note .. note:: - This module is part of the `checkmk.general collection `_ (version 4.2.0). + This module is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -975,7 +975,7 @@ Parameters
- The base url of your Checkmk server. + The base url of your Checkmk server including the protocol. .. raw:: html diff --git a/docs/version_lookup.rst b/docs/version_lookup.rst index 7f592e844..60024fa81 100644 --- a/docs/version_lookup.rst +++ b/docs/version_lookup.rst @@ -7,7 +7,7 @@ :trim: .. meta:: - :antsibull-docs: 2.6.1 + :antsibull-docs: 2.7.0 .. Anchors @@ -23,7 +23,7 @@ checkmk.general.version lookup -- Get the version of a Checkmk server .. Collection note .. note:: - This lookup plugin is part of the `checkmk.general collection `_ (version 4.2.0). + This lookup plugin is part of the `checkmk.general collection `_ (version 4.3.0). It is not included in ``ansible-core``. To check whether it is installed, run :code:`ansible-galaxy collection list`. @@ -115,6 +115,23 @@ examples: ``lookup('checkmk.general.version', key1=value1, key2=value2, ...)`` a Automation secret for the REST API access. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_secret = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_SECRET` + + - Variable: ansible\_lookup\_checkmk\_automation\_secret + + .. raw:: html
@@ -152,6 +169,23 @@ examples: ``lookup('checkmk.general.version', key1=value1, key2=value2, ...)`` a Automation user for the REST API access. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + automation_user = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_AUTOMATION\_USER` + + - Variable: ansible\_lookup\_checkmk\_automation\_user + + .. raw:: html
@@ -186,7 +220,24 @@ examples: ``lookup('checkmk.general.version', key1=value1, key2=value2, ...)`` a
- URL of the Checkmk server + URL of the Checkmk server. + + + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + server_url = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SERVER\_URL` + + - Variable: ansible\_lookup\_checkmk\_server\_url .. raw:: html @@ -226,6 +277,23 @@ examples: ``lookup('checkmk.general.version', key1=value1, key2=value2, ...)`` a Site name. + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + site = VALUE + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_SITE` + + - Variable: ansible\_lookup\_checkmk\_site + + .. raw:: html
@@ -271,6 +339,23 @@ examples: ``lookup('checkmk.general.version', key1=value1, key2=value2, ...)`` a - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` + .. rst-class:: ansible-option-line + + :ansible-option-configuration:`Configuration:` + + - INI entry: + + .. code-block:: + + [checkmk_lookup] + validate_certs = true + + + - Environment variable: :envvar:`ANSIBLE\_LOOKUP\_CHECKMK\_VALIDATE\_CERTS` + + - Variable: ansible\_lookup\_checkmk\_validate\_certs + + .. raw:: html
@@ -288,6 +373,7 @@ Notes - Like all lookups, this runs on the Ansible controller and is unaffected by other keywords such as 'become'. If you need to use different permissions, you must change the command or run Ansible as another user. - Alternatively, you can use a shell/command task that runs against localhost and registers the result. - The directory of the play is used as the current working directory. + - It is \ :strong:`NOT`\ possible to assign other variables to the variables mentioned in the \ :literal:`vars`\ section! This is a limitation of Ansible itself. .. Seealso @@ -311,6 +397,17 @@ Examples automation_secret=my_secret )}}" + - name: "Use variables outside the module call." + ansible.builtin.debug: + msg: "Server version is {{ version }}" + vars: + ansible_lookup_checkmk_server_url: "{{ checkmk_var_server_url }}" + ansible_lookup_checkmk_site: "{{ outer_item.site }}" + ansible_lookup_checkmk_automation_user: "{{ checkmk_var_automation_user }}" + ansible_lookup_checkmk_automation_secret: "{{ checkmk_var_automation_secret }}" + ansible_lookup_checkmk_validate_certs: false + attributes: "{{ lookup('checkmk.general.version') }}" +