Skip to content

Commit

Permalink
add one parameter to utility win_execute_cmd.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Yanan Shen <yanans@vmware.com>
  • Loading branch information
123lzxm committed Jan 9, 2024
1 parent 3cffd16 commit c78d997
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions windows/utils/win_execute_cmd.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: BSD-2-Clause
---
# Execute specified powershell command in Windows guest OS
# Execute specified PowerShell command in Windows guest OS
# Parameters:
# win_powershell_cmd: powershell command
# win_powershell_cmd: PowerShell command
# win_execute_cmd_ignore_error: true or false
# win_execute_cmd_no_log: true or false, default false.
# Return:
# win_powershell_cmd_output
#
Expand All @@ -15,6 +16,10 @@
- win_powershell_cmd
fail_msg: "Parameter 'win_powershell_cmd' is not specified"

- name: "Set the fact if the output of PowerShell command execution is needed"
ansible.builtin.set_fact:
win_execute_cmd_no_log: "{{ win_execute_cmd_no_log | default(false) }}"

- name: "Initialize the command execution result"
ansible.builtin.set_fact:
win_powershell_cmd_output: ""
Expand Down
1 change: 1 addition & 0 deletions windows/windows_update_install/prepare_msu_file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
{{ win_nfs_mount_cmd }};
Copy-Item -Path {{ msu_file_src_path }} -Include *.msu -Destination {{ msu_dir_path }} -ErrorAction Stop;
net use {{ drive_letter_new }}: /delete
win_execute_cmd_no_log: "{{ hide_secrets | default(false) }}"

- name: "Get the .msu file name"
include_tasks: ../utils/win_execute_cmd.yml
Expand Down

0 comments on commit c78d997

Please sign in to comment.