how to execute shell script passing parameters

514 views
Skip to first unread message

vinay....@gmail.com

unread,
Dec 4, 2014, 7:36:37 PM12/4/14
to ansible...@googlegroups.com
How can we execute shell script passing parameters using ansible?

Eg:
execute test.sh <param1> <param2> <param3>
==

Can we use shell module and pass parameters?What is the best approach?
- name: Execute script
  shell: test.sh a b c
==

Please suggest.

-Vinay


James Cammarata

unread,
Dec 4, 2014, 9:13:54 PM12/4/14
to ansible...@googlegroups.com
Hi Vinay, 

Yes, you can just use the shell, command, or script modules to execute your command just the way you would from the command line.



--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/11383542-041d-48ab-95d3-e261dcfda40d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages