-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pfexec become plugin does not work on illumos distros #3671
Comments
Files identified in the description:
If these files are incorrect, please update the |
My basic question is, for which OS does the become plugin work as it is today? And if any, should an option switch be added, to allow to choose between old (illumos incompatible) and new (illumos compatible) behavior? |
Files identified in the description:
If these files are incorrect, please update the |
cc @None |
!component plugins/modules/packaging/os/pkg5 |
FYI, when in core this was tested against illumos. In any case, the patch is not the right fix, the build_success_command function should be overridden instead, shell should not be hardcoded but use the one from the 'shell' variable passed in to allow the user to configure it depending on their context (for example, being restricted to only ksh). |
quick look, this might just bee a quote problem in https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/become/__init__.py#L74 requiring a shlex.quote wrapping cmd before interpolation |
@bcoca Can you provide a bit more details on this quoting thing? I'm not familiar with ansible coding, but the option problem can be bypassed by host config. |
I found a configuration, which makes it work with current ansible version. ansible_become: yes
ansible_become_method: pfexec
ansible_become_flags: ""
ansible_pfexec_wrap_execution: yes
ansible_python_interpreter: /usr/bin/python3.10 Maybe someone can verify this. |
Summary
Pfexec become plugin does use non existing options and bad quoting, see: ansible/ansible#15642
The old change described in this patch still works, I'm ready to open a pull request for.
Issue Type
Bug Report
Component Name
community.general.pfexec
plugins/become/pfexec.py
Ansible Version
Community.general Version
Configuration
No response
OS / Environment
OmniOS, OpenIndiana, etc.
Steps to Reproduce
configure host with OmniOS for become method pfexec
Expected Results
become method pfexec works
Actual Results
become method pfexec does not work
Code of Conduct
The text was updated successfully, but these errors were encountered: