Re: [ansible-project] How does Ansible deals with the remote prompt?

2019-08-02 Thread Brian Coca
ah, sorry, for that you need to use something like the expect module. -- -- Brian Coca -- 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

Re: [ansible-project] How does Ansible deals with the remote prompt?

2019-08-02 Thread Kai Stian Olstad
On 02.08.2019 21:38, Brian Coca wrote: > When using the ssh connection plugin, Ansible relies on the `sshpass` > program to handle prompts, but only does so if a password was already > supplied. That is not the remote prompt, but the local prompt where the ssh client ask for password. What the

Re: [ansible-project] How does Ansible deals with the remote prompt?

2019-08-02 Thread Brian Coca
When using the ssh connection plugin, Ansible relies on the `sshpass` program to handle prompts, but only does so if a password was already supplied. - -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from

Re: [ansible-project] How does Ansible deals with the remote prompt?

2019-08-02 Thread Kai Stian Olstad
On 02.08.2019 01:57, Kenneth Wong wrote: I am confused how Ansible Expect Module will work in my use case. https://docs.ansible.com/ansible/latest/modules/expect_module.html Is this the Expect Module you mentioned? Yes From what I can gather, the Expect Module 1. Connects to remote

Re: [ansible-project] How does Ansible deals with the remote prompt?

2019-08-01 Thread Kenneth Wong
I am confused how Ansible Expect Module will work in my use case. https://docs.ansible.com/ansible/latest/modules/expect_module.html Is this the Expect Module you mentioned? >From what I can gather, the Expect Module 1. Connects to remote device and immediately sends the command 2. Look for a

Re: [ansible-project] How does Ansible deals with the remote prompt?

2019-07-31 Thread Kenneth Wong
Thanks Kai for your response. Just for clarification. Can Ansible support the following scenario? 1. Ansible ssh into a remote system using username/password. 2. Ansible waits for a specific prompt from the remote side. 3. Ansible than sends the command. 4. Ansible wait for the command response

Re: [ansible-project] How does Ansible deals with the remote prompt?

2019-07-31 Thread Kai Stian Olstad
On 31.07.2019 15:55, Kenneth Wong wrote: > > > After a successful login, does Ansible automatically figures out what the > remote prompt is before sending the command? Ansible doesn't login it run commands in non-interactive fashion. > In Ansible is there support for providing what the

[ansible-project] How does Ansible deals with the remote prompt?

2019-07-31 Thread Kenneth Wong
After a successful login, does Ansible automatically figures out what the remote prompt is before sending the command? The remote system is Linux and supports ssh login as user root or cliadmin. The difference is when logged in as cliadmin, a Java application is spawned to interact with