# Ansible 1.4 not allowing sudo\_user to be set by a variable...

**URL:** <https://forum.ansible.com/t/ansible-1-4-not-allowing-sudo-user-to-be-set-by-a-variable/13967>\
**Category:** Ansible Project\
**Created:** [November 22, 2013, 4:05am UTC](https://forum.ansible.com/t/ansible-1-4-not-allowing-sudo-user-to-be-set-by-a-variable/13967 "2013-11-22T04:05:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven\_Haddox](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@Steven\_Haddox](https://forum.ansible.com/u/Steven_Haddox)\
**Post date:** [November 22, 2013, 4:05am UTC](https://forum.ansible.com/t/ansible-1-4-not-allowing-sudo-user-to-be-set-by-a-variable/13967/1 "2013-11-22T04:05:09Z")

</div>

Is there a change I missed in ansible 1.4 that would break the following:

---

<div class="post-metadata">

**Author:** ![Steven\_Haddox](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@Steven\_Haddox](https://forum.ansible.com/u/Steven_Haddox)\
**Post date:** [November 22, 2013, 4:22am UTC](https://forum.ansible.com/t/ansible-1-4-not-allowing-sudo-user-to-be-set-by-a-variable/13967/2 "2013-11-22T04:22:52Z")

</div>

I should probably clarify that my sysadmin variable is defined in the: group\_vars/all.yml file… unless somehow that’s not getting picked up now…  
/me goes to investigate further

---

<div class="post-metadata">

**Author:** ![Steven\_Haddox](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@Steven\_Haddox](https://forum.ansible.com/u/Steven_Haddox)\
**Post date:** [November 22, 2013, 4:52am UTC](https://forum.ansible.com/t/ansible-1-4-not-allowing-sudo-user-to-be-set-by-a-variable/13967/3 "2013-11-22T04:52:23Z")

</div>

It appears that manually sourcing my old variable file has fixed this for now, as follows:

- name: Initialize all SUPPORT servers  
vars\_files:
- group\_vars/all.yml  
hosts: all  
sudo: yes  
sudo\_user: “{{sysadmin}}”  
roles:
- common

I’d love some suggestions or links to what may have changed to prevent the group\_vars/all.yml from loading when hosts: all is set, but for now this works at least with minimal impact.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [November 22, 2013, 7:16am UTC](https://forum.ansible.com/t/ansible-1-4-not-allowing-sudo-user-to-be-set-by-a-variable/13967/4 "2013-11-22T07:16:27Z")

</div>

Please file a ticket and we’ll see if we can reproduce this.

– Michael

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [November 22, 2013, 7:32am UTC](https://forum.ansible.com/t/ansible-1-4-not-allowing-sudo-user-to-be-set-by-a-variable/13967/5 "2013-11-22T07:32:28Z")

</div>

Btw the inventory variable is ansible\_sudo\_user and has existed for a while, what you have should technically work but is a much more manual approach. Check to see you did not define ansible\_sudo\_user elsewhere.

– Michael
