elnappo / ansible-role-check-mk-agent

Ansible role for check_mk agent
MIT License
24 stars 27 forks source link

Check_MK exception: Missing required key(s): folder, hostname #15

Closed divansantana closed 5 years ago

divansantana commented 5 years ago

Hi,

I think since updating to 1.6.0 adding a host to check_mk instance via WATO API breaks like so:

fatal: [int1-k8s-01 -> localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "activate_changes": null,
            "attributes": {},
            "discover_services": null,
            "folder": "int",
            "hostname": "int1-k8s-01",
            "secret": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "server_url": "https://cmk.example.com/nonprod/",
            "state": "present",
            "username": "automation",
            "validate_certs": true
        }
    },
    "msg": "Check_MK exception: Missing required key(s): folder, hostname"
FleischKarussel commented 5 years ago

I can confirm this issue.

Brazier85 commented 5 years ago

Same problem here

elnappo commented 5 years ago

The Content-Type HTTP header was missing from the request. Added it in https://github.com/elnappo/ansible-role-check-mk-agent/commit/ed14a1299e721fd7e6f3526e9796268ff8e829b6.

Is it this also working for you? @divansantana @FleischKarussel @Ferdy2003

Brazier85 commented 4 years ago

@elnappo now it is working fine for me. Thanks for the update