ANSIBLE.APT(3)

NAME
apt - Manages apt-packages

DESCRIPTION

Manages apt packages (such as for Debian/Ubuntu).

OPTIONS

default_release
    Corresponds to the -t option for apt and sets pin priorities

force
    If yes, force installs/removes. Choices: yes,no. (default: no)

install_recommends
    Corresponds to the --no-install-recommends option for apt, default behavior works as apt's default behavior, no does not install recommended packages. Suggested packages are never installed. Choices: yes,no. (default: yes)

pkg A package name or package specifier with version, like foo or foo=1.0(required)

purge
    Will force purging of configuration files if the module state is set to absent. Choices: yes,no. (default: no)

state
    Indicates the desired package state Choices: latest,absent,present. (default: present)

update_cache
    Run the equivalent of apt-get update before the operation. Can be run as part of the package installation or as a separate step Choices: yes,no. (default: no)

upgrade
    If yes, performs an aptitude safe-upgrade. If dist, performs an apt-get dist-upgrade. Note: This does not upgrade a specific package, use state=latest for that. Choices: yes,dist.(Added in Ansible version 1.1.)

EXAMPLES

Update repositories cache and install foo package
apt: pkg=foo update_cache=yes

Remove foo package
apt: pkg=foo state=removed

Install the package foo
apt: pkg=foo state=installed

Install the version '1.00' of package foo
apt: pkg=foo=1.00 state=installed

Update the repository cache and update package ngnix to latest version using default release squeeze-backport
apt: pkg=nginx state=latest default_release=squeeze-backports update_cache=yes

Install latest version of openjdk-6-jdk ignoring install-reccomends
apt: pkg=openjdk-6-jdk state=latest install_recommends=no

Update all packages to the latest version
apt: upgrade=dist
None

AUTHOR
Matthew Williams

SEE ALSO
ansible(1), http://ansible.github.com/modules.html#apt