Deploy packages to your hosts with Ansible and Cloudsmith
Ansible is an open-source IT automation tool for configuration management, application deployment, and infrastructure orchestration. Cloudsmith gives your Ansible playbooks a secure, centralized source of truth for every package they deploy - with fine-grained access control, entitlement tokens, and full audit logging built in.
How we support Ansible
Why teams integrate Cloudsmith with Ansible
Frequently asked questions
Use the apt_key and apt_repository modules for Debian-based systems, or the yum_repository module for RPM-based systems. Point them at your Cloudsmith repository URL with your entitlement token or API key embedded for authentication. You can then use the apt or yum module to install packages from that repository.
Cloudsmith supports entitlement tokens (embeddable in repository URLs), API key-based HTTP Basic Auth via service accounts, and token-based authentication. Service accounts are the recommended approach for Ansible automation - they can be scoped to specific repositories and revoked without affecting other integrations.
Yes. Cloudsmith repositories are multi-format and support Debian, RPM, and many other formats in the same repository. You can configure Ansible playbooks for both apt-based and yum-based hosts against the same Cloudsmith workspace.
Store your Cloudsmith API key or entitlement token in Ansible Vault, which encrypts secrets at rest and allows them to be committed safely alongside your playbooks. You can also use Cloudsmith service accounts with scoped tokens so that each automation context only has access to the repositories it needs.
Yes. Cloudsmith GPG-signs packages on upload, and the signing key is available via a dedicated URL in your repository. You reference this URL in the apt_key or yum_repository module configuration so Ansible verifies package integrity automatically before installation.
Yes. Cloudsmith upstream proxying lets you mirror and cache packages from public sources like PyPI, APT archives, or RPM repositories. Your Ansible playbooks resolve against Cloudsmith, protecting your deployments from upstream outages, unexpected removals, or supply chain compromises.
Every download from a Cloudsmith repository is recorded in the client log, capturing the package name, version, timestamp, and the credential used. This gives you a full record of every Ansible-driven deployment without requiring any additional tooling.
Yes. You can reference specific versions in your Ansible tasks and rely on Cloudsmith's package retention policies to ensure those versions remain available. Cloudsmith also supports package promotion across environments (dev, staging, production), so you can align exactly which version your playbooks consume at each stage.
Yes. Cloudsmith works with any environment that runs Ansible playbooks, including Ansible Tower and the Red Hat Ansible Automation Platform. Configure your repository credentials once in the platform's credential store and reference them in your playbooks as normal.
Full documentation including module examples for apt, yum, and yum_repository configuration is available at docs.cloudsmith.com. The docs cover public and private repository setup, GPG key configuration, and authentication options for both entitlement tokens and service accounts.