Skip to content

Install PSModule

Go to Automation

View in GitLab

Description

This playbook installs / removes a specified PowerShell module on a target host. It supports installing both regular and prerelease versions of the module from a specified repository. Additionally, it removes older versions of the module if a specific version is provided. If state is present the module is installed, when latest the module is also updated to the newest version if needed

Credentials

  • sys_ansible_windows

Input

Variable Description
target Target host for the installation
ps_module Name of the PowerShell module to install
ps_repo_name Name of the PowerShell repository
ps_module_version Version of the PowerShell module to install (optional)
ps_prerelease Whether to install a prerelease version (true/false)
state Desired state of the module (latest/present/absent)

Output

None

Dependencies