I am trying to check via Ansible that whether the user (being used to connect) has write access to a given path - both on linux hosts and windows hosts.
I tried looking around but i could not get an easy way to do that. I might be getting wrong paths a lot, so the typical commands with raw module is not a good idea. So what i thought of is to create try and create a file in the path, possibly with the name as current epoch and later remove it.
Anybody have a better idea on how to do this for windows and linux machines ?