mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #3303 from markmandel/feature/sudo_pass
Don't turn on sudo for all tasks when setting the sudo_user or ask_sudo_pass
This commit is contained in:
commit
506178542d
1 changed files with 0 additions and 2 deletions
|
@ -91,8 +91,6 @@ def main(args):
|
||||||
options.ask_pass = options.ask_pass or C.DEFAULT_ASK_PASS
|
options.ask_pass = options.ask_pass or C.DEFAULT_ASK_PASS
|
||||||
options.ask_sudo_pass = options.ask_sudo_pass or C.DEFAULT_ASK_SUDO_PASS
|
options.ask_sudo_pass = options.ask_sudo_pass or C.DEFAULT_ASK_SUDO_PASS
|
||||||
( sshpass, sudopass ) = utils.ask_passwords(ask_pass=options.ask_pass, ask_sudo_pass=options.ask_sudo_pass)
|
( sshpass, sudopass ) = utils.ask_passwords(ask_pass=options.ask_pass, ask_sudo_pass=options.ask_sudo_pass)
|
||||||
if options.sudo_user or options.ask_sudo_pass:
|
|
||||||
options.sudo = True
|
|
||||||
options.sudo_user = options.sudo_user or C.DEFAULT_SUDO_USER
|
options.sudo_user = options.sudo_user or C.DEFAULT_SUDO_USER
|
||||||
if options.extra_vars and options.extra_vars[0] in '[{':
|
if options.extra_vars and options.extra_vars[0] in '[{':
|
||||||
extra_vars = utils.json_loads(options.extra_vars)
|
extra_vars = utils.json_loads(options.extra_vars)
|
||||||
|
|
Loading…
Reference in a new issue