Types of Ansible Repositories

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

There are 3 types of repositories, as follows:

Ansible Local Repositories

Ansible Local Repositories are physical, locally managed repositories into which you can deploy artifacts. Using local repositories, Artifactory gives you a central location to store your internal binaries. Through repository replication, you can even share binaries with teams that are located in remote locations.

A local Ansible repository is where you deploy and host your internal Ansible collections. Ansible registry can host collections, which are your Ansible repositories. Once your collections are hosted, you can exercise fine-grained access control, and share them across your organization through replication or by being proxied by repositories in other Artifactory instances.

Ansible Remote Repositories

Ansible Remote Repositories in Artifactory act as proxies for repositories on remote servers. Artifactory first checks its local cache for the requested package. If the package is not found in the cache, Artifactory retrieves it from the remote repository via the Internet. Once retrieved, the file is cached locally in Artifactory, making it available for any future requests without needing an internet connection. Importantly, only the requested package is cached, not the entire remote repository.

Artifactory supports proxying remote Ansible registries through remote repositories. A Remote repository in Artifactory serves as a caching proxy for a registry managed at a remote URL, the default is https://galaxy.ansible.com, but it can be any other registry or even an Ansible repository managed at a remote site by another instance of Artifactory.

Resources that are requested from a remote repository are cached on demand. You can remove downloaded resources from the remote repository cache, however, you can not manually push resources to a remote repository.

Ansible Virtual Repositories

To simplify access to different repositories, Artifactory allows you to define a virtual repository, which is a collection of local, remote, and other virtual repositories accessed through a single logical URL.

A virtual repository hides the access details of the underlying repositories, letting users work with a single, well-known URL. The underlying participating repositories and their access rules may be changed without requiring any client-side changes.

Artifactory supports virtual Ansible repositories. A Virtual repository aggregates collections from local and remote repositories that are included in the virtual repositories. This allows you to access collections hosted locally on local Ansible repositories, and remote collections and roles proxied by remote Ansible repositories, and access all of them from a single URL defined for the virtual repository.

Virtual repositories can be very useful since users will continue to work with them. Only the admin can manage the included repositories, and replace the default deployment target, while the changes will be transparent to the users.