Pure-Storage-Ansible / FlashArray-Collection

Ansible Collection for Pure Storage FlashArray
GNU General Public License v3.0
19 stars 24 forks source link

Snapshot Suffix In Module Return Value #661

Closed calebdonald closed 1 month ago

calebdonald commented 1 month ago

Is your feature request related to a problem? Please describe. Is it possible to see the snapshot suffix from the module return values of the "purefa_pgsnap" module? I'm trying to register the output of the "purefa_pgsnap" module so I can pull the snapshot suffix of the protection group snapshot being taken, but from what I can tell this isn't possible.

Describe the solution you'd like My current requirement is to return the snapshot suffix when taking a protection group snapshot. I'd like to be able to register the output of the "purefa_pgsnap" module, then pull the snapshot suffix directly from there.

The only way I've been able to accomplish this so far is using the "purefa_info" module immediately after snapshot is taken to gather pgroups data, then run additional tasks to sort by the most recent snapshot. This method works, however there is a slight chance the the most recent snapshot found will be one automatically created from a protection group snapshot schedule, which is not desirable. The simplest solution would be to include the snapshot suffix as a return value when the module runs.

Thank you for your help!

sdodsley commented 1 month ago

Do you just want the suffix or the full name of the snapshot created?

sdodsley commented 1 month ago

@calebdonald Done - check out #662. This will return the response suffix just like the purefa_snap module does.

calebdonald commented 1 month ago

@sdodsley Great! That's exactly what I need. Unfortunately, I won't be able to test in my current working environment until it's integrated into a new collection. Thank you for your quick response!