-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Target IG by hosts #11943
Comments
This might be something for us to consider in the future. In the meantime I think you could:
I hope this is helpful |
So, instead of running job in multiple instance groups where IG is based on host inventory hostvar we must manually create workflow for each job template and in each workflow we must add same job template but with different inventory value (IG is set on inventory level). May be other solutions exists? |
I see some overlap with #2941, in particular
I'm open to discussing solutions where the framing is that workflow (or other feature) parameterization is insufficient for the purpose. Right now, I'm also very interested in re-working the design of smart inventory and sliced job features to be something more flexible, general, and coherent. Sliced JobsWe have 1 input to JTs to make them into a sliced job, which is the Smart InventoryThis feature produces 1 subset of hosts based on a pool of hosts. You have the problem of breaking up the pool of hosts from 1 inventory into multiple slices, and running with different related prompts or parameters. This process of (pool of hosts) --> (subset) also seems narrow to me. In Ansible core, a "host pattern" defines a subset of hosts to target, but that's too limited and not what most users want to get out of the feature. The ideal version of this feature might be a better analog to Ansible's |
As for me - looks great. Regarding smart inventory - we use that only for simplest job templates, because smart invs does not support group_vars (and groups from main inventory as well) as per issue: #1999. If the proposed solutions will cover following workflow: |
With recent introduction of constructed inventory it seems that things are moving in the right direction. I.e. now we have host/group vars from constructed (thats a huge improvement over smart inventory) plus custom groups with own vars (which can be set from git). But still instance group setting from host vars (or from static inventory) feature is seems missing (or unclear how to configure). May be @AlanCoding cad shed some light on it? Tested with following: |
ISSUE TYPE
SUMMARY
Hello,
I have hundred of server on one inventory and i want to launch a job template on all theses servers. But all server can't be joined by the same IG due to DMZ. So actually, i have to split my inventory into several inventory and associating specific IG (with severs in right DMZ location) to all inventory and i have to launch the same template several times on all inventory.
Could it be possible to specify the IG to use at host level in the inventory by adding custom var for host and fail back to default IG in case if this var is not set.
all:
children:
custom_group:
hosts:
server1:
instance_group: dmz1_ig
server2:
instance_group: dmz2_ig
server3:
Thanks
The text was updated successfully, but these errors were encountered: