# ansible-playbook command fails when target is selinux-enabled, but I don't have root access, so I cannot sudo yum install

**URL:** <https://forum.ansible.com/t/ansible-playbook-command-fails-when-target-is-selinux-enabled-but-i-dont-have-root-access-so-i-cannot-sudo-yum-install/20117>\
**Category:** Ansible Project\
**Created:** [January 4, 2016, 3:37pm UTC](https://forum.ansible.com/t/ansible-playbook-command-fails-when-target-is-selinux-enabled-but-i-dont-have-root-access-so-i-cannot-sudo-yum-install/20117 "2016-01-04T15:37:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Wright](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@Michael\_Wright](https://forum.ansible.com/u/Michael_Wright)\
**Post date:** [January 4, 2016, 3:37pm UTC](https://forum.ansible.com/t/ansible-playbook-command-fails-when-target-is-selinux-enabled-but-i-dont-have-root-access-so-i-cannot-sudo-yum-install/20117/1 "2016-01-04T15:37:21Z")

</div>

I’m trying to use ansible to automate some application tasks across servers in a cloud-based network. I have ssh access to these servers, but I do not have the ability to sudo to root on any of them. I can use the ansible command to run commands on each target (but I can also already use ssh to do that). I’m working on a Mac, so I installed vagrant and have a test linux server running “locally.” I can use ansible-playbook commands to copy files to that test server and run commands there. When I try to reuse my playbook yml file to copy-to-and-run-commands-on any of my remote linux systems, I get this error:

> msg: Aborting, target uses selinux but python bindings (libselinux-python) aren’t installed!

From searching for this error, I see that others have encountered this and the recommended fix is to “sudo yum install -y libselinux-python”, however I don’t have sudo access on those systems. I’m just trying to copy data to/from and run programs remotely (which I can do manually with scp and ssh, and “automate” with bash). I was hoping that ansible playbooks would be a better way to organize this automation than just using bash scripts.

My question: is there a way to configure around this? i.e., edit my ansible.cfg or \*.yml files so that ansible-playbook will work without installing libselinux-python on each target node? Is there a way that I can install libselinux-python for just my user without using yum?

Or is ansible-playbook only intended for users who have root access to target servers?

Note: my target Linux systems are running Centos 6.6. and the selinux command getenforce responds with “Permissive.” I’m using ansible 1.9.4 on Mac OS X 10.10.5.

-Mike
