Author: | Afterburn |
---|
parameter | required | default | choices | comments |
---|---|---|---|---|
name | yes | name of package to install, upgrade or remove. | ||
recurse | no | no |
|
remove all not explicitly installed dependencies not required by other packages of the package to remove (added in Ansible 1.3) |
state | no |
|
desired state of the package. | |
update_cache | no | no |
|
update the package database first (pacman -Syy). |
# Install package foo
- pacman: name=foo state=installed
# Remove package foo
- pacman: name=foo state=absent
# Remove packages foo and bar
- pacman: name=foo,bar state=absent
# Recursively remove package baz
- pacman: name=baz state=absent recurse=yes
# Update the package database (pacman -Syy) and install bar (bar will be the updated if a newer version exists)
- pacman: name=bar, state=installed, update_cache=yes