Ansible playbook - ned help

Hello mates,

I have an issue with below corsern. I would be thankful if anyone of help me over here.

I have a list as below which I stored in one variable, example

svm1_v1
svm1_v2
svm1_v3
svm1_v5
svm1_v4

When I run playbook, I need play has to verify from the stored variable and then create volume name called “svm1_v6” which is next sequence name.

Can anyone help me with this?

Thanks in advance.

Typo corrected.