Add k8s module_defaults group and document (#51093)

It makes sense to use module_defaults with k8s modules, and thus
have a k8s module_defaults group.
This commit is contained in:
Will Thames 2019-01-30 06:23:27 +10:00 committed by Alicia Cozine
commit 23b5599244
3 changed files with 27 additions and 3 deletions

View file

@ -78,13 +78,26 @@ Setting a default AWS region for specific EC2-related modules::
.. _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.
it easier to author playbooks making heavy use of API-based modules such as cloud modules.
+-------+---------------------------+-----------------+
| Group | Purpose | Ansible Version |
+=======+===========================+=================+
| aws | Amazon Web Services | 2.7 |
+-------+---------------------------+-----------------+
| azure | Azure | 2.7 |
+-------+---------------------------+-----------------+
| gcp | Google Cloud Platform | 2.7 |
+-------+---------------------------+-----------------+
| k8s | Kubernetes | 2.8 |
+-------+---------------------------+-----------------+
Use the groups with `module_defaults` by prefixing the group name with `group/` - e.g. `group/aws`
In a playbook, you can set module defaults for whole groups of modules, such as setting a common AWS region.