From c08f1ab8d8fe3a5305a6cdbbeea4dee4c144b058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Tue, 30 Aug 2022 14:44:55 -0400 Subject: [PATCH] inventory/aws_rds: fix a recent regression Put back the `self._read_config_data(path)` call that was removed during 478022695b333043857a6929b350a2a3c07ae567. Without this call we end up with an empty `aws_rds` in the output if the inventory file is empty. To reproduce: ``` cd tests/integration/targets/inventory_aws_rds ANSIBLE_INVENTORY_ENABLED=amazon.aws.aws_rds ANSIBLE_INVENTORY=test.aws_rds.yml ansible-playbook playbooks/test_invalid_aws_rds_inventory_config.yml -vvvv ``` ``` ok: [127.0.0.1] => { "groups": { "all": [], "aws_rds": [], <--- the unexpected key "ungrouped": [] } ``` --- plugins/inventory/aws_rds.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/inventory/aws_rds.py b/plugins/inventory/aws_rds.py index 2c19dfa0ff0..7c2afebd88b 100644 --- a/plugins/inventory/aws_rds.py +++ b/plugins/inventory/aws_rds.py @@ -359,6 +359,7 @@ def parse(self, inventory, loader, path, cache=True): if not HAS_BOTO3: raise AnsibleError('The RDS dynamic inventory plugin requires boto3 and botocore.') + self._read_config_data(path) self._set_credentials() # get user specifications