ansible / ansible.builtin / v2.5.12 / module / win_psmodule Adds or removes a Powershell Module. | "added in version" 2.4 of ansible.builtin" Authors: Daniele Lazzari preview | supported by communityansible.builtin.win_psmodule (v2.5.12) — module
pip
Install with pip install ansible==2.5.12
This module helps to install Powershell modules and register custom modules repository on Windows Server.
--- - name: Add a powershell module win_psmodule: name: PowershellModule state: present
- name: Add a powershell module and register a repository win_psmodule: name: MyCustomModule repository: MyRepository url: https://myrepo.com state: present
- name: Remove a powershell module win_psmodule: name: PowershellModule state: absent
- name: Remove a powershell module and a repository win_psmodule: name: MyCustomModule repository: MyRepository state: absent
url: description: - Url of the custom repository. name: description: - Name of the powershell module that has to be installed. required: true state: choices: - present - absent default: present description: - If present a new module is installed. If absent a module is removed. repository: description: - Name of the custom repository to register. allow_clobber: choices: - false - true default: false description: - If yes imports all commands, even if they have the same names as commands that already exists. Available only in Powershell 5.1 or higher.
nuget_changed: description: true when Nuget package provider is installed returned: always sample: true type: boolean output: description: a message describing the task result. returned: always sample: Module PowerShellCookbook installed type: string repository_changed: description: true when a custom repository is installed or removed returned: always sample: true type: boolean