ansible / ansible.builtin / v2.9.26 / module / win_psrepository Adds, removes or updates a Windows PowerShell repository. | "added in version" 2.8 of ansible.builtin" Authors: Wojciech Sciesinski (@it-praktyk) preview | supported by communityansible.builtin.win_psrepository (v2.9.26) — module
pip
Install with pip install ansible==2.9.26
This module helps to add, remove and update Windows PowerShell repository on Windows-based systems.
--- - 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
name: description: - Name of the repository to work with. required: true type: str state: choices: - absent - present default: present description: - If C(present) a new repository is added or updated. - If C(absent) a repository is removed. type: str source: description: - Specifies the URI for discovering and installing modules from this repository. - A URI can be a NuGet server feed (most common situation), HTTP, HTTPS, FTP or file location. type: str installation_policy: choices: - trusted - untrusted description: - Sets the C(InstallationPolicy) of a repository. - Will default to C(trusted) when creating a new repository. type: str