-
Feature Request
-
Resolution: Unresolved
-
Normal
-
None
-
2.4
-
False
-
-
False
The role api code uses the lookup_organization attribute for the team AND the job_template. We are unable to configure a role if either the team OR the job_template exists in different organizations.
Below, I am attempting to add a job_template (which resides in DV) to the team (which resides in Default). This does not work. It expects the team to reside in the same organization as the job_template.
- name: Add job_template in organization DV to team in organization Default role: team: Example Team role: execute job_template: Example Job Template lookup_organization: DV # I would expect this attribute to be used for lookup ONLY for the job_template. state: present
The awx code below shows how the lookup_organization attribute is being used for both the team and the job_template (or resource).
for key in ('user', 'team'): if key in resources: if key == 'user': lookup_data_populated = {} else: lookup_data_populated = lookup_data #<-- This is using the lookup_organization attribute on the team. I WOULD NOT EXPECT THIS
for key, value in resources.items(): for resource in value: if key in resources: if key == 'organizations': lookup_data_populated = {} else: lookup_data_populated = lookup_data #<-- THIS IS USING THE lookup_organization ATTRIBUTE ON THE job_template WHICH I WOULD EXPECT