Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Using host_group Module to create multiple Groups for Customer Global doenst work #685

Closed
checker788 opened this issue Oct 23, 2024 · 3 comments · Fixed by #686
Closed
Assignees
Labels
bug Something isn't working module:host_group This affects the host_group module module:host This affects the host module release:5.3.1 Affects the mentioned release.

Comments

@checker788
Copy link

Describe the bug
When Using the host_group Module to create multiple Groups at once the customer cannot be set to "global"

Component Name

Component Name: host_group

Ansible Version

$ ansible --version
ansible [core 2.16.11]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/noah/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /var/ansible/repository/ansible_collections
  executable location = /usr/bin/ansible
  python version = 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True

Checkmk Version and Edition

2.3.0p10 CME

Collection Version

$ ansible-galaxy collection list

To Reproduce
Steps to reproduce the behavior:
Create Task with Host_group Module

Expected behavior

Create Host Groups in for Global Customer

Actual behavior

Creates Host Groups for Provider Customer

Minimum reproduction example

---
- name: Create Host Groups
   hosts: all
   tasks:
   - name: "Create several host groups."
      checkmk.general.host_group:
       server_url: "http://myserver/"
           site: "mysite"
           automation_user: "myuser"
           automation_secret: "mysecret"
           customer: "global"
           groups:
           - name: "my_host_group_one"
              title: "My Host Group One"
           - name: "my_host_group_two"
              title: "My Host Group Two"
        state: "present"
@checker788 checker788 added the bug Something isn't working label Oct 23, 2024
@github-actions github-actions bot added module:host This affects the host module module:host_group This affects the host_group module labels Oct 23, 2024
@msekania
Copy link
Contributor

@checker788, yes indeed there is a bug in module for the multiple host_groups scenario.

I'll make PR with bug fixes

@robin-checkmk robin-checkmk linked a pull request Oct 23, 2024 that will close this issue
7 tasks
@robin-checkmk
Copy link
Member

I did not even have the time to reproduce the issue and @msekania here already build the fix. Impressive reaction time, buddy! 💪 I'll see to it, that the PR is reviewed and merged, and a bug fix release will be made. Thanks for reporting @checker788! 🙏

robin-checkmk added a commit that referenced this issue Oct 23, 2024
@robin-checkmk robin-checkmk mentioned this issue Oct 23, 2024
7 tasks
@robin-checkmk robin-checkmk added the release:5.3.1 Affects the mentioned release. label Oct 23, 2024
@robin-checkmk
Copy link
Member

Fix released with 5.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module:host_group This affects the host_group module module:host This affects the host module release:5.3.1 Affects the mentioned release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants