Going forward, we can maintain our specific collection requirements in
requirements.yml.
Signed-off-by: Zack Cerza <zack@redhat.com>
# vscode
.vscode/
+
+.ansible
--- /dev/null
+[defaults]
+# Store collections in this directory. This is to avoid potential compatibility
+# issues between differently-versioned ansible processes.
+collections_path = .ansible
# Check to make sure requirements are met
./$VENV/bin/pip check
+
+# Install ansible collections
+./$VENV/bin/ansible-galaxy install -r requirements.yml
--- /dev/null
+---
+collections:
+ - amazon.aws
+ - name: ansible.netcommon
+ version: "<6.0.0" # 6.0 requires ansible-core >= 2.14
+ - ansible.posix
+ - name: ansible.utils
+ version: "<3.0.0" # 3.0 requires ansible-core >= 2.14
+ - community.docker
+ - community.general
+ - community.postgresql
+
import re
import requests
import os
+import pathlib
import pexpect
import yaml
import shutil
environ['ANSIBLE_FAILURE_LOG'] = self.failure_log.name
environ['ANSIBLE_ROLES_PATH'] = "%s/roles" % self.repo_path
environ['ANSIBLE_NOCOLOR'] = "1"
+ # Store collections in <repo root>/.ansible/
+ # This is the same path used in <repo root>/ansible.cfg
+ environ['ANSIBLE_COLLECTIONS_PATH'] = str(
+ pathlib.Path(__file__).parents[2] / ".ansible")
args = self._build_args()
command = ' '.join(args)
log.debug("Running %s", command)