# Obtaining a login shell for certain tasks

**URL:** <https://forum.ansible.com/t/obtaining-a-login-shell-for-certain-tasks/12448>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [March 3, 2013, 10:11am UTC](https://forum.ansible.com/t/obtaining-a-login-shell-for-certain-tasks/12448 "2013-03-03T10:11:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [March 3, 2013, 10:11am UTC](https://forum.ansible.com/t/obtaining-a-login-shell-for-certain-tasks/12448/1 "2013-03-03T10:11:07Z")

</div>

You can use 'shell' instead of 'command' and all of these variables will expand.

---

<div class="post-metadata">

**Author:** ![Jon-Michael\_Deldin](https://avatars.discourse-cdn.com/v4/letter/j/ac8455/32.png) [@Jon-Michael\_Deldin](https://forum.ansible.com/u/Jon-Michael_Deldin)\
**Post date:** [March 3, 2013, 9:30pm UTC](https://forum.ansible.com/t/obtaining-a-login-shell-for-certain-tasks/12448/2 "2013-03-03T21:30:51Z")

</div>

Thanks, that was part of it. The rest…forgetting to set $PATH for non-interactive shells (zprofile vs. zshrc). /facepalm

Best,  
Jon-Michael
