summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaleed Mortaja <27075022+WaleedMortaja@users.noreply.github.com>2022-11-28 18:04:37 +0200
committerGitHub <noreply@github.com>2022-11-28 11:04:37 -0500
commit3723c426d2f12b8ba6adde6c06302a4dc8851126 (patch)
treed45937f374ba3d863dd4a9f49845976e30883ff5
parent3a6b6370add78cf08463a8db69d0337534d6840a (diff)
downloadansible-3723c426d2f12b8ba6adde6c06302a4dc8851126.tar.gz
Fix lists styling (#79481)
-rw-r--r--docs/docsite/rst/inventory_guide/intro_inventory.rst10
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/docsite/rst/inventory_guide/intro_inventory.rst b/docs/docsite/rst/inventory_guide/intro_inventory.rst
index 6bc052c4ea..3fd6782dbd 100644
--- a/docs/docsite/rst/inventory_guide/intro_inventory.rst
+++ b/docs/docsite/rst/inventory_guide/intro_inventory.rst
@@ -128,6 +128,7 @@ Grouping groups: parent/child group relationships
You can create parent/child relationships among groups. Parent groups are also known as nested groups or groups of groups. For example, if all your production hosts are already in groups such as ``atlanta_prod`` and ``denver_prod``, you can create a ``production`` group that includes those smaller groups. This approach reduces maintenance because you can add or remove hosts from the parent group by editing the child groups.
To create parent/child relationships for groups:
+
* in INI format, use the ``:children`` suffix
* in YAML format, use the ``children:`` entry
@@ -292,7 +293,9 @@ We document adding variables in the main inventory file for simplicity. However,
Assigning a variable to one machine: host variables
===================================================
-You can easily assign a variable to a single host, then use it later in playbooks. You can do this directly in your inventory file. In INI:
+You can easily assign a variable to a single host, then use it later in playbooks. You can do this directly in your inventory file.
+
+In INI:
.. code-block:: text
@@ -376,7 +379,9 @@ Consider using YAML format for inventory sources to avoid confusion on the actua
Assigning a variable to many machines: group variables
======================================================
-If all hosts in a group share a variable value, you can apply that variable to an entire group at once. In INI:
+If all hosts in a group share a variable value, you can apply that variable to an entire group at once.
+
+In INI:
.. code-block:: text
@@ -545,6 +550,7 @@ When using multiple inventory sources, keep in mind that any variable conflicts
to the rules described in :ref:`how_we_merge` and :ref:`ansible_variable_precedence`. You can control the merging order of variables in inventory sources to get the variable value you need.
When you pass multiple inventory sources at the command line, Ansible merges variables in the order you pass those parameters. If ``[all:vars]`` in staging inventory defines ``myvar = 1`` and production inventory defines ``myvar = 2``, then:
+
* Pass ``-i staging -i production`` to run the playbook with ``myvar = 2``.
* Pass ``-i production -i staging`` to run the playbook with ``myvar = 1``.