ansible-runner icon indicating copy to clipboard operation
ansible-runner copied to clipboard

Cannot specify inventory when using ansible-runner with podman container (process-isolation) and --limit

Open alice-rc opened this issue 1 year ago • 4 comments

Specifying the inventory when combining the options of --process-isolation and --limit will ALWAYS use the inventory file <private_data_dir>/inventory/hosts.

ansible-runner run --playbook test.yml --limit host1 [--inventory <FQPATH>] . works no matter where the inventory file is specified (in ansible.cfg or using --inventory on the CLI) ansible-runner run --playbook test.yml --process-isolation --limit host1 [--inventory <FQPATH> | --inventory <RELPATH> ] . fails no matter where the inventory file is specified (in ansible.cfg or using --inventory on the CLI) It always shows: inventory: ('/runner/inventory/hosts',) ERROR! Specified hosts and/or --limit does not match any hosts

While there might be a way to work around that with an INI version of a static inventory file, if you instead put a dynamic inventory config at <private_data_dir>/inventory/hosts.yml it will not work.

alice-rc avatar Aug 11 '22 21:08 alice-rc