mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Mention other ways to handle private key files (#57238)
Often when I am helping others learn Ansible, they are using nodes spun up on Amazon/Google/etc. where private key files (pem) are needed. Mentioning just a bit more on how to handle those private key files on the intro_getting_started page will help more folks get started faster. I even reviewed the changes with my learning team and they all agreed this helped clarify immediately for them how to really get started with Ansible from a practical perspective.
This commit is contained in:
parent
3e06013eb6
commit
78b003858d
1 changed files with 6 additions and 1 deletions
|
@ -64,8 +64,13 @@ do:
|
|||
|
||||
$ ssh-agent bash
|
||||
$ ssh-add ~/.ssh/id_rsa
|
||||
|
||||
Depending on your setup, you may wish to use Ansible's ``--private-key`` command line option to specify a pem file instead. You can also add the private key file:
|
||||
|
||||
(Depending on your setup, you may wish to use Ansible's ``--private-key`` option to specify a pem file instead)
|
||||
$ ssh-agent bash
|
||||
$ ssh-add ~/.ssh/keypair.pem
|
||||
|
||||
Another way to add private key files without using ssh-agent is using ``ansible_ssh_private_key_file`` in an inventory file as explained here: :ref:`intro_inventory`.
|
||||
|
||||
Now ping all your nodes:
|
||||
|
||||
|
|
Loading…
Reference in a new issue