Hi, 

I think you can use 
https://docs.ansible.com/ansible/latest/modules/expect_module.html

Best,
Karol


> On 24 Aug 2020, at 5:30 pm, jonin <sebastian.coll...@gmail.com> wrote:
> 
> Hi, 
> 
> I am looking to automate this task within ansible and have no idea really how 
> to do this.
> 
> I run the set up script manually on the host(s) like this:
> 
> I call the "setup" script below with npm run options:
> 
> npm run setup
> 
> The script then prompts for my user input to provide the following details:
> 
>       • Postgresql Superuser (for database creation) [default: 
> postgres]:postgres
>       • New Database Username (for readonly access) [default: 
> postcodesio]:postcodesio
>       • Password for new user [default: secret]:secret
>       • Postgresql Host [default: localhost]:localhost
>       • Database Name [default: postcodesiodb]:postcodesiodb
>       • Postgresql Port: [default: 5432]:5432
> Once these have been provided the script completes. Pleas help in advising 
> how I can go about automating this in ansible.
> 
> Thanks
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ansible Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to ansible-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-devel/07433108-d97b-40e6-b86d-be046df06346n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/3215CB56-E63C-4FF2-98F2-63380C1671F3%40gmail.com.

Reply via email to