mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-10 04:36:40 +00:00
makepkg refuses to run as root, so the AUR plan marks its kewlfft.aur.aur call with become_user=aur_builder. The action plugin honoured that by mutating _play_context.become_user, which ansible-core never reads when it escalates: the target user comes from the become plugin bound to the connection, and _play_context mirrors that plugin rather than driving it. The build therefore ran as root and makepkg aborted with rc 10. Writing the plugin option instead flips only the AUR call to -u aur_builder and restores the previous user afterwards, so the bootstrap calls in the same plan keep running as root. Without a bound become plugin the action now fails loud instead of silently building as root. The old test mocked _play_context and _execute_module, then asserted the mocked attributes carried what the setter had just written, so it passed against the broken code. It now builds a real sudo become plugin and asserts on build_become_command output. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>