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

wrong type of authenticator_uid in the documentation and not supported by ansible.platform.user 2.5.3 (latest version) #1010

Open
ivarmu opened this issue Dec 13, 2024 · 1 comment

Comments

@ivarmu
Copy link
Contributor

ivarmu commented Dec 13, 2024

The parameter authenticator_uid defined below is told to be a boolean, but this should be a String:

| `authenticator_uid` | N/A | no | bool | UID coming from the authenticators the user is associated with |

The extracted information from the API is like follows:

---
aap_user_accounts:
  - username: "admin"
    password: "INITIAL"
    email: "[email protected]"
    first_name: ""
    last_name: ""
    is_superuser: "True"
    authenticators: [1]
    authenticator_uid: "admin"

The parameter authenticator_uid seems to not be supported by the ansible.platform collection (version 2.5.3), causing the following error:

"msg": "Unsupported parameters for (ansible.platform.user) module: authenticator_uid. Supported parameters include: authenticator_users, authenticators, email, first_name, gateway_hostname, gateway_password, gateway_request_timeout, gateway_token, gateway_username, gateway_validate_certs, is_superuser, last_name, organizations, password, state, update_secrets, username (request_timeout, superuser, validate_certs).",
@ivarmu
Copy link
Contributor Author

ivarmu commented Dec 13, 2024

Adding more information about the authenticator_uid field... this is required when the authenticators are assigned. Could that requirement be checked in this collection or maybe better in ansible.platform directly?

The full traceback is:
  File "/tmp/ansible_ansible.platform.user_payload_hgkqex5j/ansible_ansible.platform.user_payload.zip/ansible_collections/ansible/platform/plugins/module_utils/aap_module.py", line 264, in make_request
    response_body = response.read()
                    ^^^^^^^^^^^^^
failed: [localhost] (item=Create/Update Gateway user admin | Wait for finish the Gateway user creation) => {
    "__gateway_user_accounts_job_async_results_item": {
        "__gateway_user_accounts_item": {
            "authenticators": [
                1
            ],
            "email": "[email protected]",
            "is_superuser": "True",
            "password": "INITIAL",
            "username": "admin"
        },
        "ansible_job_id": "j128331217050.1420083",
        "ansible_loop_var": "__gateway_user_accounts_item",
        "changed": false,
        "failed": 0,
        "finished": 0,
        "results_file": "/home/ivan/.ansible_async/j128331217050.1420083",
        "started": 1
    },
    "ansible_job_id": "j128331217050.1420083",
    "ansible_loop_var": "__gateway_user_accounts_job_async_results_item",
    "attempts": 1,
    "changed": false,
    "finished": 1,
    "invocation": {
        "module_args": {
            "authenticator_users": null,
            "authenticators": [
                1
            ],
            "email": "********@example.com",
            "first_name": null,
            "gateway_hostname": "aap25-gateway.iam.lab",
            "gateway_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "gateway_request_timeout": null,
            "gateway_token": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "gateway_username": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "gateway_validate_certs": false,
            "is_superuser": true,
            "last_name": null,
            "organizations": null,
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "state": "present",
            "username": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"
        }
    },
    "msg": "c{'authenticator_uid': ['Authenticator UID cannot be empty when setting authenticators.']}",
    "results_file": "/home/ivan/.ansible_async/j128331217050.1420083",
    "started": 1,
    "stderr": "",
    "stderr_lines": [],
    "stdout": "",
    "stdout_lines": []
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant