From 0f82674c0e7a49411a08f0198cbbdab3d556194c Mon Sep 17 00:00:00 2001 From: fhiyo Date: Thu, 9 Mar 2017 12:45:23 +0900 Subject: [PATCH] Add document about connecting to localhost (#20534) * Add document about connecting to localhost * Update intro_getting_started.rst * Update intro_getting_started.rst Edited. * Added description about ansible_python_interpreter --- docs/docsite/rst/intro_getting_started.rst | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/docsite/rst/intro_getting_started.rst b/docs/docsite/rst/intro_getting_started.rst index a1e46bcf15..1cb6af2e28 100644 --- a/docs/docsite/rst/intro_getting_started.rst +++ b/docs/docsite/rst/intro_getting_started.rst @@ -52,7 +52,8 @@ public SSH key should be located in ``authorized_keys`` on those systems:: 192.0.2.50 aserver.example.org bserver.example.org - + + This is an inventory file, which is also explained in greater depth here: :doc:`intro_inventory`. We'll assume you are using SSH keys for authentication. To set up SSH agent to avoid retyping passwords, you can @@ -107,6 +108,20 @@ explore what you can do with different modules, and to learn about the Ansible also has powerful configuration management and deployment features. There's more to explore, but you already have a fully working infrastructure! +Tips + +When running commands, you can specify the local server by using "localhost" or "127.0.0.1" for the server name. + +Example: + +.. code-block:: bash + + $ ansible localhost -m ping -e 'ansible_python_interpreter="/usr/bin/env python"' + +You can specify localhost explicitly by adding this to your inventory file:: + + localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env python" + .. _a_note_about_host_key_checking: Host Key Checking