@ -74,6 +74,12 @@ options:
- Password of an account with access to the package if it ' s located on a file share. Only needed if the winrm user doesn ' t have access to the package . Also specify user_name for this to function properly .
default : null
required : false
expected_return_code :
description :
- One or more return codes from the package installation that indicates success .
- If not provided , defaults to 0
required : no
default : 0
'''
EXAMPLES = r '''
@ -94,4 +100,24 @@ EXAMPLES = r'''
path : https : / / download . microsoft . com / download / A / F / 0 / AF0071F3 - B198 - 4 A35 - AA90 - C68D103BDCCF / rdcman . msi
product_id : ' { 0240359E-6A4C-4884-9E94-B397A02D893C} '
state : absent
# Specify the expected non-zero return code when successful
# In this case 3010 indicates 'reboot required'
- name : ' Microsoft .NET Framework 4.5.1 '
win_package :
path : https : / / download . microsoft . com / download / 1 / 6 / 7 / 167 F0D79 - 9317 - 48 AE - AEDB - 17120579 F8E2 / NDP451 - KB2858728 - x86 - x64 - AllOS - ENU . exe
productid : ' { 7DEBE4EB-6B40-3766-BB35-5CBBC385DA37} '
arguments : ' /q /norestart '
ensure : present
expected_return_code : 3010
# Specify multiple non-zero return codes when successful
# In this case we can say that both 0 (SUCCESSFUL) and 3010 (REBOOT REQUIRED) codes are acceptable
- name : ' Microsoft .NET Framework 4.5.1 '
win_package :
path : https : / / download . microsoft . com / download / 1 / 6 / 7 / 167 F0D79 - 9317 - 48 AE - AEDB - 17120579 F8E2 / NDP451 - KB2858728 - x86 - x64 - AllOS - ENU . exe
productid : ' { 7DEBE4EB-6B40-3766-BB35-5CBBC385DA37} '
arguments : ' /q /norestart '
ensure : present
expected_return_code : [ 0 , 3010 ]
'''