-
Notifications
You must be signed in to change notification settings - Fork 68
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
(MODULES-11255) Add basic tasks to manage packages #273
Conversation
|
This is currently a draft to allow the community to provide feedback on the interface of the tasks. Cc @neomilium, @bastelfreak, @mtancoigne 😁 |
|
Given that this is a Windows-only module and task, is there a reason to write it to require the Puppet Agent/Ruby instead of using PowerShell? |
|
@michaeltlombardi as a POSIX system user who does a lot of Ruby and has to manage a few windows nodes, I have not even though about using powershell 🤣 I jumped directly on the tools I am used to and master. |
|
I only ask because the primary drawback is that using ruby means these tasks can only be executed against nodes with the agent installed. Not a huge deal just wanted to check! |
3ddebf3
to
5545307
Compare
|
I think this has settled so I squashed the commits and updated the PR description accordingly. I have been using these tasks for some time now and consider this ready for merging 🎉 |
Add a task to list current packages:
C:\> bolt task run chocolatey::status -t localhost
Started on localhost...
Finished on localhost:
{"status":[{"package":"chocolatey","version":"0.11.3"},{"package":"puppet-bolt","version":"3.20.0"}]}
Successful on 1 target: localhost
Ran on 1 target in 2.6 sec
C:\>
Add tasks to install, upgrade and uninstall packages:
C:\> bolt task run chocolatey action=install package=pdk version=2.0.0.0 -t localhost
C:\> bolt task run chocolatey action=upgrade package=pdk -t localhost
C:\> bolt task run chocolatey action=uninstall package=pdk -t localhost
Add a task to pin/unpin packages:
C:\> bolt task run chocolatey::pin action=add package=puppet-bolt -t localhost
C:\> bolt task run chocolatey::pin action=list -t localhost
Started on localhost...
Finished on localhost:
{"status":[{"package":"puppet-bolt","version":"3.20.0"}]}
Successful on 1 target: localhost
Ran on 1 target in 2.6 sec
C:\> bolt task run chocolatey::pin action=remove package=pdk -t localhost
Add a task to list outdated packages:
C:\> bolt task run chocolatey::outdated -t localhost
Started on localhost...
Finished on localhost:
{"status":[{"package":"puppet-bolt","version":"3.20.0","available_version":"3.21.0","pinned":false}]}
Successful on 1 target: localhost
Ran on 1 target in 10.14 sec
C:\>
Add a task to list current packages:
Add tasks to install, upgrade and uninstall packages:
Add a task to pin/unpin packages:
Add a task to list outdated packages: