Ansible inventory

Some functionalities seem to rely on Ansible. E.g. Configure / Inventory Upload / Configure Cloud Connector runs a Playbook but fails because it could not resolve the Foreman Host:

[WARNING]:  * Failed to parse /tmp/d20230323-802194-1474bu8/inventory/hosts
with script plugin: problem running
/tmp/d20230323-802194-1474bu8/inventory/hosts --list ([Errno 13] Permission
denied: '/tmp/d20230323-802194-1474bu8/inventory/hosts')
[WARNING]:  * Failed to parse /tmp/d20230323-802194-1474bu8/inventory/hosts
with yaml plugin: YAML inventory has invalid structure, it should be a
dictionary, got: <class 'ansible.parsing.yaml.objects.AnsibleUnicode'>
[WARNING]:  * Failed to parse /tmp/d20230323-802194-1474bu8/inventory/hosts
with ini plugin: /tmp/d20230323-802194-1474bu8/inventory/hosts:2: Expected
key=value host variable assignment, got: /tmp/d20230323-802194-1474bu8/data
[WARNING]: Unable to parse /tmp/d20230323-802194-1474bu8/inventory/hosts as an
inventory source
[WARNING]: Unable to parse /tmp/d20230323-802194-1474bu8/inventory as an
inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
[WARNING]: Callback disabled by environment. Disabling the Foreman callback
PLAY [all] *********************************************************************
skipping: no hosts matched
PLAY RECAP *********************************************************************
Exit status: 0

ansible-inventory -i hosts --list


    "_meta": {
        "hostvars": {}
    "all": {
        "children": [

Is some additional configuration required to make this work?

What I have noticed that on my freshly installed Foreman, /usr/share/foreman-proxy/.ansible.cfg is a link to /etc/foreman-proxy/ansible.cfg which does not exist. Maybe this is not necessary in recent Ansible versions anymore?

This was way easier than it looked like. On a EL 8 Host /tmp is mounted noexec by default. Editing /etc/systemd/system/tmp.mount.d/tmp_options.conf and removing the noexec mount option made it work.

Figured out by temporarily setting Administer / Settings / Remote Execution / Cleanup working directories to No.

Concerning the dangling symlink I am going to open an issue.