ansible-aur is an ansible module to use some aur helpers.
Currently, we support the following AUR helpers:
Add as a submodule in your playbook:
mkdir -p library/external_modules
git submodule add git://github.com/cdown/ansible-aur.git library/external_modules/ansible-aur
Link the binary to the base of library/
:
ln -s external_modules/ansible-aur/aur library/aur
Use it in a task, as in the following examples:
# Install (using pacaur)
- aur: name=yturl
become:yes
become_user: some_user_that_has_nopasswd_in_sudoers_for_pacman_u
# Install (using yaourt)
- aur: name=yturl tool=yaourt
[...]
# Update (using pacaur)
- aur: update=yes auronly=yes
[...]
# Remove (can also be done with the pacman resource)
- aur: name=yturl state=absent
[...]
# Remove recursively (can also be done with the pacman resource)
- aur: name=yturl state=absent recurse=true
[...]