1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Allow multiple patterns to specified, just like Func did.

This commit is contained in:
Michael DeHaan 2012-02-25 17:22:48 -05:00
parent 70ec508ee0
commit cb90df2377

View file

@ -83,8 +83,10 @@ class Runner(object):
return False return False
if not pattern: if not pattern:
pattern = self.pattern pattern = self.pattern
if fnmatch.fnmatch(host_name, pattern): subpatterns = pattern.split(";")
return True for subpattern in subpatterns:
if fnmatch.fnmatch(host_name, subpattern):
return True
return False return False
def _connect(self, host): def _connect(self, host):