I'm trying to get the latest snapshot for a volume using ansible or cli. I already have a powershell script that will do just that but trying to move our scripts over to ansible. I was using the na_ontap_info with snapshot_info but trying to run through all snapshots, putting them in a list with creation date and picking the newest, is very slow. Just trying to find another way to pull that snapshot information.
I found the below link that describes finding the most recent snapshots. I see it uses na_ontap_info too but the application may be different than your approach to the problem. Please take a look and let me know what you think.