ansible / ansible-runner

A tool and python library that helps when interfacing with Ansible directly or as part of another system whether that be through a container image interface, as a standalone tool, or as a Python module that can be imported. The goal is to provide a stable and consistent interface abstraction to Ansible.
Other
957 stars 352 forks source link

dict provided inventory not read in containerized mode due to incorrect path set #1303

Closed christophert closed 1 year ago

christophert commented 1 year ago

When inventory is provided via a Python dict, the output is not written to the correct path in the directory structure. This snippet: https://github.com/ansible/ansible-runner/blob/58b7ff5414d386e266af5e33ba16123ec2ed8f22/src/ansible_runner/utils/__init__.py#L234 writes the content to inventory/hosts.json while the runner looks for the inventory in inventory/hosts which is set (for containerized mode) in https://github.com/ansible/ansible-runner/blob/58b7ff5414d386e266af5e33ba16123ec2ed8f22/src/ansible_runner/config/runner.py#L163

Shrews commented 1 year ago

I've been digging in to the inventory related code recently and can confirm this is definitely a thing that has been broken for a while.

Shrews commented 1 year ago

Fixed by #1304