Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
Signed-off-by: Yanan Shen <[email protected]>
  • Loading branch information
123lzxm committed Apr 11, 2024
1 parent 52ba6be commit b4dee8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
15 changes: 1 addition & 14 deletions windows/windows_update_install/install_msu_file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,8 @@
# SPDX-License-Identifier: BSD-2-Clause
---
# Parameters:
# msu_file_path (required): the .msu file path in guest OS.
# msu_file_basename (optional): the base name of the .msu file.
# msu_file_path: the .msu file path in guest OS.
#
- name: "Check if the input parameter is set"
ansible.builtin.assert:
that:
- msu_file_path is defined
- msu_file_path
fail_msg: "Parameter 'msu_file_path' is required to be set."

- name: "Set the .msu file basename"
ansible.builtin.set_fact:
msu_file_basename: "{{ msu_file_path | win_basename }}"
when: ( msu_file_basename is undefined or not msu_file_basename)

- name: "Set the .msu file installation related parameters"
ansible.builtin.set_fact:
msu_kb_number: "{{ msu_file_basename | regex_search('(?i)KB\\d+') | upper }}"
Expand Down
5 changes: 3 additions & 2 deletions windows/windows_update_install/prepare_msu_file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Parameters:
# msu_file_type (required): SSU or LCU.
# Return:
# msu_file_path: the .msu file path in guest OS.
# msu_file_path: the .msu file path in guest OS.
#
- name: "Check if the .msu file type is set"
ansible.builtin.assert:
Expand All @@ -14,10 +14,11 @@
- msu_file_type in ['SSU', 'LCU']
fail_msg: "Parameter 'msu_file_type' is required and set to a valid value: '{{ msu_file_type | default('') }}'"

- name: "Initialize the .msu file path and file name regexp"
- name: "Initialize the .msu file path and file name related variables"
ansible.builtin.set_fact:
msu_root_dir: "C:\\msu"
msu_file_name_reg: "{{ '*x64*' if guest_os_ansible_architecture == '64-bit' else '*x86*'}}"
msu_file_basename: ""
msu_file_path: ""
msu_nfs_path_list: []

Expand Down

0 comments on commit b4dee8e

Please sign in to comment.