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/555d9796-0370-af7f-5262-43a1005d5acf%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to