EDA UI how to set inventory

Hello,

For test purpose, an EDA instance is deployed in KinD.
What I don’t understand with EDA UI is how do you add an inventory for rulebook? I don’t find anywhere to set an inventory.
I create a rulebook activations with the hello_events.yml, but it failed

2023-12-15 14:05:41,001 - ansible_rulebook.cli - ERROR - Terminating Rule Say Hello has an action run_playbook which needs inventory to be defined

Hi,

I haven’t tried EDA so far, but looking at documentation, run_playbook action doesn’t seem to support passing an inventory indeed.

Now similar to ansible-playbook, ansible-rulebook seems to let you specify inventories on command line:

-i INVENTORY, --inventory INVENTORY
Inventory can be a file or a directory

As you haven’t shown the command you’re running, I can’t tell whether there is an issue or parameter simply is not there.

Hope this helps !

There is no command line. It’s with EDA UI.

I don’t know anything about an EDA UI, but I just found this user documentation, which hints us on this UI being part of AAP (which I never used).

Looking at it, I understand a rulebook activation needs a project to be defined, which would point to a repository containing rulebooks. Then rulebooks would be run in a decision environment, which is basically a container image.

Perhaps you have to build a custom image containing your inventories, though it would seem needlessly complex and misleading IMO, but if you can somehow specify the ansible-rulebook command to run from this image, you probably could add the --inventory parameter linked earlier from ansible-rulebook documentation, and point to your inventories in the same image, a volume you might be able to mount or better, the project repository. Just some thoughts.

Hi @cha eda-server doesn’t have support for standalone ansible-rulebook executions with run_playbook action, it’s intended to be used with AWX or AAP Controller (workflow and job templates), where there is no need to pass any inventory as it is something configured in the AWX side.

4 Likes