jeudi 6 août 2015

[Ansible] problem when executing a mongo script on a remote server

When you want to execute the command mongo on the remote server (for exemple when you want to do mongo --host myserver --port 27017 myscript.js you must do that in your playbook :

-shell: mongo --host myserver --port 27017 < myscript.js 

Source : http://stackoverflow.com/questions/4837673/how-to-execute-mongo-commands-through-shell-scripts#comment21193090_4837678

Aucun commentaire:

Categories