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