# Ansible 1.2.2: Playbook connection does not work for sudo\_user defined in group\_vars

**URL:** <https://forum.ansible.com/t/ansible-1-2-2-playbook-connection-does-not-work-for-sudo-user-defined-in-group-vars/13079>\
**Category:** Ansible Project\
**Created:** [July 6, 2013, 6:13pm UTC](https://forum.ansible.com/t/ansible-1-2-2-playbook-connection-does-not-work-for-sudo-user-defined-in-group-vars/13079 "2013-07-06T18:13:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Leow](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@Michael\_Leow](https://forum.ansible.com/u/Michael_Leow)\
**Post date:** [July 6, 2013, 6:13pm UTC](https://forum.ansible.com/t/ansible-1-2-2-playbook-connection-does-not-work-for-sudo-user-defined-in-group-vars/13079/1 "2013-07-06T18:13:08Z")

</div>

Hi,

Need help to figure out if the following is a bug with Ansible 1.2.2:

Scenario

---

<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:** [July 6, 2013, 7:39pm UTC](https://forum.ansible.com/t/ansible-1-2-2-playbook-connection-does-not-work-for-sudo-user-defined-in-group-vars/13079/2 "2013-07-06T19:39:48Z")

</div>

Can you summarize what the expected result and actual result are?

I’m failing to understand the problem of something succeeding, which is how I read your point #2 🙂

---

<div class="post-metadata">

**Author:** ![Michael\_Leow](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@Michael\_Leow](https://forum.ansible.com/u/Michael_Leow)\
**Post date:** [July 7, 2013, 1:31am UTC](https://forum.ansible.com/t/ansible-1-2-2-playbook-connection-does-not-work-for-sudo-user-defined-in-group-vars/13079/3 "2013-07-07T01:31:10Z")

</div>

Hi Michael,

Was trying to parameterize the sudo\_users into my playbooks (so I can use it both for Vagrant and AWS); but as you can see in scenario #1; it fails. When I try to hard code the sudo user (in scenario #2); it works.

So the question is: what is the correct way to parameterize using the values I set in groups\_vars/all so that it is correctly being used by the playbook.

BTW: Kudos on the Ansible design; compared to Puppet, it is so much easier to learn and build up 🙂

Cheers,  
Michael Leow

---

<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:** [July 7, 2013, 12:26pm UTC](https://forum.ansible.com/t/ansible-1-2-2-playbook-connection-does-not-work-for-sudo-user-defined-in-group-vars/13079/4 "2013-07-07T12:26:31Z")

</div>

Can you please test this on Ansible 1.3 (devel)?

Thanks!
