win_psrepository – Adds, removes or updates a Windows PowerShell repository¶
New in version 2.8.
Synopsis¶
- This module helps to add, remove and update Windows PowerShell repository on Windows-based systems.
Parameters¶
Notes¶
Note
- PowerShell modules needed - PowerShellGet >= 1.6.0 - PackageManagement >= 1.1.7
- PowerShell package provider needed - NuGet >= 2.8.5.201
- See the examples on how to update the NuGet package provider.
- You can not use
win_psrepository
to re-register (add) removed PSGallery, use the commandRegister-PSRepository -Default
instead.
See Also¶
See also
- win_psmodule – Adds or removes a Windows PowerShell module
- The official documentation on the win_psmodule module.
Examples¶
---
- name: Ensure the required NuGet package provider version is installed
win_shell: Find-PackageProvider -Name Nuget -ForceBootstrap -IncludeDependencies -Force
- name: Add a PowerShell module and register a repository
win_psrepository:
name: MyRepository
source: https://myrepo.com
state: present
- name: Remove a PowerShell repository
win_psrepository:
name: MyRepository
state: absent
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors¶
- Wojciech Sciesinski (@it-praktyk)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.