even if i want to bypass all the prompt? i would like it to proceed with 'yes' in the background without validating the answer.
On Tuesday, April 4, 2017 at 12:30:39 PM UTC-4, Kai Stian Olstad wrote: > > On 04. april 2017 17:55, NouraD wrote: > > currently ansible allows only one 'yes' to be pushed to any question > > generated by config script. > > > > I cannot run multiple 'yes' for the prompts generated . it get stuck > after > > first 'yes' > > > > > > this is my task : > > > > --- > > - name: place generated config file > > template: src=config-template dest=/root/config-file owner=root > group=root mode=0644 > > > > - name: snmp bash > > template: src=run.bash dest=/root/run.bash owner=root group=root > mode=0777 > > > > - name: Run script > > shell: /root/run.bash --> this will run the bash script directly on > the VNF > > register: myoutput > > > > > > > > this is my template , will be run directly from VNF > > > > > > run.bash > > > > #!/bin/bash > > > > yes y | /opt/config/bin/Config -f /root/config-file --> this will run > on > > the VNF to configure the system > > > > > > > > any help please? > > For interactive scripts you will need to use expect module to make it > work. > > -- > Kai Stian Olstad > -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/bcaeb125-4efb-4c2f-afe0-14d67f6eaed4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
