Hi You are running into a typical rvm error. I assume you have some special rvm ruby version with a custom gemset.
The problem is, Ansible has to do the same rvm use ruby-2.1.5@gemset like you would do in your shell. Unless you are using the .ruby-(version|gemset) dotfiles. Ansible does not know about this magick and is running your system ruby's bundler command. Kind regards /mf Derrick Mar <[email protected]> schrieb am Do., 20. Aug. 2015 04:02: > Hello Ansible community! > > I'm just getting started with Ansible, and seem to be not understanding > why this happens. > > My playbook > - name: bundle install > command: "bundle install" > args: > chdir: "~/ai_grading_production/" > > I get the error msg: [Errno 2] No such file or directory when using bundle > > When I actually specify the full path it works > command: "/home/ubuntu/.rvm/gems/ruby-2.2.2/wrappers/bundle install" > > When I use the shell module it error with this message > stderr: /bin/sh: 1: bundle: not found > > Does anyone know why I have to specify the full path to use the bundle > command. And how can I fix? Thank you! > > -- > 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/da5943e1-1606-4f50-91f8-fd2051882a66%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/da5943e1-1606-4f50-91f8-fd2051882a66%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAFRuYVdFG6wOxo1sH9ttbOSzJpetzZ4WOqoEz5ioZxzr6TyzNg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
