From f68cd1acc65fe7914f4adda7eb3b6f2b1a78ef1e Mon Sep 17 00:00:00 2001 From: tterranigma Date: Tue, 11 Sep 2018 22:17:50 +0200 Subject: [PATCH] Update implicit_localhost.rst (#45455) Adds a clarification about `inventory_dir/file` magic variables when using implicit localhost as per #45385 . +label: docsite_pr --- docs/docsite/rst/inventory/implicit_localhost.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docsite/rst/inventory/implicit_localhost.rst b/docs/docsite/rst/inventory/implicit_localhost.rst index 87bb3f9f33..43bf598f09 100644 --- a/docs/docsite/rst/inventory/implicit_localhost.rst +++ b/docs/docsite/rst/inventory/implicit_localhost.rst @@ -28,6 +28,7 @@ You can override the built-in implicit version by creating a ``localhost`` host .. note:: - This host is not targetable via any group, however it will use vars from ``host_vars`` and from the 'all' group. + - The ``inventory_file`` and ``inventory_dir`` magic variables are not available for the implicit localhost as they are dependent on **each inventory host**. - This implicit host also gets triggered by using ``127.0.0.1`` or ``::1`` as they are the IPv4 and IPv6 representations of 'localhost'. - Even though there are many ways to create it, there will only ever be ONE implicit localhost, using the name first used to create it. - Having ``connection: local`` does NOT trigger an implicit localhost, you are just changing the connection for the ``inventory_hostname``.