mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Add debug messasge to aws_ec2 inventory plugin (#43112)
This commit is contained in:
@@ -130,6 +130,12 @@ from ansible.module_utils.six import string_types
|
||||
from ansible.module_utils.ec2 import ansible_dict_to_boto3_filter_list, boto3_tag_list_to_ansible_dict
|
||||
from ansible.module_utils.ec2 import camel_dict_to_snake_dict
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable, to_safe_group_name
|
||||
try:
|
||||
from __main__ import display
|
||||
except ImportError:
|
||||
from ansible.utils.display import Display
|
||||
display = Display()
|
||||
|
||||
|
||||
try:
|
||||
import boto3
|
||||
@@ -502,6 +508,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||
if super(InventoryModule, self).verify_file(path):
|
||||
if path.endswith('.aws_ec2.yml') or path.endswith('.aws_ec2.yaml'):
|
||||
return True
|
||||
display.debug("aws_ec2 inventory filename must end with '*.aws_ec2.yml' or '*.aws_ec2.yaml'")
|
||||
return False
|
||||
|
||||
def _get_query_options(self, config_data):
|
||||
|
||||
Reference in New Issue
Block a user