pacman: add root, cachedir, and config options (#11681)

* pacman: add root, cachedir, and config options

Add three dedicated options -- O(root), O(cachedir), and O(config) --
so that all pacman commands get the corresponding global flags
(--root, --cachedir, --config) prepended, enabling use cases such as
installing packages into a chroot or alternative root directory
(similar to pacstrap).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* add changelog frag

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Alexei Znamensky
2026-03-26 11:53:11 +13:00
committed by GitHub
parent d06c83eb68
commit e2c06f2d12
3 changed files with 192 additions and 17 deletions

View File

@@ -0,0 +1,3 @@
minor_changes:
- pacman - add ``root``, ``cachedir``, and ``config`` options to support installing packages into an alternative root directory
(https://github.com/ansible-collections/community.general/issues/438, https://github.com/ansible-collections/community.general/pull/11681).