Hello All,
I wanted to pass dynamic parameters to shell script in playbook.
I am using script module to trigger, any pointers on this will be really helpful.
Regards
Amit
Hello All,
I wanted to pass dynamic parameters to shell script in playbook.
I am using script module to trigger, any pointers on this will be really helpful.
Regards
Amit
He actually did by sending it to this list.
You can use variable and jinja templating logic in your script task.
If you need more concrete help, provide more details.
Dick
Hello Dick,
Thanks for the response.
Any code snippet that you can share that will be of great help.
Actually I am working Microstrategy build automation, where we wanted to trigger the shell script and pass dynamic parameters (e.g. License key etc) and also need to send the email to DL in case of success and failures.
As far I researched, we can use script module to trigger the any shell script and but wondering how can I pass dynamic parameters every time.
Regards
Amit
You can use any variables that you use in your playbook to construct
the actual command:
- name: return motd to registered var
command: /opt/scripts/hackme.sh --license {{ license }} --strategy
{{ strategy }}
etc etc
Thanks.
Let me try to write it and will paste here for your review.
Regards
Amit