Already tried with expect and shell module.

```
- name: Handling multiple prompts
  expect:
    command: jx install --git-provider-kind bitbucketserver 
--git-provider-url http://xyz-abc-git.net.local --git-username automation 
--default-environment-prefix Testproject --git-api-token 
MzI1ODg1NjA1NTk4OqjiP9N3lr4iHt9L5rofdaWMqsW --on-premise --external-ip {{ 
hostvars[groups["kubemaster"][0]]["ip"] }} --verbose --static-jenkins=true 
--provider=openshift
    responses:
      Question:
        - Please enter the name you wish to use with git: automation
    timeout: 60
```
```
- name: Handling prompts
  expect:
    command: jx install --git-provider-kind bitbucketserver 
--git-provider-url http://abc-xyz-git.net.local --git-username automation 
--default-environment-prefix Testproject --git-api-token 
MzI1ODg1NjA1NTk4OqjiP9N3lr4iHt9L5rofdaWMqsW --on-premise --external-ip {{ 
hostvars[groups["kubemaster"][0]]["ip"] }} --verbose --static-jenkins=true 
--provider=openshift
    responses:
      Please enter the name you wish to use with git: "automation"
```
On Thursday, 25 June 2020 13:49:09 UTC+5:30, Luca 'remix_tj' Lorenzetto 
wrote:
>
> Hello, 
>
> if you aren't able to automate with silent install, use the expect module. 
>
> Luca 
>
> On Thu, Jun 25, 2020 at 10:16 AM Nishant Passari 
> <[email protected] <javascript:>> wrote: 
> > 
> > Hi everyone, 
> > 
> > Am trying to install jenkins-x version 2.0.785 via ansible 2.9.9. 
> > 
> > How do I handle the prompts like "Please enter the name you wish to use 
> with git:" that I get while installing jenkins-x? I get the prompt even 
> though "--git-username=automation" is already passed in the JX install 
> command. I tried with both expect and shell module in ansible. 
> > 
> > There are also yes/no prompts to be handled that I will get further. 
> > 
> > Regards, 
> > Nishant Passari 
> > 
> > -- 
> > 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] <javascript:>. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/21f3aa9a-5d6f-409f-be30-9dc063c00bd6o%40googlegroups.com.
>  
>
>
>
>
> -- 
> "E' assurdo impiegare gli uomini di intelligenza eccellente per fare 
> calcoli che potrebbero essere affidati a chiunque se si usassero delle 
> macchine" 
> Gottfried Wilhelm von Leibnitz, Filosofo e Matematico (1646-1716) 
>
> "Internet è la più grande biblioteca del mondo. 
> Ma il problema è che i libri sono tutti sparsi sul pavimento" 
> John Allen Paulos, Matematico (1945-vivente) 
>
> Luca 'remix_tj' Lorenzetto, http://www.remixtj.net , <[email protected] 
> <javascript:>> 
>

-- 
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/53c2a1bf-0a89-4b63-a806-d913934bce56o%40googlegroups.com.

Reply via email to