From cb90df237771edefa7373807b103103563524ba1 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sat, 25 Feb 2012 17:22:48 -0500 Subject: [PATCH] Allow multiple patterns to specified, just like Func did. --- lib/ansible/runner.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ansible/runner.py b/lib/ansible/runner.py index b80f97a22dc..414a8c66001 100755 --- a/lib/ansible/runner.py +++ b/lib/ansible/runner.py @@ -83,8 +83,10 @@ class Runner(object): return False if not pattern: pattern = self.pattern - if fnmatch.fnmatch(host_name, pattern): - return True + subpatterns = pattern.split(";") + for subpattern in subpatterns: + if fnmatch.fnmatch(host_name, subpattern): + return True return False def _connect(self, host):