From d785145c59faf44a06d98a662c1602f417a6f21a Mon Sep 17 00:00:00 2001 From: chris meyers Date: Fri, 26 Jul 2019 13:10:16 -0400 Subject: [PATCH] force proj sync when collections/requirements.yml * Similar to roles/requirements.yml sync optimization logic. --- awx/main/tasks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index aa08aa037d..c2d26b53f3 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -1649,6 +1649,11 @@ class RunJob(BaseTask): logger.debug('Running project sync for {} because of galaxy role requirements.'.format(job.log_format)) needs_sync = True + galaxy_collections_req_path = os.path.join(project_path, 'collections', 'requirements.yml') + if os.path.exists(galaxy_collections_req_path): + logger.debug('Running project sync for {} because of galaxy collections requirements.'.format(job.log_format)) + needs_sync = True + if needs_sync: pu_ig = job.instance_group pu_en = job.execution_node