Before I just code something up and submit it I wanted to float this one by the list to see if anyone had a different idea or opposed it entirely.
I hit a situation today where I needed to conditional run a task based on a pattern as opposed to an absolute value.
Ansible supports conditionals but it uses a simple eval statement so I can't (to my knowledge) import re and then do a match. That's understandable and probably a good idea. That still doesn't help me with my problem though.
I'm thinking a specialized task conditional, like only_if_match, would be best where its value would be used to perform a re.search() and return a boolean result. I don't like the idea of adding another key, but determining if a string is something to eval or a regex to compile and match would be worse IMO.
Thoughts?
<tim/>