Hi, This is to connect to the remote host. I'm aware that we can do something similar to this, ansible-playbook -i hosts.yml --private-key=private_key_path ansible_script. yml
also, I know we can use the private key in the inventory host_vars as ansible_ssh_private_key but why ansible doesn't provide a option to manage private_key's password if it allows to use a private_key. On Wednesday, September 12, 2018 at 6:09:55 PM UTC+5:30, Dick Visser wrote: > > Is this private key supposed to be used for connecting to a host > you're configuring (i.e. the password to a protected SSH key)? > Or is it used inside a task, to executed on a remote host (i.e. > *after* you've connected to it)? > > Dick > > On 12 September 2018 at 12:57, Madushan Chathuranga > <[email protected] <javascript:>> wrote: > > Hi All, > > > > Is it possible to provide the password of the private key on the command > > line extra vars or using the inventory. In the inventory we can provide > the > > private key but not the password? can not use --ask-pass in the command > > since it would prompt for the password to be user provided. Needs to > pass > > this password along with the private key. using this to execute an > ansible > > script on a remote host. > > > > Thanks. > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "Ansible Project" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to [email protected] <javascript:>. > > To post to this group, send email to [email protected] > <javascript:>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/ansible-project/4b9e126e-1cc2-4cf9-8767-b5b32e041c8b%40googlegroups.com. > > > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/6080620a-dd25-49e4-a18d-1cd7868156ac%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
