From 5c525f946628a0e935261a01184fb31395710a66 Mon Sep 17 00:00:00 2001 From: XOmniverse Date: Fri, 30 Nov 2018 14:29:57 -0600 Subject: [PATCH] Update intro_inventory.rst to show YAML ranges (#49265) Adds a YAML example inventory listing a range of hosts to complement existing INI example. --- docs/docsite/rst/user_guide/intro_inventory.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/docsite/rst/user_guide/intro_inventory.rst b/docs/docsite/rst/user_guide/intro_inventory.rst index 7ee918464d..8b29e046dd 100644 --- a/docs/docsite/rst/user_guide/intro_inventory.rst +++ b/docs/docsite/rst/user_guide/intro_inventory.rst @@ -104,10 +104,21 @@ Generally speaking, this is not the best way to define variables that describe y If you are adding a lot of hosts following similar patterns, you can do this rather than listing each hostname: +In INI: + .. code-block:: guess [webservers] www[01:50].example.com + +In YAML: + +.. code-block:: yaml + + ... + webservers: + hosts: + www[01:50].example.com: For numeric patterns, leading zeros can be included or removed, as desired. Ranges are inclusive. You can also define alphabetic ranges: