Issue with community.general.make module

I have a RHEL 7 server that is running Apache Guacamole. I had a playbook that we turned into a role that’s part of an internal collection that used to work, but since I have switched it to use community.general.make instead of the old make module, the compile using make stopped working.

Here’s the call in the role/task:

  • name: Install | Compiling Guacamole Server # noqa 503
    community.general.make:
    chdir: “{{ guacamole_src_dir + ‘/guacamole-server-’ + guacamole_version }}”
    register: _guacamole_server_compiled
    when: _guacamole_config_server_build[‘changed’]

And when that play is executed, I get the following error:

Traceback (most recent call last):
File “/home/sdsuser/.ansible/tmp/ansible-tmp-1686592847.1340995-385-86720942975452/AnsiballZ_make.py”, line 107, in
_ansiballz_main()
File “/home/sdsuser/.ansible/tmp/ansible-tmp-1686592847.1340995-385-86720942975452/AnsiballZ_make.py”, line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File “/home/sdsuser/.ansible/tmp/ansible-tmp-1686592847.1340995-385-86720942975452/AnsiballZ_make.py”, line 48, in invoke_module
run_name=‘main’, alter_sys=True)
File “/usr/lib64/python2.7/runpy.py”, line 176, in run_module
fname, loader, pkg_name)
File “/usr/lib64/python2.7/runpy.py”, line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File “/usr/lib64/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/tmp/ansible_community.general.make_payload_ZqrE8r/ansible_community.general.make_payload.zip/ansible_collections/community/general/plugins/modules/make.py”, line 233, in
File “/tmp/ansible_community.general.make_payload_ZqrE8r/ansible_community.general.make_payload.zip/ansible_collections/community/general/plugins/modules/make.py”, line 228, in main
File “/usr/lib64/python2.7/pipes.py”, line 269, in quote
for c in file:
TypeError: ‘NoneType’ object is not iterable

Any thoughts on what could be wrong?

Thanks,
Harry

I have a RHEL 7 server that is running Apache Guacamole. I had a playbook that we turned into a role that's part of an internal collection that used to work, but since I have switched it to use community.general.make instead of the old make module, the compile using make stopped working.

You've a few different issues. One is that you *need* python 3 to run
contemporary versions of ansible. Another is that ansible went through
a very confusing split a few years back. If you're installing ansible
on the RHEL 7 server itself, you need to *not* use the old, published
"ansible" package, which predates the split, and use a contemporary
"ansible-core" setup.

Unfortunately, the new ansible is called "ansible-core", and the
package called "ansible" now isn't. It's a ginormous bundle of more
than 100 third party modules, installed as "ansible_collections", and
should have been labeled "ansible_collections. No one publishes
ansible-core as an RPM for RHEL less than RHEL 8. I used to,
personally,

To get a more contempory version of ansible running on RHEL 7:

     sudo yum install python3 python3-pip
      pip3 install --user ansible-core
     ansible --version

It won't be ideal, the python3 on RHEL 7 is increasingly out of date,
and the assemblage of dependencies for ansible-core continues to grow,
so more and more stuff winds up in $HOME/.local/ . I used to publish
RPM building tools for RHEL 7, but gave up when ansible-core started
require python 3.11 for current releases.

Nico Kadel-Garcia