failed_when:"'argument for list entry expected_return_code is of type System>String and we were unable to convert to in' in fail_invalid_return_code.msg"
- name:fail when product_id is not set and path is not a local MSI
win_package:
path:'{{test_win_package_good_url}}'
state:present
register:fail_install_url_no_id
failed_when:fail_install_url_no_id.msg != 'product_id is required when the path is not an MSI or the path is an MSI but not local'
- name:fail invalid local path
win_package:
path:'{{test_win_package_path}}\no file.msi'
state:present
register:fail_invalid_local_path
failed_when:fail_invalid_local_path.msg != 'the file at the local path ' + test_win_package_path + '\\no file.msi cannot be reached'
- name:fail invalid URL
win_package:
path:http://fakeurl/file.msi
product_id:'id'
state:present
register:fail_invalid_url_path
failed_when:"fail_invalid_url_path.msg != 'the file at the URL http://fakeurl/file.msi cannot be reached: The remote name could not be resolved: \\'fakeurl\\''"
- name:fail invalid UNC path
win_package:
path:\\fakenetwork\unc file.msi
product_id:'id'
state:present
register:fail_invalid_unc_path
failed_when:fail_invalid_unc_path.msg != 'the file at the UNC path \\\\fakenetwork\\unc file.msi cannot be reached, ensure the user_name account has access to this path or use an auth transport with credential delegation'
- name:fail when product_id is not set and path is not a local MSI
win_package:
path:'{{test_win_package_good_url}}'
state:present
register:fail_no_id_not_local_msi
failed_when:fail_no_id_not_local_msi.msg != 'product_id is required when the path is not an MSI or the path is an MSI but not local'