forked from ansible/ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend
module_defaults
by adding default groups for cloud modules (a…
…nsible#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`
- Loading branch information
Showing
7 changed files
with
675 additions
and
13 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 @@ | ||
major_changes: | ||
- Extends `module_defaults` by adding a prefix to defaults `group/` which denotes a builtin or user-specified list of modules, such as `group/aws` or `group/gcp` |
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 @@ | ||
.. _module_defaults_config: | ||
|
||
Module Defaults Configuration | ||
============================= | ||
|
||
Ansible 2.7 adds a preview-status feature to group together modules that share common sets of parameters. This makes | ||
it easier to author playbooks making heavy use of API-based modules such as cloud modules. By default Ansible ships | ||
with groups for AWS and GCP modules that share parameters. | ||
|
||
In a playbook, you can set module defaults for whole groups of modules, such as setting a common AWS region. | ||
|
||
.. code-block:: YAML | ||
# example_play.yml | ||
- hosts: localhost | ||
module_defaults: | ||
group/aws: | ||
region: us-west-2 | ||
tasks: | ||
- aws_s3_bucket_facts: | ||
# now the region is shared between both facts modules | ||
- ec2_ami_facts: | ||
filters: | ||
name: 'RHEL*7.5*' |
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.