|
|
@ -52,7 +52,8 @@ public SSH key should be located in ``authorized_keys`` on those systems::
|
|
|
|
192.0.2.50
|
|
|
|
192.0.2.50
|
|
|
|
aserver.example.org
|
|
|
|
aserver.example.org
|
|
|
|
bserver.example.org
|
|
|
|
bserver.example.org
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is an inventory file, which is also explained in greater depth here: :doc:`intro_inventory`.
|
|
|
|
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
|
|
|
|
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
|
|
|
|
also has powerful configuration management and deployment features. There's more to
|
|
|
|
explore, but you already have a fully working infrastructure!
|
|
|
|
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:
|
|
|
|
.. _a_note_about_host_key_checking:
|
|
|
|
|
|
|
|
|
|
|
|
Host Key Checking
|
|
|
|
Host Key Checking
|
|
|
|