Description of problem: ``` 14:58:19.706 utils.py DEBUG TASK [copy] ***************************************************************************************************************************************************************** 14:58:20.079 utils.py DEBUG fatal: [localhost]: FAILED! => {"changed": false, "checksum": "4cceffc67fd1c2f2443b143224b437931cff03db", "msg": "Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!"} ``` Should ansible just `Requires: python3-libselinux`? Should I open an issue upstream? Version-Release number of selected component (if applicable): ansible-2.7.9-1.fc29.noarch
Well, I see the linked ansible-bender issue even with python3-libselinux-2.8-6.fc29.x86_64 installed. Also, I don't see any problem if I run a simple playbook directly (without ansible-bender), so do you Tomas have a simple reproducer playbook?
Ah, I think you can scratch the previous comment as I'm running the bender in virtualenv, so the installed rpm package is irrelevant.
Just for the record, it fails on a simple copy task: https://github.com/ansible-community/ansible-bender/blob/master/ansible_bender/core.py#L317 (bender generates that playbook for sake of expanding variables) I also forgot to say that after ansible prints the error message I posted in the original post, it freezes for like 3 minutes which is the reason I opened this bug and Jiri opened the bug on ansible-bender linked above.
huh, yeah, a freeze for minutes after printing that error seems like a bug/issue. Can you perhaps strace it or the like and see where it's hanging? > Should ansible just `Requires: python3-libselinux`? Should I open an issue upstream? No, we have resisted such requires in the ansible package for a number of reasons (I guess I should make this a template I repeat it so often. ;) * This would only help you in the case that your target host is localhost/the management host. Not any other target hosts. If you have to handle that case anyhow, why not just do the same thing for your target host (check for and install the thing you need) * This locks people into installing/using things on their target host that they perhaps do not want (perhaps they have selinux disabled, or perhaps installing this package could cause another application to do selinux things,etc) * There's no clear line, if we start adding things because we like/use them, folks will expect us to do that for everything and then ansible wouldn't even be installable. :) * Each requires increases the footprint, for things people may never use (if your management host isn't even managed by ansible, this does no good). The hang may well be good to file upstream...especially if you can see where it's hanging...
Screw these heisenbugs: I can't reproduce the freeze anymore: tried a clean VM and my dirty workstation and the freeze happened on neither. > This would only help you in the case that your target host is localhost/the management host. You're right, I always forget about this since I use ansible locally most of the time. Thanks, Kevin, let's close. We'll report the freeze upstream if we reproduce it.