# difference in "ansible PATH" & "server-side PATH"

**URL:** <https://forum.ansible.com/t/difference-in-ansible-path-server-side-path/20560>\
**Category:** Ansible Project\
**Created:** [February 12, 2016, 2:13pm UTC](https://forum.ansible.com/t/difference-in-ansible-path-server-side-path/20560 "2016-02-12T14:13:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheUnseen](https://avatars.discourse-cdn.com/v4/letter/t/54ee81/32.png) [@TheUnseen](https://forum.ansible.com/u/TheUnseen)\
**Post date:** [February 12, 2016, 2:13pm UTC](https://forum.ansible.com/t/difference-in-ansible-path-server-side-path/20560/1 "2016-02-12T14:13:24Z")

</div>

Hi there,

I’m pretty new to ansible and trying to install rvm threw its official role system-wide.  
Through installation process I came across a “rvm command not found” error, which (thru further diggin) brought me to the following question:

How come, that my PATH differs, depending if I ask for it with ansible or directly?

user@mgmt:~$ ansible **web1** -a “echo $PATH”

> web1 | SUCCESS | rc=0 \>\>  
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

user@ **web1** :~$ echo $PATH

> /usr/local/rvm/gems/ruby-2.1.3/bin:/usr/local/rvm/gems/ruby-2.1.3@global/bin:/usr/local/rvm/rubies/ruby-2.1.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/rvm/bin

Im using ansible 2.0.0.2

Grateful for any help!

cheers

---

<div class="post-metadata">

**Author:** ![Mark\_McCoy](https://avatars.discourse-cdn.com/v4/letter/m/ebca7d/32.png) [@Mark\_McCoy](https://forum.ansible.com/u/Mark_McCoy)\
**Post date:** [February 12, 2016, 2:36pm UTC](https://forum.ansible.com/t/difference-in-ansible-path-server-side-path/20560/2 "2016-02-12T14:36:04Z")

</div>

When you login, there is a system-wide profile script that is imported with the barebones environment variables that are global to all users, then your local .profile is imported.

If the shell is an interactive shell, then a third script (usually .bashrc for BASH or .zshrc for ZSH) is run containing variables for command line interactive use. Your additions to the path that add the paths to rvm are probably in there and not .profile. Since the ansible login isn’t interactive the .bashrc never gets imported.

---

<div class="post-metadata">

**Author:** ![TheUnseen](https://avatars.discourse-cdn.com/v4/letter/t/54ee81/32.png) [@TheUnseen](https://forum.ansible.com/u/TheUnseen)\
**Post date:** [February 16, 2016, 7:57am UTC](https://forum.ansible.com/t/difference-in-ansible-path-server-side-path/20560/3 "2016-02-16T07:57:06Z")

</div>

Cheers! Pointed me to the right direction.
