-
Notifications
You must be signed in to change notification settings - Fork 163
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
Ansible module to support the Windows package manager (winget) #89
Comments
Totally agree on that. Ansible should natively use winget not choco. For linux distros the vendors packagemanger is also used for a good reason as default. |
The ansible team did not make module for winget for two years? I guess windows as use case for ansible is not taken very seriously. |
Assuming most people are using Ansible to manage Windows Server instances then be aware that (source):
See also: And then there's also this (still open at time of writing): In light of these I think Chocolatey should remain best practice until / unless |
There's a discussion that is currently tracking all the open issues that need to be resolved for winget support on Windows Server 2022: microsoft/winget-cli#2361 |
Ansible doesn't really have a best practice when it comes to a package manager, it just exposes what is already there and currently there's a There's nothing stopping anyone from writing their own module for
Add that to the reported issues around running on WinRM and the lack of a PowerShell wrapper making it easier to work with programatically makes it hard for us to really expose this as a wrapper. I'm sure there is work being put into it by the Winget team and maybe some of my assumptions are wrong but this is just how I see the landscape as it is today.
This is not to say we won't look at PRs for bugfixes or new features to existing modules, we just don't have the capacity to accept new modules. Each new module adds even more work for myself to maintain and in reality we need to stop using this collection as a general catch all and to start encouraging more people to use their own collections and making it eaiser for others to use them. Until a time when we revisit the no new modules policy to this collection there's not much else we can do here so I'm going to close this issue. |
Might become relevant again since Microsoft recently announced that Windows Server 2025 will receive winget as a package manager: https://techcommunity.microsoft.com/t5/itops-talk-blog/windows-server-summit-wrap-up/ba-p/4109224 |
Something else to consider here is that winget (not Ansible) already has an official PowerShell module, but needs to be installed. Most Ansible Windows modules rely on PowerShell, so it would just be a matter of someone creating an Ansible module that checks/downloads the winget PowerShell module and then adds the desired functionality. Scoop and Chocolatey, while they may still be actively maintained, are not really the way forward in terms of utilizing the tools recommended by Microsoft, and have limited value at this point since winget now has more features. It seems silly that Ansible lacks support for the official Windows package manager, but continues to maintain tools that would be considered legacy. Can't Red Hat dedicated some resources for a developer to spend like one day to create an official winget module? |
Just because these products aren't from Microsoft doesn't make them any less relevant. Each approach the problem of package management on Windows in different ways. Each are valid and fit their own use case with their own advantages and disadvantages.
We don't maintain any of them. Chocolatey maintain
I wish it could be done in a day but the time and effort it takes to create a supported module is more than that. The work that would need to be done here would have to include:
My time is quite limited and while this is on my radar to work on I cannot give any timeframes as to when it might be done. |
I understand that these developers have built a community and may have taken different approaches, but Microsoft is actively funding and maintaining their own official open-source package manager now, and a majority of app developers have moved to it. What is the point of using Scoop or Chocolatey at this point aside from getting more niche packages that aren't yet officially packaged in the winget repo? Winget has outpaced them and Scoop or Chocolatey hasn't given the community a reason to not migrate. You can be optimistic, but I give it a year before development stalls on choco & scoop.
Without the community modules, Ansible would have little value to prospective clients compared to alternatives. So you're saying that Red Hat is relying on the community in order to sell paid solutions based on the community's work, but is too cheap to help fund those efforts?
I spent less than a day and got it working to some extent, and I'm not even a PowerShell or Ansible developer expert. I understand that you'd want to build testing and things around it, and make it "production" ready. If you ultimately end up doing the work, then know that I appreciate you and your efforts. My frustration isn't with you, it is with Red Hat who still seems to advertise Ansible but doesn't want to adequately fund and assign developers to work on improving it. |
This is always how it goes though. The basic POC is quick, and most of the time spent is that last 10-20%. If you have something working for you, why not use it? As you continue using it you'll likely keep making tweaks and fixes over time, and maybe you'll get it to a point where you're ready to take the step of contributing it or publishing it yourself (as long as you're prepared to do all that production ready stuff, but you won't have to do it alone, there is a community to help). This has been the story for most of the changes and new modules I've contributed. |
@mcexit 👋
I would implore anyone reading this to determine for yourself if these are factual statements or not. WinGet still has a ways to go to support what Chocolatey open-source has supported for years. It's also worth stating that Microsoft has a lot of focuses whereas Chocolatey Software has a singular focus - "Make software automation better on Windows." |
Hi there, just wondering whether this community |
I'm not an expert or a Dev, but I was working in a Corp where they didn't allow any third party software, specially those that you have to pay for using those tools/software massively in that environment. They did agree to use Winget as a Microsoft 'native/approved' tool on the other hand. |
Windows Server 2025 will include Winget by default:
It looks like that Microsoft takes Winget very serious and it will become what apt/dnf/apk etc. is on Linux. |
Reflecting on my statements, I see now that they were a bit hyperbolic. I apologize for that and know that you have put a lot of work into enterprise functionality that isn't available with From a non-enterprise user perspective though, I have never had much of a positive experience with Chocolatey. I maintained a few packages for a while, but the nagware promotions really bugged me. I also don't see many people maintaining the Chocolatey packages anymore. I wish you the best though. |
SUMMARY
I think that Ansible should support the Windows package manager, announced at Build 2020.
ISSUE TYPE
COMPONENT NAME
win_winget
ADDITIONAL INFORMATION
References:
The text was updated successfully, but these errors were encountered: