'm receiving an error when trying to install compass using a playbook (on 
an AWS EC2 instance)
Usually we use the following script to install compass - 

curl -L https://get.rvm.io | bash -s stable
gpg --keyserver hkp://keys.gnupg.net --recv-keys 
409B6B1796C275462A1703113804BB82D39DC0E3
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.2
rvm use 2.1.2 --default
gem install compass


I've tried converting this to script to the following playbook -
---
- hosts: "{{ host_name }}"
  become: yes
  become_user : deploy3
  tasks:
    - name: get gpg
      shell: "gpg --keyserver hkp://keys.gnupg.net --recv-keys 
409B6B1796C275462A1703113804BB82D39DC0E3"
    - name: install rvm
      shell: "curl -L https://get.rvm.io | bash -s stable"
    - name: install rvm 2.1.2
      shell: "/home/deploy2/.rvm/bin/rvm install 2.1.2"
    - name: use rvm 2.1.2 by default and install compass
      shell: "bash -lc \"/home/deploy2/.rvm/bin/rvm use 2.1.2 --default && 
/usr/bin/gem install compass\""
...

deploy is not a sudoer, but when I try to install compass manually it 
succeeds, and as a playbook I receive the following error - You don't have 
write permissions into the /var/lib/gems/1.9.1 directory.

I've tried installing compass any other way, including the one suggested 
here - 
https://groups.google.com/forum/#!searchin/ansible-project/compass/ansible-project/Xg9OC0eA3xo/Jd1hqEJb1v4J,
 
but everything I try fails with various errors.
Has anyone encountered this issue and prevailed?

-- 
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/4d25f196-2480-4d8e-945e-b73ec501462c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to