Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails on Windows via aws_ssm #83

Open
s256 opened this issue Nov 26, 2024 · 0 comments · May be fixed by #84
Open

Installation fails on Windows via aws_ssm #83

s256 opened this issue Nov 26, 2024 · 0 comments · May be fixed by #84

Comments

@s256
Copy link

s256 commented Nov 26, 2024

Describe the bug
Installing the package fails, when connecting via aws_ssm for Windows Machines.
This bug is most likely between win_package and aws_ssm if the path for the win_package is a remote URL.

To Reproduce
use aws_ssm as ansible_connection

ansible_connection: aws_ssm
ansible_aws_ssm_profile: my-aws-profile
ansible_aws_ssm_bucket_name: my-s3-bucket
ansible_aws_ssm_region: eu-central-1

ansible_aws_ssm_timeout: 600

-> run the playbook
Expected behavior
A clear and concise description of what you expected to happen.

Screenshots or CLI Output

<i-0ad9f2a0178f2e4d6> POST_PROCESSED:
<i-0ad9f2a0178f2e4d6> ssm_retry: (success) (0, '', '')
<i-0ad9f2a0178f2e4d6> CLOSING SSM CONNECTION TO: i-0ad9f2a0178f2e4d6
<i-0ad9f2a0178f2e4d6> TERMINATE SSM SESSION: botocore-session-1732625556-ygdtdsda7xzofbqnuu2dq4djr4
The full traceback is:
Exception calling "OpenPackage" with "2" argument(s): "This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package"
At line:1372 char:26
+         $packageStatus = Get-InstalledStatus @getParams
+                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Get-InstalledStatus], MethodInvocationException
+ FullyQualifiedErrorId : Win32Exception,Get-InstalledStatus

ScriptStackTrace:
at <ScriptBlock>, <No file>: line 739
at Get-InstalledStatus, <No file>: line 536
at <ScriptBlock>, <No file>: line 1372

System.Management.Automation.MethodInvocationException: Exception calling "OpenPackage" with "2" argument(s): "This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a validWindows Installer package" ---> System.ComponentModel.Win32Exception: This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package
at Ansible.WinPackage.MsiHelper.OpenPackage(String packagePath, Boolean ignoreMachineState) in c:\Windows\Temp\ansible-tmp-1732625556.0930657-414442-189388680566775\4e8f4172-914d-4fe2-adcb-c94bbceb2f55\urvwugak.0.cs:line 362
at CallSite.Target(Closure , CallSite , Type , String , Boolean )
--- End of inner exception stack trace ---
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
fatal: [i-0ad9f2a0178f2e4d6]: FAILED! => {
"changed": false,
"msg": "Unhandled exception while executing module: Exception calling \"OpenPackage\" with \"2\" argument(s): \"This installation package could not be opened. Verify that the package existsand that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package\""
}

Desktop (please complete the following information):

  • OS: Fedora
  • OS Version: 41
  • Browser if applicable: n/a
  • Browser Version: n/a

Additional context
Preparing a MR to be more flexible regarding the ansible_connection settings. Inspired by SentinelOne.

We can not assume, that our targets always have an internet connection to download the package. We must assume we have isolated nodes which can be provisioned using ansible. Hence reworking the transfer of the package serves a purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant