- 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..248ca372e 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.3.1).
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..441a63269 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.1).
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..11c8938eb 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.1).
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..cd72f8c1d 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.1).
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..7d815c5a4 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.1).
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') }}"
+
diff --git a/galaxy.yml b/galaxy.yml
index 8e1ad3332..f4f35b8cd 100644
--- a/galaxy.yml
+++ b/galaxy.yml
@@ -10,7 +10,7 @@ name: general
# The version of the collection. Must be compatible with semantic versioning
-version: 4.2.0
+version: 4.3.1
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
diff --git a/plugins/doc_fragments/common.py b/plugins/doc_fragments/common.py
index d70c16134..d0ed25cd9 100644
--- a/plugins/doc_fragments/common.py
+++ b/plugins/doc_fragments/common.py
@@ -7,7 +7,7 @@ class ModuleDocFragment(object):
DOCUMENTATION = r"""
options:
server_url:
- description: The base url of your Checkmk server.
+ description: The base url of your Checkmk server including the protocol.
required: true
type: str
site:
diff --git a/plugins/lookup/README.md b/plugins/lookup/README.md
new file mode 100644
index 000000000..c5b855619
--- /dev/null
+++ b/plugins/lookup/README.md
@@ -0,0 +1,57 @@
+# Lookup Plugins
+
+## Using variables for Lookup plugins
+It is possible to set variables for authentication globally for lookup plugins.
+This way, they do not need to be provided at task level.
+
+### Method 1: Environment variables
+```bash
+export ANSIBLE_LOOKUP_CHECKMK_SERVER_URL="https://myserver"
+export ANSIBLE_LOOKUP_CHECKMK_SITE=mysite
+export ANSIBLE_LOOKUP_AUTOMATION_USER=automation
+export ANSIBLE_LOOKUP_AUTOMATION_SECRET=mysecret
+export ANSIBLE_LOOKUP_VALIDATE_CERTS=False
+```
+
+### Method 2: In `ansible.cfg`
+```ini
+[checkmk_lookup]
+server_url = https://myserver
+site = mysite
+automation_user = automation
+automation_secret = mysecret
+validate_certs = False
+
+```
+
+### Method 3: In playbooks or the inventory
+```yaml
+- name: My Task
+ hosts: localhost
+ gather_facts: false
+ vars:
+ ansible_lookup_checkmk_server_url: "https://myserver"
+ ansible_lookup_checkmk_site: "mysite"
+ ansible_lookup_automation_user: "automation"
+ ansible_lookup_automation_secret: "mysecret"
+ ansible_lookup_validate_certs: false
+
+ tasks:
+ - name: Get the attributes of myhost
+ ansible.builtin.debug:
+ msg: "Attributes of myhost: {{ attributes }}"
+ vars:
+ attributes: "{{ lookup('checkmk.general.host', 'myhost', effective_attributes=True) }}"
+```
+
+### Example
+The following task will work, if one of the above methods has been applied.
+```yaml
+- name: My Task
+ tasks:
+ - name: Get the attributes of myhost
+ ansible.builtin.debug:
+ msg: "Attributes of myhost: {{ attributes }}"
+ vars:
+ attributes: "{{ lookup('checkmk.general.host', 'myhost', effective_attributes=True) }}"
+```
diff --git a/plugins/lookup/bakery.py b/plugins/lookup/bakery.py
index 0346e3122..6308bb351 100644
--- a/plugins/lookup/bakery.py
+++ b/plugins/lookup/bakery.py
@@ -79,11 +79,13 @@
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 B(NOT) possible to assign other variables to the variables mentioned in the C(vars) section!
+ This is a limitation of Ansible itself.
"""
EXAMPLES = """
- name: "Show bakery status"
- debug:
+ ansible.builtin.debug:
msg: "Bakery status is {{ bakery }}"
vars:
bakery: "{{ lookup('checkmk.general.bakery',
@@ -93,6 +95,17 @@
automation_user=automation_user,
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') }}"
"""
RETURN = """
diff --git a/plugins/lookup/folder.py b/plugins/lookup/folder.py
index 56a204ca2..a2b5db1cd 100644
--- a/plugins/lookup/folder.py
+++ b/plugins/lookup/folder.py
@@ -83,6 +83,8 @@
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 B(NOT) possible to assign other variables to the variables mentioned in the C(vars) section!
+ This is a limitation of Ansible itself.
"""
EXAMPLES = """
@@ -100,6 +102,17 @@
validate_certs=False
)
}}"
+
+- 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') }}"
"""
RETURN = """
diff --git a/plugins/lookup/folders.py b/plugins/lookup/folders.py
index 8a3a9708a..4a18d7aaf 100644
--- a/plugins/lookup/folders.py
+++ b/plugins/lookup/folders.py
@@ -96,6 +96,8 @@
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 B(NOT) possible to assign other variables to the variables mentioned in the C(vars) section!
+ This is a limitation of Ansible itself.
"""
EXAMPLES = """
@@ -136,6 +138,24 @@
loop: "{{ looping|subelements('members.hosts.value') }}"
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 }}"
"""
RETURN = """
diff --git a/plugins/lookup/host.py b/plugins/lookup/host.py
index a4145221d..af9a191fc 100644
--- a/plugins/lookup/host.py
+++ b/plugins/lookup/host.py
@@ -89,6 +89,8 @@
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 B(NOT) possible to assign other variables to the variables mentioned in the C(vars) section!
+ This is a limitation of Ansible itself.
"""
EXAMPLES = """
@@ -107,6 +109,17 @@
validate_certs=False
)
}}"
+
+- 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) }}"
"""
RETURN = """
diff --git a/plugins/lookup/hosts.py b/plugins/lookup/hosts.py
index 79f2e744e..50756e84a 100644
--- a/plugins/lookup/hosts.py
+++ b/plugins/lookup/hosts.py
@@ -86,6 +86,8 @@
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 B(NOT) possible to assign other variables to the variables mentioned in the C(vars) section!
+ This is a limitation of Ansible itself.
"""
EXAMPLES = """
@@ -104,6 +106,20 @@
}}"
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 }}"
"""
RETURN = """
diff --git a/plugins/lookup/rule.py b/plugins/lookup/rule.py
index 441b3ac71..105f39034 100644
--- a/plugins/lookup/rule.py
+++ b/plugins/lookup/rule.py
@@ -83,6 +83,8 @@
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 B(NOT) possible to assign other variables to the variables mentioned in the C(vars) section!
+ This is a limitation of Ansible itself.
"""
EXAMPLES = """
@@ -100,6 +102,17 @@
validate_certs=False
)
}}"
+
+- 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') }}"
"""
RETURN = """
diff --git a/plugins/lookup/rules.py b/plugins/lookup/rules.py
index a9b954f8c..c36349ea7 100644
--- a/plugins/lookup/rules.py
+++ b/plugins/lookup/rules.py
@@ -93,6 +93,8 @@
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 B(NOT) possible to assign other variables to the variables mentioned in the C(vars) section!
+ This is a limitation of Ansible itself.
"""
EXAMPLES = """
@@ -129,6 +131,20 @@
}}"
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 }}"
"""
RETURN = """
diff --git a/plugins/lookup/ruleset.py b/plugins/lookup/ruleset.py
index d25d1cb05..790fd7db9 100644
--- a/plugins/lookup/ruleset.py
+++ b/plugins/lookup/ruleset.py
@@ -83,6 +83,8 @@
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 B(NOT) possible to assign other variables to the variables mentioned in the C(vars) section!
+ This is a limitation of Ansible itself.
"""
EXAMPLES = """
@@ -100,6 +102,17 @@
validate_certs=False
)
}}"
+
+- 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') }}"
"""
RETURN = """
diff --git a/plugins/lookup/rulesets.py b/plugins/lookup/rulesets.py
index 349920375..10acc985d 100644
--- a/plugins/lookup/rulesets.py
+++ b/plugins/lookup/rulesets.py
@@ -102,6 +102,8 @@
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 B(NOT) possible to assign other variables to the variables mentioned in the C(vars) section!
+ This is a limitation of Ansible itself.
"""
EXAMPLES = """
@@ -139,6 +141,20 @@
}}"
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 }}"
"""
RETURN = """
diff --git a/plugins/lookup/version.py b/plugins/lookup/version.py
index 5a87f4ded..389876af2 100644
--- a/plugins/lookup/version.py
+++ b/plugins/lookup/version.py
@@ -79,6 +79,8 @@
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 B(NOT) possible to assign other variables to the variables mentioned in the C(vars) section!
+ This is a limitation of Ansible itself.
"""
EXAMPLES = """
@@ -92,6 +94,17 @@
automation_user=my_user,
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') }}"
"""
RETURN = """
diff --git a/plugins/modules/rule.py b/plugins/modules/rule.py
index 097acce4e..238dbd8cd 100644
--- a/plugins/modules/rule.py
+++ b/plugins/modules/rule.py
@@ -67,6 +67,11 @@
properties:
description: Properties of the rule.
type: dict
+ rule_id:
+ description:
+ - If given, it will be C(the only condition) to identify the rule to work on.
+ - When there's no rule found with this id, the task will fail.
+ type: str
value_raw:
description: Rule values as exported from the web interface.
type: str
@@ -284,20 +289,20 @@ def get_rules_in_ruleset(module, base_url, headers, ruleset):
exit_failed(
module,
"Error calling API. HTTP code %d. Details: %s, "
- % (info["status"], info["body"]),
+ % (info["status"], str(info)),
)
- return json.loads(response.read().decode("utf-8"))
+ return json.loads(response.read().decode("utf-8")).get("value")
def get_rule_by_id(module, base_url, headers, rule_id):
api_endpoint = "/objects/rule/" + rule_id
- url = base_url + api_endpoint
+ url = "%s%s" % (base_url, api_endpoint)
response, info = fetch_url(module, url, headers=headers, method="GET")
- if info["status"] not in [200, 204]:
+ if info["status"] != 200:
exit_failed(
module,
"Error calling API. HTTP code %d. Details: %s, "
@@ -308,8 +313,15 @@ def get_rule_by_id(module, base_url, headers, rule_id):
def get_existing_rule(module, base_url, headers, ruleset, rule):
- # Get rules in ruleset
- rules = get_rules_in_ruleset(module, base_url, headers, ruleset)
+ if rule.get("rule_id"):
+ # We already know whih rule to get
+ if module.params.get("state") == "absent":
+ # When deleting and we already know the ID, don't compare
+ return rule.get("rule_id")
+ rules = [get_rule_by_id(module, base_url, headers, rule.get("rule_id"))]
+ else:
+ # Get rules in ruleset
+ rules = get_rules_in_ruleset(module, base_url, headers, ruleset)
(value_mod, exc) = safe_eval(rule["value_raw"], include_exceptions=True)
if exc is not None:
@@ -324,7 +336,7 @@ def get_existing_rule(module, base_url, headers, ruleset, rule):
if rules is not None:
# Loop through all rules
- for r in rules.get("value"):
+ for r in rules:
(value_api, exc) = safe_eval(
r["extensions"]["value_raw"], include_exceptions=True
)
@@ -338,7 +350,7 @@ def get_existing_rule(module, base_url, headers, ruleset, rule):
and value_api == value_mod
):
# If they are the same, return the ID
- return r
+ return r["id"]
return None
@@ -347,9 +359,9 @@ def create_rule(module, base_url, headers, ruleset, rule):
api_endpoint = "/domain-types/rule/collections/all"
changed = True
- e = get_existing_rule(module, base_url, headers, ruleset, rule)
- if e:
- return (e["id"], not changed)
+ rule_id = get_existing_rule(module, base_url, headers, ruleset, rule)
+ if rule_id:
+ return (rule_id, not changed)
if module.check_mode:
return (None, changed)
@@ -380,12 +392,51 @@ def create_rule(module, base_url, headers, ruleset, rule):
return (r["id"], changed)
+def modify_rule(module, base_url, headers, ruleset, rule):
+ changed = True
+ rule_id = rule.get("rule_id")
+
+ if not rule_id:
+ return not changed
+
+ if get_existing_rule(module, base_url, headers, ruleset, rule):
+ return not changed
+
+ if module.check_mode:
+ return (None, changed)
+
+ headers["If-Match"] = get_rule_etag(module, base_url, headers, rule_id)
+
+ params = {
+ "properties": rule["properties"],
+ "value_raw": rule["value_raw"],
+ "conditions": rule["conditions"],
+ }
+
+ api_endpoint = "/objects/rule/" + rule_id
+ url = base_url + api_endpoint
+
+ info = fetch_url(
+ module, url, module.jsonify(params), headers=headers, method="PUT"
+ )[1]
+
+ if info["status"] not in [200, 204]:
+ exit_failed(
+ module,
+ "Error calling API. HTTP code %d. Details: %s, "
+ % (info["status"], info["body"]),
+ )
+
+ return changed
+
+
def delete_rule(module, base_url, headers, ruleset, rule):
changed = True
- e = get_existing_rule(module, base_url, headers, ruleset, rule)
- if e:
+ rule_id = get_existing_rule(module, base_url, headers, ruleset, rule)
+
+ if rule_id:
if not module.check_mode:
- delete_rule_by_id(module, base_url, headers, e["id"])
+ delete_rule_by_id(module, base_url, headers, rule_id)
return changed
return not changed
@@ -471,6 +522,7 @@ def run_module():
conditions=dict(type="dict"),
properties=dict(type="dict"),
value_raw=dict(type="str"),
+ rule_id=dict(type="str"),
location=dict(
type="dict",
options=dict(
@@ -519,23 +571,24 @@ def run_module():
# Get the variables
ruleset = module.params.get("ruleset", "")
- rule = module.params.get("rule", "")
+ rule = module.params.get("rule", {})
location = rule.get("location")
# Check if required params to create a rule are given
- if rule.get("folder") is None or rule.get("folder") == "":
+ if not rule.get("folder"):
rule["folder"] = location["folder"]
- if rule.get("properties") is None or rule.get("properties") == "":
- exit_failed(module, "Rule properties are required")
- if rule.get("value_raw") is None or rule.get("value_raw") == "":
- exit_failed(module, "Rule value_raw is required")
- # Default to all hosts if conditions arent given
- if rule.get("conditions") is None or rule.get("conditions") == "":
- rule["conditions"] = {
- "host_tags": [],
- "host_labels": [],
- "service_labels": [],
- }
+ if not rule.get("rule_id"):
+ if not rule.get("properties"):
+ exit_failed(module, "Rule properties are required")
+ if not rule.get("value_raw"):
+ exit_failed(module, "Rule value_raw is required")
+ # Default to all hosts if conditions arent given
+ if not rule.get("conditions"):
+ rule["conditions"] = {
+ "host_tags": [],
+ "host_labels": [],
+ "service_labels": [],
+ }
if module.params.get("state") == "absent":
if location.get("rule_id") is not None:
exit_failed(module, "rule_id in location is invalid with state=absent")
@@ -549,13 +602,24 @@ def run_module():
exit_ok(module, "Rule does not exist")
# If state is present, create the rule
elif module.params.get("state") == "present":
- (rule_id, created) = create_rule(module, base_url, headers, ruleset, rule)
- if created:
+ action = None
+ if rule.get("rule_id"):
+ # Modify an existing rule
+ rule_id = rule.get("rule_id")
+ if modify_rule(module, base_url, headers, ruleset, rule):
+ action = "changed"
+ else:
+ # If no rule_id is mentioned, we check if our rule exists. If not, then create it.
+ (rule_id, changed) = create_rule(module, base_url, headers, ruleset, rule)
+ if changed:
+ action = "created"
+
+ if action:
# Move rule to specified location, if it's not default
if location["position"] != "bottom" and not module.check_mode:
move_rule(module, base_url, headers, rule_id, location)
- exit_changed(module, "Rule created", rule_id)
- exit_ok(module, "Rule already exists", rule_id)
+ exit_changed(module, "Rule %s" % action, rule_id)
+ exit_ok(module, "Rule already exists with equal settings", rule_id)
# Fallback
exit_failed(module, "Unknown error")
diff --git a/roles/agent/README.md b/roles/agent/README.md
index cb7d55538..d062dad65 100644
--- a/roles/agent/README.md
+++ b/roles/agent/README.md
@@ -13,7 +13,7 @@ It can be installed as easy as running:
## Role Variables
- checkmk_agent_version: "2.2.0p22"
+ checkmk_agent_version: "2.2.0p23"
The Checkmk version of the site your agents will talk to.
@@ -64,12 +64,12 @@ The user used to authenticate against your Checkmk site.
checkmk_agent_pass: my_secret
-The password for the normal user used to authenticate against your Checkmk site, both for API calls and agent updates.
+The password for the normal user used to authenticate against your Checkmk site, both for API calls and agent updates.
This is mutually exclusive with `checkmk_agent_secret`.
checkmk_agent_secret: my_secret
-The secret for the automation user used to authenticate against your Checkmk site, both for API calls and agent updates.
+The secret for the automation user used to authenticate against your Checkmk site, both for API calls and agent updates.
This is mutually exclusive with `checkmk_agent_pass`.
checkmk_agent_port: 6556
@@ -145,7 +145,7 @@ Enable this to automatically install `xinetd` on hosts with systemd prior to ver
checkmk_agent_delegate_api_calls: localhost
-Configure the host to which Checkmk API calls are delegated to.
+Configure the host to which Checkmk API calls are delegated to.
Typically this would be your Ansible host, hence the default `localhost`.
checkmk_agent_delegate_download: "{{ inventory_hostname }}"
@@ -155,8 +155,8 @@ Configure the host to which Checkmk API downloads are delegated to. After downlo
checkmk_agent_mode: pull
The mode the agent operates in. For most deployments, this will be the `pull` mode.
-If you are uncertain, what you are using, this is most likely your mode.
-If you are using an alternative way to call the agent, e.g. SSH, you can set the variable to `ssh`, so the agent port check is skipped.
+If you are uncertain, what you are using, this is most likely your mode.
+If you are using an alternative way to call the agent, e.g. SSH, you can set the variable to `ssh`, so the agent port check is skipped.
If you are using the Checkmk Cloud Edition (CCE) with an agent in `push` mode, you want to set this to `push` to avoid the agent port check, as well as triggering an initial push of data.
checkmk_agent_no_log: 'true'
diff --git a/roles/agent/defaults/main.yml b/roles/agent/defaults/main.yml
index d99c3a1f1..e43d0f13a 100644
--- a/roles/agent/defaults/main.yml
+++ b/roles/agent/defaults/main.yml
@@ -1,5 +1,5 @@
---
-checkmk_agent_version: "2.2.0p22"
+checkmk_agent_version: "2.2.0p23"
checkmk_agent_edition: cre
checkmk_agent_server_protocol: http
checkmk_agent_server: localhost
diff --git a/roles/agent/molecule/2.1.0/group_vars/all.yml b/roles/agent/molecule/2.1.0/group_vars/all.yml
index 23df43011..1437d561b 100644
--- a/roles/agent/molecule/2.1.0/group_vars/all.yml
+++ b/roles/agent/molecule/2.1.0/group_vars/all.yml
@@ -1,6 +1,6 @@
---
# General
-checkmk_var_version: "2.1.0p39"
+checkmk_var_version: "2.1.0p40"
checkmk_var_edition: "cre"
checkmk_var_checkmk_site: "my_site"
checkmk_var_automation_user: "cmkadmin"
diff --git a/roles/agent/molecule/2.2.0/group_vars/all.yml b/roles/agent/molecule/2.2.0/group_vars/all.yml
index 2d9a1d6d6..6a8503c5c 100644
--- a/roles/agent/molecule/2.2.0/group_vars/all.yml
+++ b/roles/agent/molecule/2.2.0/group_vars/all.yml
@@ -1,6 +1,6 @@
---
# General
-checkmk_var_version: "2.2.0p22"
+checkmk_var_version: "2.2.0p23"
checkmk_var_edition: "cre"
checkmk_var_checkmk_site: "my_site"
checkmk_var_automation_user: "cmkadmin"
diff --git a/roles/server/README.md b/roles/server/README.md
index 3d679da43..3cf7618f1 100644
--- a/roles/server/README.md
+++ b/roles/server/README.md
@@ -25,7 +25,7 @@ To learn about the distributions used in automated tests, inspect the correspond
## Role Variables
- checkmk_server_version: "2.2.0p22"
+ checkmk_server_version: "2.2.0p23"
The global Checkmk version. This is used for installing Checkmk.
To manage sites and their version, see `checkmk_server_sites`.
@@ -42,7 +42,7 @@ The edition you want to use. Valid values are `cre`, `cfe`, `cee`, `cce` and `cm
For details about the editions see: https://checkmk.com/product/editions
-Note, that you need credentials, to download the following editions: `cee` and `cme`.
+Note, that you need credentials, to download the following editions: `cee` and `cme`.
See below variables, to set those.
checkmk_server_download_user: []
@@ -99,7 +99,7 @@ Valid choices include `install`, `keepold` and `abort`.
Site configuration can be passed with the `omd_config` keyword.
The format can be seen above, for a list of variables run `omd show`
-on an existing site.
+on an existing site.
**Pay special attention to the `omd_auto_restart` variable!** As site configuration needs the site to be stopped, this needs to be handled. By default the variable is set to `false` to avoid unexpected restarting. However, no configuration will be performed if the site is started.
checkmk_server_backup_on_update: 'true'
diff --git a/roles/server/defaults/main.yml b/roles/server/defaults/main.yml
index 62e6dd721..a7a084093 100644
--- a/roles/server/defaults/main.yml
+++ b/roles/server/defaults/main.yml
@@ -24,7 +24,7 @@ checkmk_server_server_stable_os:
- Ubuntu-20
- Ubuntu-22
-checkmk_server_version: "2.2.0p22"
+checkmk_server_version: "2.2.0p23"
checkmk_server_edition: cre
checkmk_server_verify_setup: 'true'
diff --git a/roles/server/molecule/2.1.0/group_vars/all.yml b/roles/server/molecule/2.1.0/group_vars/all.yml
index 8baa9a637..62c495f0e 100644
--- a/roles/server/molecule/2.1.0/group_vars/all.yml
+++ b/roles/server/molecule/2.1.0/group_vars/all.yml
@@ -1,6 +1,6 @@
---
# General
-checkmk_var_version: "2.1.0p39"
+checkmk_var_version: "2.1.0p40"
checkmk_var_edition: "cre"
checkmk_server_verify_setup: 'true'
checkmk_var_server_url: "http://127.0.0.1/"
diff --git a/roles/server/molecule/2.2.0/group_vars/all.yml b/roles/server/molecule/2.2.0/group_vars/all.yml
index 902bdc3ae..a65cf8c29 100644
--- a/roles/server/molecule/2.2.0/group_vars/all.yml
+++ b/roles/server/molecule/2.2.0/group_vars/all.yml
@@ -1,6 +1,6 @@
---
# General
-checkmk_var_version: "2.2.0p22"
+checkmk_var_version: "2.2.0p23"
checkmk_var_edition: "cre"
checkmk_server_verify_setup: 'true'
checkmk_var_server_url: "http://127.0.0.1/"
diff --git a/scripts/release.sh b/scripts/release.sh
index 01cb20fa8..58d7a2caf 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -16,8 +16,8 @@ collection_dir="${script_dir%/*}"
# Update these as necessary:
checkmk_ancient="2.0.0p39"
-checkmk_oldstable="2.1.0p39"
-checkmk_stable="2.2.0p22"
+checkmk_oldstable="2.1.0p40"
+checkmk_stable="2.2.0p23"
checkmk_beta="2.3.0b1"
while getopts 's:t:' OPTION; do
diff --git a/tests/integration/files/includes/vars/global.yml b/tests/integration/files/includes/vars/global.yml
index 57f8bb073..f243be9f5 100644
--- a/tests/integration/files/includes/vars/global.yml
+++ b/tests/integration/files/includes/vars/global.yml
@@ -15,3 +15,13 @@ checkmk_server_edition_mapping:
cee: enterprise
cce: cloud
cme: managed
+
+
+# This is a very hacky workaround, as it is not possible to assign variables
+# to other variables when using them in lookup modules.
+ansible_lookup_checkmk_server_url: "http://127.0.0.1"
+ansible_lookup_checkmk_site: "stable_cee" # This is especially hacky.
+ # All integration tests were adapted to run the specific task only on this site.
+ansible_lookup_checkmk_automation_user: "cmkadmin"
+ansible_lookup_checkmk_automation_secret: "Sup3rSec4et!"
+ansible_lookup_checkmk_validate_certs: false
diff --git a/tests/integration/targets/activation/vars/main.yml b/tests/integration/targets/activation/vars/main.yml
index d3d68b4e4..c6c8ddb11 100644
--- a/tests/integration/targets/activation/vars/main.yml
+++ b/tests/integration/targets/activation/vars/main.yml
@@ -3,13 +3,13 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
- version: "2.0.0p39"
diff --git a/tests/integration/targets/bakery/tasks/main.yml b/tests/integration/targets/bakery/tasks/main.yml
index bbb3963bc..de3aba5ec 100644
--- a/tests/integration/targets/bakery/tasks/main.yml
+++ b/tests/integration/targets/bakery/tasks/main.yml
@@ -5,6 +5,16 @@
- name: "Run Preparations."
ansible.builtin.include_tasks: /root/ansible_collections/checkmk/general/tests/integration/files/includes/tasks/prep.yml
+- name: "Inject a Key into the Sites." # This is a hack and should never be done in production!
+ ansible.builtin.copy:
+ src: agent_signature_keys.mk
+ dest: "/omd/sites/{{ item.site }}/etc/check_mk/multisite.d/wato/agent_signature_keys.mk"
+ owner: "{{ item.site }}"
+ group: "{{ item.site }}"
+ mode: "0660"
+ loop: "{{ test_sites }}"
+ when: (download_pass is defined and download_pass | length) or item.edition == "cre"
+
- name: "Testing."
ansible.builtin.include_tasks: test.yml
loop: "{{ test_sites }}"
diff --git a/tests/integration/targets/bakery/vars/main.yml b/tests/integration/targets/bakery/vars/main.yml
index 1d3fd0265..da88042e1 100644
--- a/tests/integration/targets/bakery/vars/main.yml
+++ b/tests/integration/targets/bakery/vars/main.yml
@@ -3,10 +3,10 @@ test_sites:
- version: "2.3.0b1"
edition: "cme"
site: "beta_cme"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cee"
site: "old_cee"
diff --git a/tests/integration/targets/contact_group/vars/main.yml b/tests/integration/targets/contact_group/vars/main.yml
index bae95c104..eb9ee884a 100644
--- a/tests/integration/targets/contact_group/vars/main.yml
+++ b/tests/integration/targets/contact_group/vars/main.yml
@@ -6,13 +6,13 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
- version: "2.0.0p39"
diff --git a/tests/integration/targets/discovery/vars/main.yml b/tests/integration/targets/discovery/vars/main.yml
index c610d0c55..2a8616f90 100644
--- a/tests/integration/targets/discovery/vars/main.yml
+++ b/tests/integration/targets/discovery/vars/main.yml
@@ -3,13 +3,13 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
- version: "2.0.0p39"
diff --git a/tests/integration/targets/downtime/vars/main.yml b/tests/integration/targets/downtime/vars/main.yml
index d3d68b4e4..c6c8ddb11 100644
--- a/tests/integration/targets/downtime/vars/main.yml
+++ b/tests/integration/targets/downtime/vars/main.yml
@@ -3,13 +3,13 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
- version: "2.0.0p39"
diff --git a/tests/integration/targets/folder/vars/main.yml b/tests/integration/targets/folder/vars/main.yml
index dbccfff06..bac92c431 100644
--- a/tests/integration/targets/folder/vars/main.yml
+++ b/tests/integration/targets/folder/vars/main.yml
@@ -3,13 +3,13 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
- version: "2.0.0p39"
diff --git a/tests/integration/targets/host/vars/main.yml b/tests/integration/targets/host/vars/main.yml
index e1b1af9f7..877e54bdb 100644
--- a/tests/integration/targets/host/vars/main.yml
+++ b/tests/integration/targets/host/vars/main.yml
@@ -3,13 +3,13 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
- version: "2.0.0p39"
diff --git a/tests/integration/targets/host_group/vars/main.yml b/tests/integration/targets/host_group/vars/main.yml
index 7ae741733..778396fa8 100644
--- a/tests/integration/targets/host_group/vars/main.yml
+++ b/tests/integration/targets/host_group/vars/main.yml
@@ -6,16 +6,16 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cme"
site: "stable_cme"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
- version: "2.0.0p39"
diff --git a/tests/integration/targets/lookup_bakery/tasks/test.yml b/tests/integration/targets/lookup_bakery/tasks/test.yml
index b594758f0..a24572023 100644
--- a/tests/integration/targets/lookup_bakery/tasks/test.yml
+++ b/tests/integration/targets/lookup_bakery/tasks/test.yml
@@ -20,3 +20,15 @@
("'initialized' in looked_up_bakery.msg") or
("'stopped' in looked_up_bakery.msg") or
("'exception' in looked_up_bakery.msg")
+
+- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Use variables outside the module call."
+ ansible.builtin.assert:
+ that: ("'finished' in bakery.msg") or
+ ("'running' in bakery.msg") or
+ ("'initialized' in bakery.msg") or
+ ("'stopped' in bakery.msg") or
+ ("'exception' in bakery.msg")
+ vars:
+ bakery: "{{ lookup('checkmk.general.bakery') }}"
+ delegate_to: localhost
+ when: outer_item.edition == "stable_cee"
diff --git a/tests/integration/targets/lookup_bakery/vars/main.yml b/tests/integration/targets/lookup_bakery/vars/main.yml
index a7e6724c0..a31e71c77 100644
--- a/tests/integration/targets/lookup_bakery/vars/main.yml
+++ b/tests/integration/targets/lookup_bakery/vars/main.yml
@@ -3,9 +3,9 @@ test_sites:
- version: "2.3.0b1"
edition: "cme"
site: "beta_cme"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cee"
site: "old_cee"
diff --git a/tests/integration/targets/lookup_folder/tasks/test.yml b/tests/integration/targets/lookup_folder/tasks/test.yml
index 647dc014d..11522c352 100644
--- a/tests/integration/targets/lookup_folder/tasks/test.yml
+++ b/tests/integration/targets/lookup_folder/tasks/test.yml
@@ -57,3 +57,12 @@
}}"
delegate_to: localhost
run_once: true # noqa run-once[task]
+
+- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Use variables outside the module call."
+ ansible.builtin.assert:
+ that: "extensions.attributes.tag_criticality == checkmk_folder.criticality"
+ vars:
+ extensions: "{{ lookup('checkmk.general.folder', checkmk_folder.path) }}"
+ delegate_to: localhost
+ run_once: true # noqa run-once[task]
+ when: outer_item.edition == "stable_cee"
diff --git a/tests/integration/targets/lookup_folder/vars/main.yml b/tests/integration/targets/lookup_folder/vars/main.yml
index 7f45fe088..f23b3d751 100644
--- a/tests/integration/targets/lookup_folder/vars/main.yml
+++ b/tests/integration/targets/lookup_folder/vars/main.yml
@@ -3,13 +3,13 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
- version: "2.0.0p39"
diff --git a/tests/integration/targets/lookup_folders/tasks/test.yml b/tests/integration/targets/lookup_folders/tasks/test.yml
index befebd766..f7109c8bc 100644
--- a/tests/integration/targets/lookup_folders/tasks/test.yml
+++ b/tests/integration/targets/lookup_folders/tasks/test.yml
@@ -14,7 +14,7 @@
run_once: true # noqa run-once[task]
loop: "{{ checkmk_var_folders }}"
-- name: "Get all folders."
+- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Get all folders."
ansible.builtin.debug:
var: folders
vars:
@@ -30,7 +30,7 @@
delegate_to: localhost
run_once: true # noqa run-once[task]
-- name: "Get list of all folders."
+- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Get list of all folders."
ansible.builtin.debug:
msg: "Criticality of {{ item.id }} is {{ item.extensions.attributes.tag_criticality | default('N/A') }}"
loop: "{{ lookup('checkmk.general.folders',
@@ -47,7 +47,7 @@
loop_control:
label: "{{ item.id }}"
-- name: "Verify number of folders."
+- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Verify number of folders."
ansible.builtin.assert:
# The looked up list contains the main folder, as well.
that: "( 1 + checkmk_var_folders|length ) == folders|length"
@@ -63,3 +63,13 @@
}}"
delegate_to: localhost
run_once: true # noqa run-once[task]
+
+- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Use variables outside the module call."
+ ansible.builtin.assert:
+ # The looked up list contains the main folder, as well.
+ that: "( 1 + checkmk_var_folders|length ) == folders|length"
+ vars:
+ folders: "{{ lookup('checkmk.general.folders', '/', recursive=True) }}"
+ delegate_to: localhost
+ run_once: true # noqa run-once[task]
+ when: outer_item.edition == "stable_cee"
diff --git a/tests/integration/targets/lookup_folders/vars/main.yml b/tests/integration/targets/lookup_folders/vars/main.yml
index b561788cd..f671d76b0 100644
--- a/tests/integration/targets/lookup_folders/vars/main.yml
+++ b/tests/integration/targets/lookup_folders/vars/main.yml
@@ -3,13 +3,13 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
- version: "2.0.0p39"
diff --git a/tests/integration/targets/lookup_host/tasks/test.yml b/tests/integration/targets/lookup_host/tasks/test.yml
index 281d673a0..c5f98fb5f 100644
--- a/tests/integration/targets/lookup_host/tasks/test.yml
+++ b/tests/integration/targets/lookup_host/tasks/test.yml
@@ -44,3 +44,12 @@
}}"
delegate_to: localhost
run_once: true # noqa run-once[task]
+
+- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Use variables outside the module call."
+ ansible.builtin.assert:
+ that: "checkmk_host.alias == extensions.attributes.alias"
+ vars:
+ extensions: "{{ lookup('checkmk.general.host', checkmk_host.name) }}"
+ delegate_to: localhost
+ run_once: true # noqa run-once[task]
+ when: outer_item.edition == "stable_cee"
diff --git a/tests/integration/targets/lookup_host/vars/main.yml b/tests/integration/targets/lookup_host/vars/main.yml
index eec67c94e..50a2ed338 100644
--- a/tests/integration/targets/lookup_host/vars/main.yml
+++ b/tests/integration/targets/lookup_host/vars/main.yml
@@ -3,13 +3,13 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
- version: "2.0.0p39"
diff --git a/tests/integration/targets/lookup_hosts/tasks/test.yml b/tests/integration/targets/lookup_hosts/tasks/test.yml
index 3e04d6b30..8642c7ad3 100644
--- a/tests/integration/targets/lookup_hosts/tasks/test.yml
+++ b/tests/integration/targets/lookup_hosts/tasks/test.yml
@@ -44,3 +44,12 @@
}}"
delegate_to: localhost
run_once: true # noqa run-once[task]
+
+- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Use variables outside the module call."
+ ansible.builtin.assert:
+ that: "checkmk_hosts|length == hosts|length"
+ vars:
+ folders: "{{ lookup('checkmk.general.hosts') }}"
+ delegate_to: localhost
+ run_once: true # noqa run-once[task]
+ when: outer_item.edition == "stable_cee"
diff --git a/tests/integration/targets/lookup_hosts/vars/main.yml b/tests/integration/targets/lookup_hosts/vars/main.yml
index 69f410734..7b75b925e 100644
--- a/tests/integration/targets/lookup_hosts/vars/main.yml
+++ b/tests/integration/targets/lookup_hosts/vars/main.yml
@@ -3,13 +3,13 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
- version: "2.0.0p39"
diff --git a/tests/integration/targets/lookup_rules/tasks/test.yml b/tests/integration/targets/lookup_rules/tasks/test.yml
index 675237540..3baedaff3 100644
--- a/tests/integration/targets/lookup_rules/tasks/test.yml
+++ b/tests/integration/targets/lookup_rules/tasks/test.yml
@@ -68,7 +68,7 @@
vars:
rules: "{{ lookup('checkmk.general.rules',
ruleset=item,
- commebt_regex='Ansible managed',
+ comment_regex='Ansible managed',
server_url=checkmk_var_server_url,
site=outer_item.site,
validate_certs=False,
@@ -94,3 +94,24 @@
delegate_to: localhost
run_once: true # noqa run-once[task]
loop: "{{ cpu_load_ruleset.rules }}"
+
+- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Use variables outside the module call: rule."
+ ansible.builtin.debug:
+ var: "rule"
+ vars:
+ rule: "{{ lookup('checkmk.general.rule', rule_id=item.id) }}"
+ delegate_to: localhost
+ run_once: true # noqa run-once[task]
+ loop: "{{ cpu_load_ruleset.rules }}"
+ when: outer_item.edition == "stable_cee"
+
+- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Use variables outside the module call: rules."
+ ansible.builtin.assert:
+ # Check the number of rules
+ that: rules|length == 1
+ vars:
+ rules: "{{ lookup('checkmk.general.rules', ruleset=item, commebt_regex='Ansible managed') }}"
+ delegate_to: localhost
+ run_once: true # noqa run-once[task]
+ loop: "{{ checkmk_rulesets }}"
+ when: outer_item.edition == "stable_cee"
diff --git a/tests/integration/targets/lookup_rules/vars/main.yml b/tests/integration/targets/lookup_rules/vars/main.yml
index 409be699e..b42d58d5b 100644
--- a/tests/integration/targets/lookup_rules/vars/main.yml
+++ b/tests/integration/targets/lookup_rules/vars/main.yml
@@ -3,13 +3,13 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
diff --git a/tests/integration/targets/lookup_rulesets/tasks/test.yml b/tests/integration/targets/lookup_rulesets/tasks/test.yml
index 8f7482982..4055ea615 100644
--- a/tests/integration/targets/lookup_rulesets/tasks/test.yml
+++ b/tests/integration/targets/lookup_rulesets/tasks/test.yml
@@ -80,3 +80,23 @@
delegate_to: localhost
run_once: true # noqa run-once[task]
loop: "{{ checkmk_ruleset_regexes }}"
+
+- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Use variables outside the module call: ruleset."
+ ansible.builtin.assert:
+ # For each rule that we created, check, if the number of rules in its ruleset is 1.
+ that: "ruleset.number_of_rules == 1"
+ vars:
+ ruleset: "{{ lookup('checkmk.general.ruleset', ruleset=item) }}"
+ delegate_to: localhost
+ run_once: true # noqa run-once[task]
+ loop: "{{ checkmk_ruleset_regexes }}"
+ when: outer_item.edition == "stable_cee"
+
+- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Use variables outside the module call: rulesets."
+ ansible.builtin.debug:
+ var: rulesets
+ vars:
+ rulesets: "{{ lookup('checkmk.general.rulesets', regex='file', rulesets_used=False, rulesets_deprecated=False) }}"
+ delegate_to: localhost
+ run_once: true # noqa run-once[task]
+ when: outer_item.edition == "stable_cee"
diff --git a/tests/integration/targets/lookup_rulesets/vars/main.yml b/tests/integration/targets/lookup_rulesets/vars/main.yml
index 3446899db..d445157d2 100644
--- a/tests/integration/targets/lookup_rulesets/vars/main.yml
+++ b/tests/integration/targets/lookup_rulesets/vars/main.yml
@@ -3,13 +3,13 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
diff --git a/tests/integration/targets/lookup_version/tasks/test.yml b/tests/integration/targets/lookup_version/tasks/test.yml
index e4409f64c..49dfb9ae7 100644
--- a/tests/integration/targets/lookup_version/tasks/test.yml
+++ b/tests/integration/targets/lookup_version/tasks/test.yml
@@ -16,3 +16,12 @@
- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Verify Checkmk version."
ansible.builtin.assert:
that: "outer_item.version in looked_up_version.msg"
+
+- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Use variables outside the module call."
+ ansible.builtin.assert:
+ that: "outer_item.version in looked_up_version.msg"
+ vars:
+ version: "{{ lookup('checkmk.general.version') }}"
+ delegate_to: localhost
+ register: looked_up_version
+ when: outer_item.edition == "stable_cee"
diff --git a/tests/integration/targets/lookup_version/vars/main.yml b/tests/integration/targets/lookup_version/vars/main.yml
index 1a0101feb..513e59a59 100644
--- a/tests/integration/targets/lookup_version/vars/main.yml
+++ b/tests/integration/targets/lookup_version/vars/main.yml
@@ -3,13 +3,13 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
- version: "2.0.0p39"
diff --git a/tests/integration/targets/password/vars/main.yml b/tests/integration/targets/password/vars/main.yml
index 645edfe25..6e5b267d1 100644
--- a/tests/integration/targets/password/vars/main.yml
+++ b/tests/integration/targets/password/vars/main.yml
@@ -6,16 +6,16 @@ test_sites:
- version: "2.3.0b1"
edition: "cme"
site: "beta_cme"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cme"
site: "stable_cme"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
- version: "2.0.0p39"
diff --git a/tests/integration/targets/rule/tasks/test.yml b/tests/integration/targets/rule/tasks/test.yml
index b2f13c23c..f380dd7b0 100644
--- a/tests/integration/targets/rule/tasks/test.yml
+++ b/tests/integration/targets/rule/tasks/test.yml
@@ -45,6 +45,50 @@
delegate_to: localhost
run_once: true # noqa run-once[task]
+- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Modify rules."
+ rule:
+ server_url: "{{ checkmk_var_server_url }}"
+ site: "{{ outer_item.site }}"
+ automation_user: "{{ checkmk_var_automation_user }}"
+ automation_secret: "{{ checkmk_var_automation_secret }}"
+ ruleset: "{{ item.ruleset }}"
+ rule:
+ rule_id: "{{ existing_rule[0].id }}"
+ properties: {
+ "comment": "{{ existing_rule[0].extensions.properties.comment }}",
+ "description": "Modified this intentionally.",
+ "disabled": "{{ existing_rule[0].extensions.properties.disabled }}"
+ }
+ conditions: "{{ existing_rule[0].extensions.conditions }}"
+ value_raw: "{{ existing_rule[0].extensions.value_raw | string }}"
+ state: "present"
+ when: "existing_rule|length>0"
+ vars:
+ existing_rule: "{{ lookup('checkmk.general.rules',
+ ruleset=item.ruleset,
+ comment_regex='Ansible managed',
+ server_url=checkmk_var_server_url,
+ site=outer_item.site,
+ validate_certs=False,
+ automation_user=checkmk_var_automation_user,
+ automation_secret=checkmk_var_automation_secret)
+ }}"
+ delegate_to: localhost
+ run_once: true # noqa run-once[task]
+ loop: "{{ checkmk_var_rules }}"
+
+- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Activate."
+ activation:
+ server_url: "{{ checkmk_var_server_url }}"
+ site: "{{ outer_item.site }}"
+ automation_user: "{{ checkmk_var_automation_user }}"
+ automation_secret: "{{ checkmk_var_automation_secret }}"
+ force_foreign_changes: true
+ sites:
+ - "{{ outer_item.site }}"
+ delegate_to: localhost
+ run_once: true # noqa run-once[task]
+
- name: "{{ outer_item.version }} - {{ outer_item.edition | upper }} - Delete rules."
rule:
server_url: "{{ checkmk_var_server_url }}"
diff --git a/tests/integration/targets/rule/vars/main.yml b/tests/integration/targets/rule/vars/main.yml
index 5b1b25e52..c045815aa 100644
--- a/tests/integration/targets/rule/vars/main.yml
+++ b/tests/integration/targets/rule/vars/main.yml
@@ -3,13 +3,13 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
diff --git a/tests/integration/targets/service_group/vars/main.yml b/tests/integration/targets/service_group/vars/main.yml
index b75722316..29c4efad3 100644
--- a/tests/integration/targets/service_group/vars/main.yml
+++ b/tests/integration/targets/service_group/vars/main.yml
@@ -6,16 +6,16 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cme"
site: "stable_cme"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
- version: "2.0.0p39"
diff --git a/tests/integration/targets/tag_group/vars/main.yml b/tests/integration/targets/tag_group/vars/main.yml
index d18b737ac..9af589286 100644
--- a/tests/integration/targets/tag_group/vars/main.yml
+++ b/tests/integration/targets/tag_group/vars/main.yml
@@ -3,16 +3,16 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cme"
site: "stable_cme"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
- version: "2.0.0p39"
diff --git a/tests/integration/targets/timeperiod/vars/main.yml b/tests/integration/targets/timeperiod/vars/main.yml
index eccc0dc6a..e5ec8f2a1 100644
--- a/tests/integration/targets/timeperiod/vars/main.yml
+++ b/tests/integration/targets/timeperiod/vars/main.yml
@@ -3,13 +3,13 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"
diff --git a/tests/integration/targets/user/vars/main.yml b/tests/integration/targets/user/vars/main.yml
index 98311ba84..c9565e64b 100644
--- a/tests/integration/targets/user/vars/main.yml
+++ b/tests/integration/targets/user/vars/main.yml
@@ -6,16 +6,16 @@ test_sites:
- version: "2.3.0b1"
edition: "cre"
site: "beta_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cme"
site: "stable_cme"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cre"
site: "stable_cre"
- - version: "2.2.0p22"
+ - version: "2.2.0p23"
edition: "cee"
site: "stable_cee"
- - version: "2.1.0p39"
+ - version: "2.1.0p40"
edition: "cre"
site: "old_cre"