Bug 979892 - ansible package should depend on libselinux-python
ansible package should depend on libselinux-python
Status: CLOSED NOTABUG
Product: Fedora EPEL
Classification: Fedora
Component: ansible (Show other bugs)
el6
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tim Bielawa
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-01 01:57 EDT by Jamie Nguyen
Modified: 2014-01-21 18:24 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-02 12:35:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jamie Nguyen 2013-07-01 01:57:00 EDT
ansible-1.2-1-el6.x86_64.rpm

The selinux ansible module complains and the command fails:
  "msg=python-selinux required for this module".

Please add libselinux-python to the Requires of this package.

I believe this also affects Fedora 18 and 19.
Comment 1 seth vidal 2013-07-01 09:04:20 EDT
That message is coming from the client where the operation is being run not from the system where you are executing ansible.

So the message is telling you that you must install python-selinux on the remote system before you execute that particular action.
Comment 2 Jamie Nguyen 2013-07-02 01:15:58 EDT
Oops, yes I forgot to mention I was running a "--connection=local" on this occasion, so the message is in fact coming from the system where I'm running ansible.

But I can see how it would be silly to make it a Requires... However, the error message could probably be improved to be more useful on Fedora. Would you consider applying this patch?:

--- a/library/system/selinux
+++ b/library/system/selinux
@@ -59,7 +59,7 @@ import sys
 try:
     import selinux
 except ImportError:
-    print json.dumps(failed=True, msg='python-selinux required for this module')
+    print json.dumps(failed=True, msg='libselinux-python package required for this module')
     sys.exit(1)
 
 # getter subroutines
Comment 3 seth vidal 2013-07-02 08:59:25 EDT
I don't think carrying local patches to improve the error messages for every module with a requirement is going to be very sustainable.

Perhaps ask about enhancing these messages in upstream ansible?
Comment 4 Jamie Nguyen 2013-07-02 12:35:55 EDT
(In reply to seth vidal from comment #3)
> I don't think carrying local patches to improve the error messages for every
> module with a requirement is going to be very sustainable.

I agree that would be a less than optimal use of time...


> Perhaps ask about enhancing these messages in upstream ansible?

Perhaps I'll do that. Looks like python-selinux is the Debian package name, so perhaps the error message can include both terms (which then covers almost the entire userbase).

Note You need to log in before you can comment on or make changes to this bug.