mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
This commit is contained in:
parent
cbb6a7f4e8
commit
1cf07028d4
1 changed files with 3 additions and 1 deletions
|
@ -544,8 +544,10 @@ class InventoryManager(object):
|
|||
if implicit:
|
||||
results.append(implicit)
|
||||
|
||||
if not results and pattern != 'all':
|
||||
# Display warning if specified host pattern did not match any groups or hosts
|
||||
if not results and not matching_groups and pattern != 'all':
|
||||
display.warning("Could not match supplied host pattern, ignoring: %s" % pattern)
|
||||
|
||||
return results
|
||||
|
||||
def list_hosts(self, pattern="all"):
|
||||
|
|
Loading…
Reference in a new issue