From 81eec4a05a4b91b4bd30de73369413931b1f63e4 Mon Sep 17 00:00:00 2001 From: Tamas Szabo Date: Mon, 11 Oct 2021 15:14:56 +0300 Subject: [PATCH] Docs: code-block wrapping for playbooks_module_defaults.rst #75936 (#75942) --- .../user_guide/playbooks_module_defaults.rst | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/docs/docsite/rst/user_guide/playbooks_module_defaults.rst b/docs/docsite/rst/user_guide/playbooks_module_defaults.rst index 83d7bb8ddc4..3a4bdfc31f8 100644 --- a/docs/docsite/rst/user_guide/playbooks_module_defaults.rst +++ b/docs/docsite/rst/user_guide/playbooks_module_defaults.rst @@ -5,7 +5,9 @@ Module defaults If you frequently call the same module with the same arguments, it can be useful to define default arguments for that particular module using the ``module_defaults`` keyword. -Here is a basic example:: +Here is a basic example: + +.. code-block:: YAML - hosts: localhost module_defaults: @@ -29,7 +31,9 @@ Here is a basic example:: state: touch path: /tmp/file3 -The ``module_defaults`` keyword can be used at the play, block, and task level. Any module arguments explicitly specified in a task will override any established default for that module argument:: +The ``module_defaults`` keyword can be used at the play, block, and task level. Any module arguments explicitly specified in a task will override any established default for that module argument. + +.. code-block:: YAML - block: - name: Print a message @@ -39,7 +43,9 @@ The ``module_defaults`` keyword can be used at the play, block, and task level. ansible.builtin.debug: msg: "Default message" -You can remove any previously established defaults for a module by specifying an empty dict:: +You can remove any previously established defaults for a module by specifying an empty dict. + +.. code-block:: YAML - name: Create file1 ansible.builtin.file: @@ -53,7 +59,9 @@ You can remove any previously established defaults for a module by specifying an Here are some more realistic use cases for this feature. -Interacting with an API that requires auth:: +Interacting with an API that requires auth. + +.. code-block:: YAML - hosts: localhost module_defaults: @@ -74,7 +82,9 @@ Interacting with an API that requires auth:: ansible.builtin.uri: url: http://some.api.host/v1/whatever3 -Setting a default AWS region for specific EC2-related modules:: +Setting a default AWS region for specific EC2-related modules. + +.. code-block:: YAML - hosts: localhost vars: