I'm suggesting we'll create a module to interrogate all package versions, not just ones that you've setup in the role, so I don't think this precludes the other.
I'd probably also suggest (if you have cycles) attempting version_compare as a filter plugin. It seems to fit in most logically and lookup plugins are a little awkard with multiple parameters, and it's not really querying another datasource anyway.
I'm not sure if I understand the question about the 0's and 1's, but I'm imagining this:
- debug: msg="packages match"
when: current|version_compare(future) == 0
- debug: msg="there's no upgrade coming"
when: current|version_compare(future) != 1
I would highly suggest against trying to compare package versions with regexes, both are tricksey.
And yes, fact caching is going into 1.5. This doesn't really require that, we could totally make a package_inventory type module now, but I was trying to limit myself with the numbers of open design discussions open at one time and I'm a bit unready to specify what form these should take just yet for similar reasons.
That being said, nothing preventing you from executing yum/apt/other as needed (or having your own module) and nothing preventing a version_compare being implemented now either.