mirror of
https://github.com/konstruktoid/hardening.git
synced 2026-04-28 10:15:59 +03:00
[GH-ISSUE #86] [BUG] Missing dependency pexpcet #42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jfbette on GitHub (Aug 23, 2020).
Original GitHub issue: https://github.com/konstruktoid/hardening/issues/86
Originally assigned to: @konstruktoid on GitHub.
Describe the bug
I am trying to use your role on an Raspbian. I experienced the following error :
TASK [konstruktoid.hardening : initialize Debian aide] ****************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ImportError: No module named pexpect
fatal: [hostname]: FAILED! => {"changed": false, "msg": "Failed to import the required Python library (pexpect) on pi2's Python /usr/bin/python. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}
You use expect directive in the task "TASK [konstruktoid.hardening : initialize Debian aide]" but sometime the package python-pexpect is missing. Install it on dependencies and all will be fine. This is a requirement according to Ansible documentation
To Reproduce
Use raspbian system
System (lsb_release -a):
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
@konstruktoid commented on GitHub (Aug 24, 2020):
I believe this should be a bug in https://github.com/konstruktoid/ansible-role-hardening instead, but https://github.com/konstruktoid/ansible-role-hardening/blob/master/tasks/01_pre.yml#L69-L83 should have taken care of that dependency.
Are you able to install
python-pexpectmanually?@jfbette commented on GitHub (Aug 24, 2020):
Hi,
Sorry for the bug reported in the wrong repo.
In fact I used your role through the ansible-galaxy and it seems that it is an old source code as i don't see the installation of python-pexpect as you do in https://github.com/konstruktoid/ansible-role-hardening/blob/master/tasks/01_pre.yml#L69-L83.
I close the bug, sorry for the inconvenience
@konstruktoid commented on GitHub (Aug 24, 2020):
Good catch anyway @jfbette, I'll update the galaxy version soon.