Commit 2bbad5da by Michael DeHaan

Merge pull request #3275 from madduck/implicit-negations

Enable negated patterns
parents 15bf8a83 fd02443d
......@@ -136,6 +136,11 @@ class Inventory(object):
finds hosts that match a list of patterns. Handles negative
matches as well as intersection matches.
"""
try:
if patterns[0].startswith("!"):
patterns.insert(0, "all")
except IndexError:
pass
hosts = set()
for p in patterns:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment