-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor inventory plugin connection handling (#1271)
Refactor inventory plugin connection handling SUMMARY Further refactors inventory plugin connection handling: Expands AWSPluginBase client() and resource() to allow overriding parameters renames _boto3_conn to all_clients to better describe what it's doing (_boto3_conn is used elswhere for singluar clients) assumes the IAM role once updates plugin parameters to match other plugins/modules updates RDS description wrapper to avoid reordering arguments avoids maintaining a full inventory scoped rewrite of client/resource code avoids maintaining a full inventory scoped handling of boto3/botocore version handling ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/inventory/aws_ec2.py plugins/inventory/aws_rds.py plugins/plugin_utils/base.py plugins/plugin_utils/inventory.py ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis <None> Reviewed-by: Mark Chappell <None>
- Loading branch information
Showing
12 changed files
with
374 additions
and
378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
minor_changes: | ||
- amazon.aws inventory plugins - additional refactorization of inventory plugin connection handling (https://github.com/ansible-collections/amazon.aws/pull/1271). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright: (c) 2022, Ansible, Inc | ||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
|
||
|
||
class ModuleDocFragment: | ||
# Note: If you're updating MODULES, PLUGINS probably needs updating too. | ||
|
||
# Formatted for Modules | ||
# - modules don't support 'env' | ||
MODULES = r""" | ||
options: {} | ||
""" | ||
|
||
# Formatted for non-module plugins | ||
# - modules don't support 'env' | ||
PLUGINS = r""" | ||
options: | ||
assume_role_arn: | ||
description: | ||
- The ARN of the IAM role to assume to perform the lookup. | ||
- You should still provide AWS credentials with enough privilege to perform the AssumeRole action. | ||
aliases: ["iam_role_arn"] | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.