We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Trying to do an initial chocolatey install on a Windows 11 Enterprise machine I get:
fatal: [HOSTNAME]: FAILED! => { "changed": false, "command": "", "invocation": { "module_args": { "allow_empty_checksums": false, "allow_multiple": false, "allow_prerelease": false, "architecture": "default", "bootstrap_script": null, "bootstrap_tls_version": [ "tls12", "tls13" ], "checksum": null, "checksum64": null, "checksum_type": null, "checksum_type64": null, "choco_args": null, "force": false, "ignore_checksums": false, "ignore_dependencies": false, "install_args": null, "name": [ "chocolatey" ], "override_args": false, "package_params": null, "pinned": null, "proxy_password": null, "proxy_url": null, "proxy_username": null, "remove_dependencies": false, "skip_scripts": false, "source": null, "source_password": null, "source_username": null, "state": "latest", "timeout": 2700, "validate_certs": true, "version": null } }, "msg": "Chocolatey bootstrap installation failed.", "rc": 1, "stderr": "& : File \r\nC:\\Users\\USER\\AppData\\Local\\Temp\\ansible-tmp-1702336268.5886993-69281-230291664240022\\chocolateyInstall.ps1 \r\ncannot be loaded. The file \r\nC:\\Users\\USER\\AppData\\Local\\Temp\\ansible-tmp-1702336268.5886993-69281-230291664240022\\chocolateyInstall.ps1 is \r\nnot digitally signed. You cannot run this script on the current system. For more information about running scripts and \r\nsetting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.\r\nAt line:1 char:3\r\n+ & \"C:\\Users\\USER\\AppData\\Local\\Temp\\ansible-tmp-1702336268.588 ...\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : SecurityError: (:) [], PSSecurityException\r\n + FullyQualifiedErrorId : UnauthorizedAccess\r\n", "stderr_lines": [ "& : File ", "C:\\Users\\USER\\AppData\\Local\\Temp\\ansible-tmp-1702336268.5886993-69281-230291664240022\\chocolateyInstall.ps1 ", "cannot be loaded. The file ", "C:\\Users\\USER\\AppData\\Local\\Temp\\ansible-tmp-1702336268.5886993-69281-230291664240022\\chocolateyInstall.ps1 is ", "not digitally signed. You cannot run this script on the current system. For more information about running scripts and ", "setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.", "At line:1 char:3", "+ & \"C:\\Users\\USER\\AppData\\Local\\Temp\\ansible-tmp-1702336268.588 ...", "+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", " + CategoryInfo : SecurityError: (:) [], PSSecurityException", " + FullyQualifiedErrorId : UnauthorizedAccess" ], "stdout": "", "stdout_lines": [] }
Chocolatey is installed
- hosts: windows gather_facts: false tasks: - name: "Install chocolatey" win_chocolatey: name: - chocolatey state: latest
N/A
I can fix the signing issue by adding -NoNewline to the Set-Content call. But then I get:
-NoNewline
Set-Content
"stderr": "& : AuthorizationManager check failed.\r\nAt line:1 char:3\r\n+ & \"C:\\Users\\USER\\AppData\\Local\\Temp\\ansible-moduletmp-13346812 ...\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : SecurityError: (:) [], PSSecurityException\r\n + FullyQualifiedErrorId : UnauthorizedAccess\r\n", "stderr_lines": [ "& : AuthorizationManager check failed.", "At line:1 char:3", "+ & \"C:\\Users\\USER\\AppData\\Local\\Temp\\ansible-moduletmp-13346812 ...", "+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", " + CategoryInfo : SecurityError: (:) [], PSSecurityException", " + FullyQualifiedErrorId : UnauthorizedAccess" ],
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Checklist
What You Are Seeing?
Trying to do an initial chocolatey install on a Windows 11 Enterprise machine I get:
What is Expected?
Chocolatey is installed
How Did You Get This To Happen?
System Details
Installed Packages
Output Log
Additional Context
I can fix the signing issue by adding
-NoNewline
to theSet-Content
call. But then I get:The text was updated successfully, but these errors were encountered: