Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[demo] API side changes to allow running jobs against multiple inventories #13214

Closed
wants to merge 4 commits into from

Conversation

AlanCoding
Copy link
Member

@AlanCoding AlanCoding commented Nov 18, 2022

SUMMARY

Allows running a job template against multiple inventories. Still need:

  • a related runner patch is necessary for this to run - Fix bugs in streaming code you hit if using more than 1 inventory ansible-runner#1166
  • RBAC, creating one of this inventory type constitutes a delegation of "use_role" of source inventories
  • UI updates to make this work
  • some API work for back-links of stuff
    • show multi-inventory jobs in historical jobs for a constituent inventory
    • show a host list for the "multiple" kind of inventory combining the source inventories
    • some minor adjustments of related links and stuff

This is offered as an option to solve #371 and #1999, since users can simply use host patterns in their playbooks to target the hosts they want.

This is also a counter-point to more complex solutions to #371 that still involve loading the full host set, per discussions with @nitzmahone @sivel and others. If a solution results in Ansible core loading all of the source inventory hosts, then it would appear inferior to this (simple) solution in every way I can think of. This multi-inventory approach is a good fallback if we're not able to implement the other proposals, but I also hope that it helps to cull obvious design dead-ends before we waste too much time on them.

Screenshot from 2022-11-18 14-21-32

This example runs on an execution node, where "alan" and "steve" are hosts from two separate inventories.

ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • API

@AlanCoding
Copy link
Member Author

closing to put up another version with a more complete PoC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant