An Ansible module for installing AUR packages via the yay AUR helper.
This assumes your target node already has yay and its dependecies installed.
yay
file into your global Ansible library (usually
/usr/share/ansible
) or into the ./library
folder alongside your
top-level playbookPretty much identical to the pacman module. Note that package
status, removal, the corresponding pacman
commands are used (-Q
, -R
,
respectively).
parameter | required | default | choices | description |
---|---|---|---|---|
name | no | Name of the AUR package to install. | ||
recurse | no | no | yes/no | Whether to recursively remove packages. See pacman module docs. |
state | no | no | absent/present/latest | Whether the package needs to be installed or updated. |
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. |
upgrade | no | no | yes/no | Whether or not to upgrade the whole systemd. |
# Install package foo
- yay: name=foo state=present
# Ensure package fuzz is installed and up-to-date
- yay: name=fuzz state=latest
# Remove packages foo and bar
- yay: name=foo,bar state=absent
# Recursively remove package baz
- yay: name=baz state=absent recurse=yes
# Effectively run yay -Syu
- yay: update_cache=yes upgrade=yes