# Running commands as sudo

**URL:** <https://forum.ansible.com/t/running-commands-as-sudo/24832>\
**Category:** Ansible Project\
**Created:** [June 27, 2017, 5:28pm UTC](https://forum.ansible.com/t/running-commands-as-sudo/24832 "2017-06-27T17:28:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lask001](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@lask001](https://forum.ansible.com/u/lask001)\
**Post date:** [June 27, 2017, 5:28pm UTC](https://forum.ansible.com/t/running-commands-as-sudo/24832/1 "2017-06-27T17:28:06Z")

</div>

I haven’t been using ansible that long, but so far I’m really liking it. I’m running into an issue though that I’m hoping someone will be able to shed some light on.

I have an account, foo on the server I want to run my playbook against. I’m trying to install an rpm. I do not have permissions to become root on said server with account foo. I do however, have the ability to install an rpm if I run the command as “sudo yum install …”

I’ve tried all sorts of things and have had pretty much zero luck:

My playbook is pretty basic for this test run:
