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

[FEATURE]: Provide possibility to check existence and settings of a directory/filesystem w/o modifying it #78

Open
fthommen opened this issue Jun 7, 2024 · 5 comments
Labels
needs-triage Issue requires triage. type/feature-request This is the default label associated with a feature request issue.

Comments

@fthommen
Copy link

fthommen commented Jun 7, 2024

Describe the solution you'd like
I would like to see the possibility to check, if a specific path already exists (and what are its settings), before I risk overwriting it with new settings. The current filesystem module requires me to set state to either present (which creates the directory) or absent (which removes it if possible). Also a mandatory owner.name has to be provided, which changes the owner of the directory. This is unwanted when just checking on a directory state

Describe alternatives you've considered
Commandline and API. Both alternatives are not an option, as they would require to break the ansible-only workflow

Additional context
none

@fthommen fthommen added needs-triage Issue requires triage. type/feature-request This is the default label associated with a feature request issue. labels Jun 7, 2024
@fthommen
Copy link
Author

fthommen commented Jun 7, 2024

Extension: Basically this request extends to all modules (nfs, smartquota ecc.), which should have the possibility for checking w/o modifying.

@anupamaloke
Copy link
Collaborator

@fthommen, thank you for submitting the feature request. I have added it to the backlog and will prioritize it over the upcoming future releases.

@fthommen
Copy link
Author

fthommen commented Jun 9, 2024

Thank you @anupamaloke. I'd rather see this as a design flaw than a feature request. Or what would be the recommendation of how to check the existence of a directory/share/quota?

@anupamaloke
Copy link
Collaborator

@fthommen, I agree.
Ideally, one should be able to use the info module to get details of the all the OneFS resources. However, it does not seem to be case. For one, it does not support all the resources (like quota for e.g.) and even for the resources that it supports, it does not always list the details but unique IDs. So, the interim solution will be to use the dellemc.powerscale.info module to get the ID details of that resource and then use that with the respective resource module to view the complete details. That still leaves resources that are not supported with Info module yet. For those modules, the interim solution would be make direct REST API calls using ansible.builtin.uri module.

Easiest way to get this supported would be to make the state argument optional. So, if the state is not provided, then the module acts as an info module by returning all the details. I have added this enhancement to the backlog.

@fthommen
Copy link
Author

Thanks for the hint @anupamaloke For the time being I will now check the directory existence directly via API using curl

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/feature-request This is the default label associated with a feature request issue.
Projects
None yet
Development

No branches or pull requests

2 participants