1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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
This commit is contained in:
fhiyo 2017-03-09 12:45:23 +09:00 committed by scottb
parent 32146acf4e
commit 0f82674c0e

View file

@ -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