Created Enable multiverse on Ubuntu (markdown)

lorin 2012-10-30 09:38:30 -07:00
parent 08fdf14a5e
commit 0e2ac99b6c

@ -0,0 +1,22 @@
Some Ubuntu packages require the "multiverse" component (e.g., ec2-api-tools). Here's a simple playbook that enables the component and installs the ec2-api-tools package.
Note that this uses the Ubuntu package archive hosted on EC2, so it may only work on instances running inside of EC2.
- hosts: all
sudo: True
gather_facts: True
tasks:
- name: ensure multiverse component is enabled
apt_repository: repo="deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ $item multiverse"
with_items:
- ${ansible_distribution_release}
- ${ansible_distribution_release}-updates
- ${ansible_distribution_release}-security
- name: ensure EC2 API tools are installed
apt: pkg=ec2-api-tools update-cache=yes
Some notes about this:
* You need to gather_facts set to True so that the ansible_distribution_release variable gets set. This variable contains the codename of the Ubuntu distribution (e.g., precise for 12.04).
* You need to set update-cache=yes when installing the first package from multiverse, so that apt retrieves the package information from the multiverse before trying to install the package. This is equivalent to doing an "apt-get update".