mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
fix 'doas' become_method support, previously committed patch not submitted to devel branch (#37511)
* fix become_method 'doas' support by properly specifying becomecmd a repatch of https://github.com/ansible/ansible/pull/13451/ which was never committed to 'devel' branch. * fix play_context test for become_method doas to match new becomecmd
This commit is contained in:
committed by
Brian Coca
parent
1e4c389268
commit
be3670f528
@@ -154,8 +154,7 @@ def test_play_context_make_become_cmd(parser):
|
||||
|
||||
play_context.become_method = 'doas'
|
||||
cmd = play_context.make_become_cmd(cmd=default_cmd, executable="/bin/bash")
|
||||
assert (cmd == """%s %s echo %s && %s %s env ANSIBLE=true %s""" % (doas_exe, doas_flags, play_context.
|
||||
success_key, doas_exe, doas_flags, default_cmd))
|
||||
assert (cmd == """%s %s %s -c 'echo %s; %s'""" % (doas_exe, doas_flags, default_exe, play_context.success_key, default_cmd))
|
||||
|
||||
play_context.become_method = 'ksu'
|
||||
cmd = play_context.make_become_cmd(cmd=default_cmd, executable="/bin/bash")
|
||||
|
||||
Reference in New Issue
Block a user