mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-28 13:21:25 -07:00
add more consistent extension matching for inventory plugins (#46786)
* Add consistent extension matching for inventory plugins that support YAML configuration files * Document extension matching expectations
This commit is contained in:
parent
e3882ad6f6
commit
f3d5ebb355
9 changed files with 21 additions and 22 deletions
|
@ -10,7 +10,7 @@ DOCUMENTATION = '''
|
|||
short_description: rds instance source
|
||||
description:
|
||||
- Get instances and clusters from Amazon Web Services RDS.
|
||||
- Uses a <name>.aws_rds.yaml (or <name>.aws_rds.yml) YAML configuration file.
|
||||
- Uses a YAML configuration file that ends with aws_rds.(yml|yaml).
|
||||
options:
|
||||
boto_profile:
|
||||
description: The boto profile to use. The plugin will look for an instance role if no credentials
|
||||
|
@ -301,7 +301,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
|||
:return the contents of the config file
|
||||
'''
|
||||
if super(InventoryModule, self).verify_file(path):
|
||||
if path.endswith('.aws_rds.yml') or path.endswith('.aws_rds.yaml'):
|
||||
if path.endswith(('aws_rds.yml', 'aws_rds.yaml')):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue