-
Notifications
You must be signed in to change notification settings - Fork 30
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
Collection version 1.2.0 breaks my ability to install chocolatey from a custom source. #74
Comments
Thanks for the report! We'll have a look over the changes and look to see what went wrong there. At a glance, I can see you're looking to download chocolatey as a nupkg directly, which is not something the initial installation would normally do -- typically the bootstrapping installation downloads an I suspect this may have worked somewhat "by accident" in the past, the collection likely presumed it couldn't handle the URL, went to fetch the default install.ps1 from Chocolatey.org instead, and used that script to download the nupkg you'd supplied. It's clear that we need to be more careful in our assumptions around the URL format. Perhaps we should simply have an additional parameter to find the install script for installing For now, I think removing the |
Hmmm, I was afraid of that (i.e. it worked earlier due to a bug [unintended feature]). I started iterating over different URL paths and eventually got it to work with the 1.2.0 collection and my custom role unmodified. I merely had to pass a different URL. For posterity:
So now my task that applies my custom role for installing/bootstrapping chocolatey looks like this: - name: apply win_chocolatey role
ansible.builtin.import_role:
name: ar_win_chocolatey
vars:
chocolatey_version: 0.10.15
# chocolatey_package_download_suffix: 'chocolatey/0.10.15'
# chocolatey_package_download_suffix: ''
chocolatey_package_download_suffix: 'repository/choco-all/chocolatey/0.10.15'
chocolatey_sources:
- name: nexus
# source: http://nexus.example.com:8081/repository/choco-all/
source: http://nexus.example.com:8081
state: present
chocolatey_features: []
chocolatey_configs:
- name: webRequestTimeoutSeconds
state: present
value: 45
chocolatey_packages: []
chocolatey_display_facts: false I left the commented out YAML bits in there so you could see how the URLs were changed as I experimented and found something that worked. In short, it looks like the "source" is where to obtain the bootstrap |
Glad you could get it working! At least now we can be sure it's actually using the install.ps1 you have. 😄 Yeah, it's probably not ideal to have the It certainly would make the behaviour more discoverable and easier to work with, I think. We should also add some docs to |
Yeah, I'm running into other behavior issues now when managing sources pointing to my Nexus. Previous when I would add the source, the URL was Thanks for all the good work on this collection thus far! Using Ansible in a "Windows shop", I leverage this quite often. |
Made sense to move the test package files into a subfolder, so did that in order to keep test files a bit more organised.
Made sense to move the test package files into a subfolder, so did that in order to keep test files a bit more organised.
Made sense to move the test package files into a subfolder, so did that in order to keep test files a bit more organised.
Made sense to move the test package files into a subfolder, so did that in order to keep test files a bit more organised.
Made sense to move the test package files into a subfolder, so did that in order to keep test files a bit more organised.
Made sense to move the test package files into a subfolder, so did that in order to keep test files a bit more organised.
Made sense to move the test package files into a subfolder, so did that in order to keep test files a bit more organised.
Made sense to move the test package files into a subfolder, so did that in order to keep test files a bit more organised.
Made sense to move the test package files into a subfolder, so did that in order to keep test files a bit more organised.
Made sense to move the test package files into a subfolder, so did that in order to keep test files a bit more organised.
Made sense to move the test package files into a subfolder, so did that in order to keep test files a bit more organised.
(#74) Add bootstrap_script option for win_chocolatey
What You Are Seeing?
Version 1.2.0 of collection breaks my existing role that installs chocolatey from a custom source (on-prem Sonatype Nexus OSS caching proxy). Versions 1.0.2 and 1.1.0 work without any modification on my side.
What is Expected?
My custom Ansible role that installs chocolatey from a custom source still works when moving to collection version 1.2.0 as it did when using collection versions 1.0.2 and 1.1.0.
How Did You Get This To Happen? (Steps to Reproduce)
I tested a different role with molecule that leverages my custom chocolatey role (in
molecule prepare
) and did not pin the version of chocolatey.chocolatey collection. I saw the following error repeatedly:I think this stems from an improvement I saw in the 1.2.0 changlog:
For now, I'll be looking at my custom chocolatey role to see what adjustments I can make to make it work with v1.2.0 of this collection and pin my other dependencies to 1.1.0.
The failing task in my custom role looks like this:
And the task in my
molecule prepare
that applies the custom role looks like this:System Details
N/A
Output Log
N/A
The text was updated successfully, but these errors were encountered: