Configure collections from source management to run in a project
Automation controller supports project-specific Ansible collections in job runs.
If you specify a collections requirements file in the SCM at collections/requirements.yml, automation controller installs collections in that file in the implicit project synchronization before a job run.
Automation controller has a system-wide setting that enables collections to be dynamically downloaded from the collections/requirements.yml file for SCM projects. You can turn off this setting in the Job Settings screen from the navigation panel , by unchecking the Enable Collection(s) Download box.
Roles and collections are locally cached for performance reasons, and you select Update revision on launch in the project Options to ensure this:
If you also have collections installed in your execution environment, the collections specified in the project’s requirements.yml file will take precedence when running a job. This precedence applies regardless of the version of the collection. For example, if the collection specified in requirements.yml is older than the collection within the execution environment, the collection specified in requirements.yml is used.
Use collections with automation hub Copy linkLink copied!
Before automation controller can use automation hub as the default source for collections content, you must create an API token in the automation hub UI. You then specify this token in automation controller.
About this task Copy linkLink copied!
Use the following procedure to connect to private automation hub or automation hub, the only difference is which URL you specify.
Procedure Copy linkLink copied!
Manage playbooks manually Copy linkLink copied!
Manage Ansible playbooks and directories directly on the automation controller filesystem. This approach helps ensure proper file ownership and permissions when you cannot use source control.
Procedure Copy linkLink copied!
- Create one or more directories to store playbooks under the Project Base Path, for example,
/var/lib/awx/projects/. - Create or copy playbook files into the playbook directory.
- Ensure that the playbook directory and files are owned by the same UNIX user and group that the service runs as.
- Ensure that the permissions are appropriate for the playbook directories and files.
- If you have not added any Ansible Playbook directories to the base project path, an error message is displayed. Choose one of the following options to troubleshoot this error:
- Create the appropriate playbook directories and check out playbooks from your SCM.
- Copy playbooks into the appropriate playbook directories.