Updating to 2.0 throws a new error (certainly not an unreasonable error) in a play I’ve used for a while:
found a duplicate dict key
I know I’m likely abusing behavior, but I’m hoping someone might offer an alternate approach
At a high level, I’m looking to
- take output from a command
- run regex tests against it against a set of dictionary keys
- on match, execute a command with a dict value
But some of the dict keys duplicate others
More specifically, I’m running SuSE and want to restart services on a zypper update when they show up as being “stale” (zypper -ps)
The major issue here, service names vary from version to version, and do not match precisely with the status output (zypper -ps)
I could possibly reverse the key value pairings, but there’s still likely to be duplication.
I’d not be surprised if this wasn’t working correctly before 2.0, but just silently discarding the duplication.
Thanks