mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
This commit is contained in:
@@ -544,8 +544,10 @@ class InventoryManager(object):
|
|||||||
if implicit:
|
if implicit:
|
||||||
results.append(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)
|
display.warning("Could not match supplied host pattern, ignoring: %s" % pattern)
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
|
||||||
def list_hosts(self, pattern="all"):
|
def list_hosts(self, pattern="all"):
|
||||||
|
|||||||
Reference in New Issue
Block a user