Additions to AWS Module Guidlines from Pull Request Feedback (#36834)

* Update doc of AnsibleAWSModule to remove incorrect connect example.

Current example uses aws_connect method which no longer exists. Replace
this with the client and resource methods that do exist.

Also remove try/except block in connect example as guidelines imply that
there aren't connection errors thrown on connection, just when later
sing the connection.

* Update AWS module guidelines to include the AnsibleAWSModule connection methods.

* Add information on integration testing to the AWS module guidelines.

* Add information on common documentation fragments to AWS module
Guidelines.

* Changes as requested on PR.

* Restructure connection section to start with current best practice
* Explain the use of the CI build groups
* Use YAML Anchors for aws credentials example

* Replace guidance on use of test groups with link to aliases file.

This achieves the goal of explaining why this file is necessary without
introducing overhead of keeping documentation up to date when test
groups change.
This commit is contained in:
Ed Costello 2018-03-02 14:40:01 +13:00 committed by Will Thames
commit 07bc98f019
2 changed files with 122 additions and 16 deletions

View file

@ -38,10 +38,11 @@ The 'AnsibleAWSModule' module provides similar, but more restricted,
interfaces to the normal Ansible module. It also includes the
additional methods for connecting to AWS using the standard module arguments
try:
m.aws_connect(resource='lambda') # - get an AWS connection.
except Exception:
m.fail_json_aws(Exception, msg="trying to connect") # - take an exception and make a decent failure
m.resource('lambda') # - get an AWS connection as a boto3 resource.
or
m.client('sts') # - get an AWS connection as a boto3 client.
"""