|name | |Name or list of names of the package(s) to install or upgrade.|
|state |**present**, latest |Desired state of the package, 'present' skips operations if the package is already installed.|
|upgrade |yes, **no** |Whether or not to upgrade whole system.|
|use |**auto**, yay, pacaur, trizen, pikaur, aurman, makepkg |The helper to use, 'auto' uses the first known helper found and makepkg as a fallback.|
|aur_only |yes, **no** |Limit operation to the AUR. Compatible with yay, pacaur, aurman and trizen.|
|skip_pgp_check |yes, **no** |Only valid with makepkg. Skip PGP signatures verification of source file, useful when installing packages without GnuPG properly configured.|
|ignore_arch |yes, **no** |Only valid with makepkg. Ignore a missing or incomplete arch field, useful when the PKGBUILD does not have the arch=('yourarch') field.|
* The scope of this module is installation and update from the AUR; for package removal or for updates from the repositories, it is recommended to use the official *pacman* module.
* The *--needed* parameter of the helper is systematically used, it means if a package is up-to-date, it is not built and reinstalled.
### Create the "aur_builder" user
While Ansible expects to SSH as root, makepkg or AUR helpers do not allow executing operations as root, they fail with "you cannot perform this operation as root". It is therefore recommended to create a user, which is non-root but has no need for password with pacman in sudoers, let's call it *aur_builder*.
This user can be created in Ansible with the following actions: