1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-22 13:19:13 +00:00
community.general/plugins
Mike Aldred 7eaf551b24 pfexec become plugin: fix broken defaults for illumos/SmartOS
The pfexec become plugin has had incorrect defaults since it was
migrated from Ansible core, making it unusable on illumos without
manual workarounds:

1. become_flags defaulted to '-H -S -n' which are sudo flags.
   pfexec does not accept any of these options, causing:
   'exec: illegal option -- H'

2. wrap_exe defaulted to false. Unlike sudo, pfexec does not
   interpret shell constructs internally. Since Ansible generates
   compound commands (echo BECOME-SUCCESS-xxx ; python3), these
   must be wrapped in /bin/sh -c for pfexec to execute them.

These issues were originally reported in 2016 (ansible/ansible#15642),
migrated to community.general as #3671, and partially fixed by PR #3889
in 2022 (which corrected quoting but not the defaults). Users have had
to work around this with explicit inventory settings ever since.

Changes:
- become_flags default: '-H -S -n' -> '' (empty)
- wrap_exe default: false -> true
- build_become_command: handle empty flags cleanly
- Updated tests to match corrected defaults
- Added test for custom flags
- Improved wrap_exe description to explain why it should be enabled
2026-03-19 23:21:12 +08:00
..
action Sort imports with ruff check --fix (#11400) 2026-01-09 07:40:58 +01:00
become pfexec become plugin: fix broken defaults for illumos/SmartOS 2026-03-19 23:21:12 +08:00
cache Sort imports with ruff check --fix (#11400) 2026-01-09 07:40:58 +01:00
callback Add missing __future__ imports (#11567) 2026-03-11 06:42:08 +01:00
connection Add option for wsl_shell_type, protect wsl.exe arguments if SSH shell is Powershell (#11308) 2026-01-16 21:07:11 +01:00
doc_fragments New module icinga2_downtime (#11462) 2026-02-23 05:38:54 +01:00
filter Add missing __future__ imports (#11567) 2026-03-11 06:42:08 +01:00
inventory fix: remove HTTPStatus constructs introduced in Python 3.11 (#11573) 2026-03-12 20:46:55 +01:00
lookup Add missing __future__ imports (#11567) 2026-03-11 06:42:08 +01:00
module_utils keycloak_authentication_v2: verify providerIds (fix 11583) (#11585) 2026-03-18 07:06:09 +01:00
modules keycloak_authentication_v2: verify providerIds (fix 11583) (#11585) 2026-03-18 07:06:09 +01:00
plugin_utils Add missing __future__ imports (#11567) 2026-03-11 06:42:08 +01:00
test Sort imports with ruff check --fix (#11400) 2026-01-09 07:40:58 +01:00