ansible.apt_repository(3) - Linux man page
Name
apt_repository - Manages apt repositores
Description
Manages apt repositories (such as for Debian/Ubuntu).
Options
- repo
The repository name/value(required)
state
The repository state Choices: present,absent. (default: present)."
Notes
This module works on Debian and Ubuntu only and requires apt-add-repository be available on the destination server. To ensure this package is available use the apt module and install the python-software-properties package before using this module.
This module cannot be used on Debian Squeeze (Version 6) as there is no add-apt-repository in python-software-properties
A bug in apt-add-repository always adds deb and deb-src types for repositories (see the issue on Launchpad https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/987264), if a repo doesn't have source information (eg MongoDB repo from 10gen) the system will fail while updating repositories.
Examples
Add nginx stable repository from PPA
apt_repository: repo=ppa:nginx/stableAdd specified repository into sources.
apt_repository: repo='deb http://archive.canonical.com/ubuntu hardy partner'
Author
Matt Wright
See Also
ansible(1), http://ansible.github.com/modules.html#apt-repository