From 78b003858d6dc261987db08798cd4d14c4e607da Mon Sep 17 00:00:00 2001 From: Thad Guidry Date: Mon, 3 Jun 2019 10:17:13 -0500 Subject: [PATCH] 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. --- docs/docsite/rst/user_guide/intro_getting_started.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/docsite/rst/user_guide/intro_getting_started.rst b/docs/docsite/rst/user_guide/intro_getting_started.rst index f8e3543241..3ff7363435 100644 --- a/docs/docsite/rst/user_guide/intro_getting_started.rst +++ b/docs/docsite/rst/user_guide/intro_getting_started.rst @@ -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: