.. _apt: apt `````````````````````````````` .. versionadded:: 0.0.2 Manages apt-packages (such as for Debian/Ubuntu). .. raw:: html
parameter | required | default | choices | comments |
---|---|---|---|---|
purge | no | no |
|
Will force purging of configuration files if the module state is set to absent . |
state | no | present |
|
Indicates the desired package state |
force | no | no |
|
If yes , force installs/removes. |
pkg | yes | A package name or package specifier with version, like foo or foo=1.0 |
||
update_cache | no | no |
|
Run the equivalent of apt-get update before the operation. Can be run as part of the package installation or as a seperate step |
default_release | no | Corresponds to the -t option for apt and sets pin priorities |
||
install_recommends | no | no |
|
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. |
Update repositories cache and install foo
package
apt pkg=foo update-cache=yes
Remove foo
package
apt pkg=foo state=removed
Install the 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-recomands
apt pkg=openjdk-6-jdk state=latest install-recommends=no