From 064e443ea597359f3abb087aae6ee1ae4836f265 Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Thu, 19 Sep 2019 08:41:02 +1000 Subject: [PATCH] psexec - Fix kerb and interactive support (#62556) --- changelogs/fragments/psexec-kerb-and-interactive.yaml | 3 +++ lib/ansible/modules/commands/psexec.py | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/psexec-kerb-and-interactive.yaml diff --git a/changelogs/fragments/psexec-kerb-and-interactive.yaml b/changelogs/fragments/psexec-kerb-and-interactive.yaml new file mode 100644 index 00000000000..27a4699e4ab --- /dev/null +++ b/changelogs/fragments/psexec-kerb-and-interactive.yaml @@ -0,0 +1,3 @@ +bugfixes: +- psexec - Fix issue where the Kerberos package was not detected as being available. +- psexec - Fix issue where the ``interactive`` option was not being passed down to the library. diff --git a/lib/ansible/modules/commands/psexec.py b/lib/ansible/modules/commands/psexec.py index 150119e6757..5751a642358 100644 --- a/lib/ansible/modules/commands/psexec.py +++ b/lib/ansible/modules/commands/psexec.py @@ -443,7 +443,7 @@ def main(): process_timeout = module.params['process_timeout'] stdin = module.params['stdin'] - if connection_username is None or connection_password is None and \ + if (connection_username is None or connection_password is None) and \ not HAS_KERBEROS: module.fail_json(msg=missing_required_lib("gssapi"), execption=KERBEROS_IMP_ERR) @@ -476,7 +476,8 @@ def main(): b_stdin = to_bytes(stdin, encoding='utf-8') if stdin else None run_args = dict( executable=executable, arguments=arguments, asynchronous=asynchronous, - load_profile=load_profile, interactive_session=interactive_session, + load_profile=load_profile, interactive=interactive, + interactive_session=interactive_session, run_elevated=elevated, run_limited=limited, username=process_username, password=process_password, use_system_account=use_system, working_dir=working_directory,