Extend module_defaults by adding default groups for cloud modules (#44127)

Extends `module_defaults` by adding a prefix to defaults `group/` which denotes a builtin list of modules. Initial groups are: `group/aws`, `group/azure`, and `group/gcp`
This commit is contained in:
Ryan Brown 2018-08-22 21:33:27 -04:00 committed by GitHub
parent fdcb883ac0
commit 4c8808ec9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 675 additions and 13 deletions

View file

@ -87,3 +87,28 @@
- assert:
that:
foo.msg == "Hello world!"
- name: Module group defaults block
module_defaults:
group/aws:
region: us-east-1
aws_secret_key: foobar
block:
- aws_s3_bucket_facts:
ignore_errors: true
register: s3
- assert:
that:
- "'Partial credentials' in s3.msg or 'boto3 required' in s3.msg"
- name: Module group defaults block
module_defaults:
group/aws:
region: us-east-1
aws_secret_key: foobar
aws_access_key: foobar
block:
- aws_s3_bucket_facts:
ignore_errors: true
register: s3
- assert:
that:
- "'InvalidAccessKeyId' in s3.msg or 'boto3 required' in s3.msg"