You can also use the Ansible -e and use the variable is the script. 

Mike

> On Dec 8, 2021, at 16:28, Antony Stone <[email protected]> 
> wrote:
> 
> On Wednesday 08 December 2021 at 23:23:10, Aleksandar Ilic wrote:
> 
>> Hello everyone,
>> 
>> I have been trying to find a solution to run a sh script via ansible but
>> the script requires users that run the script to enter username and
>> password.
>> 
>> Is it possible to pass those vars via ansible?
> 
> a) not unless the script supports it
> 
> b) you might try using 'expect' to see if that can pretend to be a user at a 
> keyboard.
> 
> Antony.
> 
> -- 
> "In fact I wanted to be John Cleese and it took me some time to realise that 
> the job was already taken."
> 
> - Douglas Adams
> 
>                                                   Please reply to the list;
>                                                         please *don't* CC me.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/C87050A0-499D-4D96-8AC0-3E0F23EDC862%40gmail.com.

Reply via email to