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]: In module user: task to find user apparently tries to create the user #109

Closed
nikolisg7 opened this issue Aug 16, 2024 · 1 comment · Fixed by #113
Closed

[BUG]: In module user: task to find user apparently tries to create the user #109

nikolisg7 opened this issue Aug 16, 2024 · 1 comment · Fixed by #113
Labels
needs-triage Issue requires triage. type/bug Something isn't working

Comments

@nikolisg7
Copy link

nikolisg7 commented Aug 16, 2024

Describe the bug
I am using a task identical to the example task from the user module to assess if a ADS user exists:

- name: Get User Details using user name
  dellemc.powerscale.user:
    onefs_host: "{{onefs_host}}"
    port_no: "{{port_no}}"
    api_user: "{{api_user}}"
    api_password: "{{api_password}}"
    verify_ssl: "{{verify_ssl}}"
    access_zone: "{{access_zone}}"
    provider_type: ads
    user_name: gavagai
    state: "present"

Upon execution I am receiving the following error:

FAILED! => {"changed": false, "msg": "Unable to create a user, 'password' is missing"}

To Reproduce
Steps to reproduce the behavior:

  1. Create the task as above
  2. Run the task on a cluster with configured ads
    Step n See error

Expected behavior
If user exists in zone: JSON response with user details, the ones returned from GET /platform/auth/users/USER
If user does not exist in zone: error response similar to the API:

{
"errors" : 
[

{
"code" : "AEC_NOT_FOUND",
"message" : "Failed to find user for 'USER:gavagai': No such user"
}
]
}

Screenshots
If applicable, add screenshots to help explain your problem.

Logs
If applicable, submit logs or stack traces from the affected services

System Information (please complete the following information):

  • OS/Version: OneFS 9.7.1.0
  • Ansible Version 2.16.5
  • Python Version [e.g. 3.10.11]
  • Powerscale Ansible Version: 3.2.0

Additional context
I wouldn't mind to use direct API queries to get user information, if the user module doesn't support it. Perhaps then the documentation/examples in the user module should be updated

@nikolisg7 nikolisg7 added needs-triage Issue requires triage. type/bug Something isn't working labels Aug 16, 2024
@sachin-apa sachin-apa linked a pull request Sep 11, 2024 that will close this issue
11 tasks
@sachin-apa
Copy link
Collaborator

@nikolisg7 Ansible recommends to use info module to fetch the info and use configuration modules to configure.
We have fixed the info module to return the paginated data, Please use Info module to fetch the user details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Issue requires triage. type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants