From 6746ec6331d4efff0d28a5b839741f6da124294b Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Tue, 19 Feb 2019 13:29:37 -0600 Subject: [PATCH] Allow become_ask_pass from config to work (#52590) --- lib/ansible/cli/arguments/optparse_helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/cli/arguments/optparse_helpers.py b/lib/ansible/cli/arguments/optparse_helpers.py index fadd3e4930..bfac01e713 100644 --- a/lib/ansible/cli/arguments/optparse_helpers.py +++ b/lib/ansible/cli/arguments/optparse_helpers.py @@ -328,8 +328,8 @@ def add_runas_prompt_options(parser, runas_group=None): runas_group = optparse.OptionGroup(parser, "Privilege Escalation Options", "control how and which user you become as on target hosts") - runas_group.add_option('-K', '--ask-become-pass', default=False, dest='become_ask_pass', action='store_true', - help='ask for privilege escalation password') + runas_group.add_option('-K', '--ask-become-pass', dest='become_ask_pass', action='store_true', + help='ask for privilege escalation password', default=C.DEFAULT_BECOME_ASK_PASS) parser.add_option_group(runas_group)