Using this module as a backend for ansible.builtin.package
gardar opened this issue · comments
Is it possible to use this module as a backend for the package
core ansible module?
This modules manages packages on a target without specifying a package manager module (like ansible.builtin.yum, ansible.builtin.apt, …). It is convenient to use in an heterogeneous environment of machines without having to create a specific task for each package manager.
Or is there perhaps something that limits the package
module from using third party modues as a backend?
I'm not sure. Honestly, I think we'd be better off merging this module with community.general.pacman
.
Assuming you've installed the kewlfft.aur
collection, what happens in you pass use: kewlfft.aur.aur
to the package
module?
Yep, it works, I had tried using the legacy name aur
and also tried using makepkg
, etc directly without luck.
TASK [gardar.common : Install yay aur helper] **********************************
task path: /home/g/ansible/roles/gardar.common/tasks/distro/archlinux.yml:17
redirecting (type: connection) ansible.builtin.podman to containers.podman.podman
META: noop
META: noop
changed: [archlinux] => {"changed": true, "helper": "makepkg", "msg": "installed package(s)", "rc": 0}
TASK [gardar.common : Install aur packages] ************************************
task path: /home/g/ansible/roles/gardar.common/tasks/distro/archlinux.yml:27
META: noop
META: noop
redirecting (type: connection) ansible.builtin.podman to containers.podman.podman
changed: [archlinux] => {"changed": true, "helper": "yay", "msg": "installed package(s)", "rc": 0}
META: noop
Now the remaining question is if I can pass a additional use
parameter to the package module, to force it to use a specific aur helper.