Skip to content

Commit 0eaf56d

Browse files
authored
Add support for tower requirements (#140)
1 parent a46916d commit 0eaf56d

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/ansible_compat/runtime.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,16 @@ def prepare_environment(
308308
required_collections = {}
309309

310310
if not offline:
311-
self.install_requirements("requirements.yml", retry=retry)
311+
# first one is standard for collection layout repos and the last two
312+
# are part of Tower specification
313+
# https://docs.ansible.com/ansible-tower/latest/html/userguide/projects.html#ansible-galaxy-support
314+
# https://docs.ansible.com/ansible-tower/latest/html/userguide/projects.html#collections-support
315+
for req_file in [
316+
"requirements.yml",
317+
"roles/requirements.yml",
318+
"collections/requirements.yml",
319+
]:
320+
self.install_requirements(req_file, retry=retry)
312321

313322
destination = f"{self.cache_dir}/collections" if self.cache_dir else None
314323
for name, min_version in required_collections.items():

0 commit comments

Comments
 (0)