Open fthommen opened 3 weeks ago
Extension: Basically this request extends to all modules (nfs
, smartquota
ecc.), which should have the possibility for checking w/o modifying.
@fthommen, thank you for submitting the feature request. I have added it to the backlog and will prioritize it over the upcoming future releases.
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?
@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.
Thanks for the hint @anupamaloke For the time being I will now check the directory existence directly via API using curl
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 setstate
to eitherpresent
(which creates the directory) orabsent
(which removes it if possible). Also a mandatoryowner.name
has to be provided, which changes the owner of the directory. This is unwanted when just checking on a directory stateDescribe 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