Hi there before all thanks fot the amazing work that you already done

Is only one thing that keep  make me noise when I use Ansible, normally I 
use RVM to handle different versions of ruby and every time that i need to 
run a simple bundle to install al the gems from every app I get struggled 
with it

failed: [ingenyo] => {"changed": true, "cmd": "bundle", "delta": 
"0:00:00.002008", "end": "2015-05-02 16:08:49.070874", "rc": 127, "start": 
"2015-05-02 16:08:49.068866", "warnings": []}
stderr: /bin/sh: 1: bundle: not found
FATAL: all hosts have already failed -- aborting

I know that is because is a login shell command and ansible don't use that, 
but  how is the  Pretty way to fix that problems? I'm down to help in 
anything that is necessary for that

here my 2 playbooks!

Deploy.yml

- name: Clone repositorio
  git: repo=https://github.com/mullerivan/myapp.git 
dest=/home/vagrant/myapp accept_hostkey=yes
  sudo: false
  
- name: bundle install (install the rest of the gems)
  shell: bundle
         chdir=/home/vagrant/myapp
  sudo: false




rvm.yml

- name:  downloading the GPG signature
  shell: gpg --keyserver hkp://keys.gnupg.net --recv-keys 
409B6B1796C275462A1703113804BB82D39DC0E3

- name: Installing rvm ruby and rails take 16m5.124s up to your  internet 
conection
  shell: \curl -sSL https://get.rvm.io | bash -s stable --rails
  

# Ruby from source playbook 
(https://github.com/jgrowl/ansible-playbook-ruby-from-src)
- name: upgrade
  action: apt update_cache=yes upgrade=yes

- name: install ruby dependencies 
  action: apt pkg={{item}} state=installed
  with_items:
    - build-essential
    - automake
    - bison
    - autoconf
    - pkg-config
    - libreadline6
    - libreadline6-dev
    - openssl
    - libssl-dev
    - curl
    - git-core
    - zlib1g
    - zlib1g-dev
    - libyaml-dev
    - libsqlite3-dev
    - libxml2-dev
    - libxslt1-dev
    - curl

- name: Install app dependencies 
  action: apt pkg={{item}} state=installed
  with_items:
    - libpq-dev
    - nodejs
    - imagemagick
  tags: package


Thanks in advance! 

-- 
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/b933c6d0-b0f8-436d-bdd1-28e3972541c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to