Hi ,
ansible 2.1.4.0
I am trying to use ansible module to execute a sciprt < custom work flow> .
I have notices that ansible allows me to enter only one prompt 'y' from
the question generated out of the custom script.
I tried to use 'command' or 'expect' modules, but also didn't work as it
expect pexpect modules .
I moved my command from a module to a bash file and asked ansible to run
the file but also same issue. < not allowing more than one promot at a
time>
any Idea how to fix this issue? what module or expression i should be using?
here is my task :
------------------------------------------------------------------
[root@a9]# cat /tasks/main.yaml
---
- name: place generated config file into active VM
template: src=config-template dest=/root/config-file owner=root
group=root mode=0644
- name: bash file
template: src=run.bash dest=/root/run.bash owner=root group=root mode=0777
- name: Run
shell: /root/run.bash | tee -a /root/template.cfg
register: myoutput
- name: variableoutput
debug: msg="{{ myoutput }}"
-------------------------------------------------------------------
[root@a]# cat /templates/run.bash
#!/bin/bash
/bin/printf "y\ny\n" | /opt/config/bin/MyScript -f /root/config-file
----------------------------------------------------------------------------
Task is stucked here with no action .
Thank you!
Noura
--
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/a715c933-758d-4f21-8d86-841f470941cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.