On Mon, 29 Oct 2018 at 15:09, Bairava Surya <
surya...@gmail.com> wrote:
>
> Hi Visser
>
> I just configured sudo_exe=/usr/local/bin/sudo su - sudousername in ansible.cfg now am getting timeout error as it expects AD account password.
>
> In Solaris machine which is my target machine it uses QAS authentication service so when we login into machine using putty software we will login two stepsi.e first step as ssh into solaris via our username,password and second step enter sudo to other user by entering password so finally we are entering two times password which we are trying it in ansible.
>
> My end goal is to sudo to target machine.
You keep mixing up things here.
By "end goal" I meant really a target situation, whereby something is
changed/configured.
Just "sudo to target machine" doesn't make sense.
You SSH *to* a machine. And then you run a command, or a series of
commands, etc.
This is what ansible can automate for you.
Since most commands require elevated privileges, some ways to do that
are available when you're on the machine.
For instance sudo. Which optionally requires a username to sudo to
(default root). And optionally a password.
But all of this is done to run some useful task/program.
This is what you still have not told yet.
The new thread you started has yet again a confusing and insecure
playbook to find out what username you are using.
So can you please share what you are trying to achieve?
Since this appears to not be clear, here are some examples of what
Ansible is usually used for:
* Make sure a package is installed
* Make sure a configuration file is available
* Make sure a directory/file structure exists
Thanks!
Dick