pacman - Manage packages with pacman

Author:Afterburn

Synopsis

New in version 1.0.

Manage packages with the pacman package manager, which is used by Arch Linux and its variants.

Options

parameter required default choices comments
name no
    Name of the package to install, upgrade, or remove.
    recurse no no
    • yes
    • no
    When removing a package, also remove its dependencies, provided that they are not required by other packages and were not explicitly installed by a user. (added in Ansible 1.3)
    state no present
    • present
    • absent
    Desired state of the package.
    update_cache no no
    • yes
    • no
    Whether or not to refresh the master package lists. This can be run as part of a package installation or as a separate step.

    Examples


    # Install package foo
    - pacman: name=foo state=present
    
    # Remove packages foo and bar
    - pacman: name=foo,bar state=absent
    
    # Recursively remove package baz
    - pacman: name=baz state=absent recurse=yes
    
    # Run the equivalent of "pacman -Syy" as a separate step
    - pacman: update_cache=yes
    

    Table Of Contents

    Previous topic

    opkg - Package manager for OpenWrt

    Next topic

    pip - Manages Python library dependencies.