ceb474bb9e
Batch of docs backports: * docs: Clarify include_task v import_tasks with conditionals (#43856) (cherry picked from commit6be42a2a0e
) * Add single quotes around package name (#45152) (cherry picked from commit0d81386144
) * prefer ansible_facts namespace and dict notation (#44980) (cherry picked from commit44510448b0
) * fix cherrypick conflict - scenario_guides * Update implicit_localhost.rst (#45455) (cherry picked from commitf68cd1acc6
) * updated fbsd install instructions (#45309) (cherry picked from commite9c2695ce7
) * Change "Defaulting Undefined Variables" (#41379) (cherry picked from commite35c4be1c1
) * adds license details to dev guide pages (#45574) (cherry picked from commit6e68d77f6d
) * FAQ: fix a typo, add link to 'vars' lookup (#42412) (cherry picked from commit95649dc793
) * Fix link and toctree (#45595) (cherry picked from commit6999bf318f
) * Improve the local toctree (and title) (#45590) (cherry picked from commitafea00fa9f
) * Add undocumented configuration parameter and explain in porting guide (#36059) (cherry picked from commita892a6ef03
) * Simplify PPA installation for Ubuntu (#45690) (cherry picked from commit78e9f452a5
) * adding git+ssh uri scheme (#36025) (cherry picked from commit84a4257774
) * Add workaround for non-standard kerberos environments (#41465) (cherry picked from commit4e532e0ad9
) * Restore license agreement (#45809) (cherry picked from commitf430f60541
) * partial cherry-pick - lenovo doc update PR 45483
27 lines
845 B
ReStructuredText
27 lines
845 B
ReStructuredText
:orphan:
|
|
|
|
.. _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*'
|