mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-08 02:01:31 -07:00
Add debug messasge to aws_ec2 inventory plugin (#43112)
This commit is contained in:
parent
d48415ed57
commit
3c0a3a1de1
1 changed files with 7 additions and 0 deletions
|
@ -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 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.module_utils.ec2 import camel_dict_to_snake_dict
|
||||||
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable, to_safe_group_name
|
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:
|
try:
|
||||||
import boto3
|
import boto3
|
||||||
|
@ -502,6 +508,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||||
if super(InventoryModule, self).verify_file(path):
|
if super(InventoryModule, self).verify_file(path):
|
||||||
if path.endswith('.aws_ec2.yml') or path.endswith('.aws_ec2.yaml'):
|
if path.endswith('.aws_ec2.yml') or path.endswith('.aws_ec2.yaml'):
|
||||||
return True
|
return True
|
||||||
|
display.debug("aws_ec2 inventory filename must end with '*.aws_ec2.yml' or '*.aws_ec2.yaml'")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _get_query_options(self, config_data):
|
def _get_query_options(self, config_data):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue