# Call to ansible -m shell isn't pulling in the correct PATH setting.

**URL:** <https://forum.ansible.com/t/call-to-ansible-m-shell-isnt-pulling-in-the-correct-path-setting/27690>\
**Category:** Ansible Project\
**Created:** [June 2, 2018, 5:27pm UTC](https://forum.ansible.com/t/call-to-ansible-m-shell-isnt-pulling-in-the-correct-path-setting/27690 "2018-06-02T17:27:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![user106](https://avatars.discourse-cdn.com/v4/letter/u/41988e/32.png) [@user106](https://forum.ansible.com/u/user106)\
**Post date:** [June 2, 2018, 5:27pm UTC](https://forum.ansible.com/t/call-to-ansible-m-shell-isnt-pulling-in-the-correct-path-setting/27690/1 "2018-06-02T17:27:45Z")

</div>

Hey Gal’s N Guy’s,

Ansible isn’t sourcing .bashrc or .bash\_profile when running -m shell. But when I login via ssh, there isn’t any issues. The shell PATH is set correctly in .bashrc and now also in .bash\_profile . As usual /bin/sh points to bash .

Is there another option or a configuration to allow for this? This is a vanilla Ansible install on CentOS 7 .

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [June 2, 2018, 5:53pm UTC](https://forum.ansible.com/t/call-to-ansible-m-shell-isnt-pulling-in-the-correct-path-setting/27690/2 "2018-06-02T17:53:25Z")

</div>

This has nothing to do with Ansible and everything to do with how shells work.  
It has been on the list a few times, search for interactive and non-interactive shell.

Short summary, a non-interactive shell doesn't read those files.  
For more, type "man bash" and read the section INVOCATION.
