.. _apt_repository: apt_repository `````````````````````````````` .. versionadded:: 0.7 Manages apt repositores (such as for Debian/Ubuntu). .. raw:: html
parameter required default choices comments
repo yes
    The repository name/value
    state no present
    • present
    • absent
    The repository state
    .. raw:: html

    Add nginx stable repository from PPA

        apt_repository repo=ppa://nginx/stable
        

    Add specified repository into sources.

        apt_repository repo='deb http://archive.canonical.com/ubuntu hardy partner'
        


    .. raw:: html

    Notes

    This module works on Debian and Ubuntu only and requires apt-add-repository be available on destination server. To ensure this package is available use the apt module and install the python-software-properties package before using this module.

    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.