Skip to content

Commit

Permalink
Add implicit localhost hostvars note (ansible#61956)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-hertel authored and samccann committed Sep 16, 2019
1 parent 7a36606 commit b1afb37
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/docsite/rst/inventory/implicit_localhost.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
- Implicit localhost does not appear in the ``hostvars`` magic variable unless demanded, such as by ``"{{ hostvars['localhost'] }}"``.
- 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.
Expand Down

0 comments on commit b1afb37

Please sign in to comment.