Ansible Collection 401 issues

CMK version:

2.3.0p17

OS version:

Ubuntu 24.04

Error message:

AH01614: client used wrong authentication scheme when using ansible collection

When trying to use the MK Ansible collection i always end up in a 401 unauthorized. Calling the same url from my browser works fine, no auth issues. Using the automation user secrets works fine manually. Using curl also works fine.

When using the Ansible collection it always ends up with a 401. This is a fresh installation i am currently working on.

fatal: [xxx]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "add_nodes": null,
            "attributes": {
                "alias": "My Host",
                "ipaddress": "127.0.0.1"
            },
            "automation_secret": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "automation_user": "automation",
            "extended_functionality": true,
            "folder": "/",
            "name": "my_host",
            "nodes": null,
            "remove_attributes": null,
            "remove_nodes": null,
            "server_url": "http://xxx/xxx",
            "site": "mgmmsmcimuc40",
            "state": "present",
            "update_attributes": null,
            "validate_certs": true
        }
    },
    "msg": "401 - The user is not authorized to do this request Details: b'<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\\n<html><head>\\n<title>401 Unauthorized</title>\\n</head><body>\\n<h1>Unauthorized</h1>\\n<p>This server could not verify that you\\nare authorized to access the document\\nrequested.  Either you supplied the wrong\\ncredentials (e.g., bad password), or your\\nbrowser doesn\\'t understand how to supply\\nthe credentials required.</p>\\n</body></html>\\n'"
}

OMD apache says:

“AH01614: client used wrong authentication scheme:”

Any ideas? :slight_smile:

Please take a look at our GitHub issue template and provide the requested information. Either here or directly as a dedicated issue. :slight_smile:

For reference: [BUG] 401 unauthorized using ansible collection · Issue #684 · Checkmk/ansible-collection-checkmk.general · GitHub

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.