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

8,396 views
Skip to first unread message

Zhenkai Jiang

unread,
Sep 19, 2014, 8:36:45 AM9/19/14
to ansible...@googlegroups.com


I was trying to use copy module which rely on  libselinux-python when selinux is enabled i think.

The weird thing is I have checked every single environment, they have already have latest libselinux-python installed.....

What can I do now?

Much appreciated.

Zhenkai Jiang

unread,
Sep 19, 2014, 8:37:43 AM9/19/14
to ansible...@googlegroups.com
some info:


sudo yum install -y libselinux-python
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Package libselinux-python-1.33.4-5.7.el5.x86_64 already installed and latest version
Nothing to do



$ ansible --version
ansible 1.7

Dick Davies

unread,
Sep 19, 2014, 12:12:45 PM9/19/14
to ansible list
Are you checking on the nodes you're trying to manage, or on the machine
that has ansible installed?

My guess is you need it on the nodes, so a task above the copy like

- name: install selinux bindings
yum: name=libselinux-python state=present

will push it out before you need to use it.
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/9d47e86d-9213-4d5c-ab42-22f458e00bd5%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Zhenkai Jiang

unread,
Sep 21, 2014, 10:15:18 PM9/21/14
to ansible...@googlegroups.com, di...@hellooperator.net
I was checking on the node. and yes, i have tried run playbook like this... But it's still complaining same error while using copy module.

Michael DeHaan

unread,
Sep 22, 2014, 1:18:25 PM9/22/14
to ansible...@googlegroups.com, di...@hellooperator.net
The copy module uses the exact same functions for this as other modules.

Could this be a machine where the bindings are yet not installed?



satheesh kumar

unread,
Apr 29, 2015, 12:25:06 PM4/29/15
to ansible...@googlegroups.com, di...@hellooperator.net
Same issue occured, and your solution solved me. thanks!

Joaquin Menchaca

unread,
Aug 13, 2018, 10:03:54 PM8/13/18
to Ansible Project
I had this issue Ansible 2.6.2 on Fedora 28 system using Ansible local connection.  Doing /usr/bin/dnf install -y libselinux-python fixed it for me.  Thanks.

I wonder why Ansible doesn't install needed prereq?

Jonathan Lozada De La Matta

unread,
Aug 13, 2018, 10:09:11 PM8/13/18
to ansible...@googlegroups.com
My understanding its because not all systems have selinux enabled so having it as a dependency its not a good idea. Although if you run into this issue the output tells you what it needs.

On Mon, Aug 13, 2018 at 10:04 PM Joaquin Menchaca <joaqu...@gmail.com> wrote:
I had this issue Ansible 2.6.2 on Fedora 28 system using Ansible local connection.  Doing /usr/bin/dnf install -y libselinux-python fixed it for me.  Thanks.

I wonder why Ansible doesn't install needed prereq?

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--

Jonathan lozada de la matta

AUTOMATION CONSULTANT - AUTOMATION PRACTICE

Red Hat Consulting Services

jloz...@redhat.com   



 

Reply all
Reply to author
Forward
0 new messages