# Ansible playbook to install compass

**URL:** <https://forum.ansible.com/t/ansible-playbook-to-install-compass/20645>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [February 21, 2016, 5:05pm UTC](https://forum.ansible.com/t/ansible-playbook-to-install-compass/20645 "2016-02-21T17:05:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yaron\_idan](https://avatars.discourse-cdn.com/v4/letter/y/ea5d25/32.png) [@yaron\_idan](https://forum.ansible.com/u/yaron_idan)\
**Post date:** [February 21, 2016, 5:05pm UTC](https://forum.ansible.com/t/ansible-playbook-to-install-compass/20645/1 "2016-02-21T17:05:37Z")

</div>

'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 -

```auto
curl -L [https://get.rvm.io](https://get.rvm.io/) | bash -s stable
gpg --keyserver hkp://[keys.gnupg.net](http://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 -

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [February 22, 2016, 12:05am UTC](https://forum.ansible.com/t/ansible-playbook-to-install-compass/20645/2 "2016-02-22T00:05:48Z")

</div>

​for /var/lib/gems you probably need root, not deploy3​, remote the become\_user line (it defaults to root).

---

<div class="post-metadata">

**Author:** ![yaron\_idan](https://avatars.discourse-cdn.com/v4/letter/y/ea5d25/32.png) [@yaron\_idan](https://forum.ansible.com/u/yaron_idan)\
**Post date:** [February 22, 2016, 11:03am UTC](https://forum.ansible.com/t/ansible-playbook-to-install-compass/20645/3 "2016-02-22T11:03:21Z")

</div>

Brian, if you’re ever in Israel, please do let me buy you a beer.  
I indeed need root access to this gem path, but I acually intended to use a different executible (owned by deploy3) and forgot to use the correct path.  
Thanks!
