| Author: | Alexander Saltanov |
|---|
| parameter | required | default | choices | comments |
|---|---|---|---|---|
| repo | yes | none | A source string for the repository. | |
| state | no | present |
|
A source string state. |
| update_cache | no | yes |
|
Run the equivalent of apt-get update if has changed. |
Note
Requires python-apt
Note
Requires python-pycurl
# Add specified repository into sources list.
apt_repository: repo='deb http://archive.canonical.com/ubuntu hardy partner' state=present
# Add source repository into sources list.
apt_repository: repo='deb-src http://archive.canonical.com/ubuntu hardy partner' state=present
# Remove specified repository from sources list.
apt_repository: repo='deb http://archive.canonical.com/ubuntu hardy partner' state=absent
# On Ubuntu target: add nginx stable repository from PPA and install its signing key.
# On Debian target: adding PPA is not available, so it will fail immediately.
apt_repository: repo='ppa:nginx/stable'
Note
This module works on Debian and Ubuntu and requires python-apt and python-pycurl packages.
Note
This module supports Debian Squeeze (version 6) as well as its successors.
Note
This module treats Debian and Ubuntu distributions separately. So PPA could be installed only on Ubuntu machines.