We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The Ansible sudo module provides the ability to pass additional options to the sudo command with the become_flags option.
become_flags
This option is useful to open a login shell with -i, for example.
-i
In my case, this is necessary to execute the command with the correct settings (path and environment variables).
My current workaround is:
with ansiblehost.sudo(user="root"): cmd = f"""su - {user} -c 'python {check_script}'""" result = ansiblehost.run(cmd)
instead of
with ansiblehost.sudo(user="root", flags="-i"): cmd = f"""python {check_script}""" result = ansiblehost.run(cmd)
Please add support for become_flags.
Thank you, Carsten
The text was updated successfully, but these errors were encountered:
See #336 also
Sorry, something went wrong.
No branches or pull requests
The Ansible sudo module provides the ability to pass additional options to the sudo command with the
become_flags
option.This option is useful to open a login shell with
-i
, for example.In my case, this is necessary to execute the command with the correct settings (path and environment variables).
My current workaround is:
instead of
Please add support for
become_flags
.Thank you,
Carsten
The text was updated successfully, but these errors were encountered: