kyl191 / ansible-role-openvpn

Ansible Playbook for OpenVPN on CentOS/Fedora/RHEL clones
MIT License
246 stars 219 forks source link

LDAP compile - commands not found #174

Open stefanDeveloper opened 2 years ago

stefanDeveloper commented 2 years ago

What happened:

Currently, I installed the role with an LDAP configuration. However, during the compiling in compile_ldap_plugin.yml it results in:

{
    "changed": true,
    "cmd": "autoconf\nautoheader\n./configure --prefix=/usr/lib64/openvpn/plugin --with-openvpn=/sbin/openvpn CFLAGS=\"-fPIC\" OBJCFLAGS=\"-std=gnu11\"\nmake\nmake install\n",
    "delta": "0:00:00.050354",
    "end": "2022-01-11 09:39:29.705113",
    "msg": "non-zero return code",
    "rc": 127,
    "start": "2022-01-11 09:39:29.654759",
    "stderr_lines": [
        "/bin/sh: autoconf: command not found",
        "/bin/sh: line 1: autoheader: command not found",
        "./configure: line 473: sed: command not found",
        "./configure: line 472: expr: command not found",
        "./configure: line 473: sed: command not found",
        "./configure: line 487: sed: command not found",
        ": error: cannot create .lineno; rerun with a POSIX shell",
        "/bin/sh: line 3: make: command not found",
        "/bin/sh: line 4: make: command not found"
    ],
    "stdout": "",
    "stdout_lines": []
}

Are there any ideas why I ran into that problem?

What you expected to happen:

Compilation should run through

Anything else we need to know?:

I checked the $PATH variable and I don't see any misconfiguration: /home/centos/.local/bin:/home/centos/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin

System

CentOS Linux release 8.3.2011

kyl191 commented 2 years ago

I have no clue what is going on there. It certainly looks like all the executables should be available.

Try running ansible -m setup against the remote machine and check the ansible_env['PATH'] value?

stefanDeveloper commented 2 years ago

Seems good to me:

ansible_env['PATH']

"ansible_env": {
    "PATH": "/home/centos/.local/bin:/home/centos/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin"
}

I tested it again on a fresh system, resulting in the same exception. Can I investigate the issue and create merge request with a possible fix?