Re: [ansible-project] Facing issues with ssh connection as user root

2021-04-26 Thread Hasini P
I am not executing playbook with sudo. Running it with my userID. Do you want me to paste - verbose output for more details here ? (I am using -K option with playbook and providing my password) On Monday, 26 April 2021 at 16:11:30 UTC+5:30 ng.duct...@gmail.com wrote: > Did you execute

Re: [ansible-project] Facing issues with ssh connection as user root

2021-04-26 Thread Thanh Nguyen Duc
Did you execute your playbook with sudo? If with sudo then you may need to ssh copy key again for root account to target machine. And Can try to add - then post the result? Sent from my iPhone > On 26 Apr 2021, at 18:37, Hasini P wrote: > >  > yes, I am able to ping-pong with my

Re: [ansible-project] Facing issues with ssh connection as user root

2021-04-26 Thread Hasini P
yes, I am able to ping-pong with my userID.. ssh password-less connectivity was established from control server to remote server with my ID On Monday, 26 April 2021 at 16:05:34 UTC+5:30 ng.duct...@gmail.com wrote: > Sorry, first of all, are you able to ping your server by ansible > yourserver

Re: [ansible-project] Facing issues with ssh connection as user root

2021-04-26 Thread Thanh Nguyen Duc
Sorry, first of all, are you able to ping your server by ansible yourserver -m ping? Have you done to transfer your public key to client? Sent from my iPhone > On 26 Apr 2021, at 18:32, Hasini P wrote: > > Thanks, I tried different possibilities including your suggestion as below., > but it

Re: [ansible-project] Facing issues with ssh connection as user root

2021-04-26 Thread Hasini P
Thanks, I tried different possibilities including your suggestion as below., but it didnt work --- - name: test hosts: all tasks: - name: sample shell task to check the userID shell: echo `whoami` become: yes On Monday, 26 April 2021 at 15:59:20 UTC+5:30 ng.duct...@gmail.com

Re: [ansible-project] Facing issues with ssh connection as user root

2021-04-26 Thread Thanh Nguyen Duc
Sorry, just become: true may solve, by default it always become root already Sent from my iPhone > On 26 Apr 2021, at 18:29, Thanh Nguyen Duc wrote: > > I think just become_user: yes may solve your issue. > > Sent from my iPhone > >>> On 26 Apr 2021, at 18:26, Hasini P wrote: >>> >>  >>

Re: [ansible-project] Facing issues with ssh connection as user root

2021-04-26 Thread Thanh Nguyen Duc
I think just become_user: yes may solve your issue. Sent from my iPhone > On 26 Apr 2021, at 18:26, Hasini P wrote: > >  > Team, Can someone sort this out please.. We are using 2.8.18 version of > ansible on our control node. > I am facing error when trying to perform ping-pong with

[ansible-project] Facing issues with ssh connection as user root

2021-04-26 Thread Hasini P
Team, Can someone sort this out please.. We are using 2.8.18 version of ansible on our control node. I am facing error when trying to perform ping-pong with ansible as become_user root (as pasted below). On the remote server, the user is having access to run sudo commands and user can become