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

Add debug messasge to aws_ec2 inventory plugin (#43112)

This commit is contained in:
Mo Balaa 2018-07-23 09:55:28 -07:00 committed by Sloane Hertel
parent d48415ed57
commit 3c0a3a1de1

View file

@ -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):