-
Notifications
You must be signed in to change notification settings - Fork 31
Description
It's nice to benefit from the infra.controller abstraction over the ansible.controller collection, but I'm reaching a density in my filetree_read source where a loop notion becomes necessary.
I have enough object to create that I'd need a mecanism like:
controller_organizations:
- name: "{{ item }}"
instance_groups: "{{ common_instance_groups }}"
default_environment: "{{ common_default_execution_environment }}"
galaxy_credentials: "{{ common_galaxy_credentials }}"
loop:
- org_list
rather than to have to duplicate the block 50 times over.
But I don't see how this would be possible in the filetree_read source variables.
Right now it seems that my only option to be able to loop over list of items would be to go back a layer down and start to use ansible.controller.
Some controllers like controller_roles have this use case kind of embedded as it can be applied to both team and teams list, organization and organizations list, etc.
Maybe adding this possibility to all controller object could be a solution, so that a list of names could be used as an entry for any type of object?