Packagecloud logo

Introducing the packagecloud ansible role

tl;dr

We’ve just released a packagecloud ansible role for installing packagecloud.io repositories!

 

Usage

Here is an example using this role to install a public and private repository on all of our hosts.

Note: This role only supports Debian and RedHat ansible os families.

--
hosts: all
roles:
  - { role: capotej.packagecloud, repository: capotej/apt-cacher-ng, os: ubuntu, version: trusty }
  - { role: capotej.packagecloud, repository: corp/private-repo, os: centos, version: 6, master_token: "{{ encrypted_master_token_from_vault }}" }

Check out our OS/Distribution docs to find the right os and version strings to use for your distribution.

 

How it works

The role is basically a port of the manual repository install instructions into idempotent ansible tasks. The goal is to provide a slightly better experience for ansible users than merely using our install scripts inside of a shell module.

 

Contributions

We’ve only just started using ansible ourselves, so we’re eager to receive any pull requests to help improve the role for the community.

Support

As usual, you can email support or join our new packagecloud-users slack to get help with any questions or problems you may have.

 

The Future

Because this is a simple ansible role that only covers the common cases, it’s not as robust as we’d like it to be. Development of a full blown ansible-module (and the preceeding packagecloud python library) is on our roadmap.

You might also like other posts...