From 57a5e3e2993c0312803b0791c21df68dbb7e8910 Mon Sep 17 00:00:00 2001 From: Will Thames Date: Sat, 19 Jan 2019 03:13:28 +1000 Subject: [PATCH] Merge module defaults groups docs into one page (#51045) The information on module defaults groups would be better alongside the rest of the module defaults docs Remove the orphaned old doc --- .../rst/user_guide/module_defaults_config.rst | 27 ----------------- .../user_guide/playbooks_module_defaults.rst | 29 +++++++++++++++++++ 2 files changed, 29 insertions(+), 27 deletions(-) delete mode 100644 docs/docsite/rst/user_guide/module_defaults_config.rst diff --git a/docs/docsite/rst/user_guide/module_defaults_config.rst b/docs/docsite/rst/user_guide/module_defaults_config.rst deleted file mode 100644 index 2db81f0991..0000000000 --- a/docs/docsite/rst/user_guide/module_defaults_config.rst +++ /dev/null @@ -1,27 +0,0 @@ -: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*' diff --git a/docs/docsite/rst/user_guide/playbooks_module_defaults.rst b/docs/docsite/rst/user_guide/playbooks_module_defaults.rst index 3ffb985337..0c90c911d7 100644 --- a/docs/docsite/rst/user_guide/playbooks_module_defaults.rst +++ b/docs/docsite/rst/user_guide/playbooks_module_defaults.rst @@ -1,3 +1,5 @@ +.. _module_defaults: + Module defaults =============== @@ -72,3 +74,30 @@ Setting a default AWS region for specific EC2-related modules:: region: '{{ my_region }}' ec2_vpc_net_facts: region: '{{ my_region }}' + +.. _module_defaults_groups: + +Module defaults groups +`````````````````````` + +.. versionadded:: 2.7 + +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*'