My task part of playbook.
- name: unzip mavenwin_unzip:
src: C:\tools\maven.zip
dest: C:\tools\maven
recurse: yes
delete_archive: yes
output:
TASK [unzip maven] ******************************************************************************************* [WARNING]: ansible_winrm_cert_validation unsupported by pywinrm (is an up-to-date version of pywinrm installed?) [WARNING]: ansible_winrm_cert_validation unsupported by pywinrm (is an up-to-date version of pywinrm installed?) fatal: [build-machine3]: FAILED! => {“changed”: false, “dest”: “C:\tools\maven”, “msg”: “PowerShellCommunityExtensions PowerShell Module (PSCX) is required for non-‘.zip’ compressed archive types.”, “removed”: false, “src”: “C:\tools\maven.zip”} fatal: [build-machine2]: FAILED! => {“changed”: false, “dest”: “C:\tools\maven”, “msg”: “PowerShellCommunityExtensions PowerShell Module (PSCX) is required for non-‘.zip’ compressed archive types.”, “removed”: false, “src”: “C:\tools\maven.zip”}
So added the PSCX part before it.
- name: Install PSCX
win_psmodule:
name: Pscx
state: present
But, got below error now related to Pscx.
TASK [Install PSCX] ****************************************************************************************** [WARNING]: ansible_winrm_cert_validation unsupported by pywinrm (is an up-to-date version of pywinrm installed?) [WARNING]: ansible_winrm_cert_validation unsupported by pywinrm (is an up-to-date version of pywinrm installed?) fatal: [build-machine3]: FAILED! => {“changed”: false, “msg”: “Problems installing Pscx module: The following commands are already available on this system:‘gcb,Expand-Archive,Format-Hex,Get-Hash,help,prompt,Get-Clipboard,Get-Help,Set-Clipboard’. This module ‘Pscx’ may override the existing commands. If you still want to install this module ‘Pscx’, use -AllowClobber parameter.”, “nuget_changed”: false, “output”: “”, “repository_changed”: false} fatal: [build-machine2]: FAILED! => {“changed”: false, “msg”: “Problems installing Pscx module: The following commands are already available on this system:‘gcb,Expand-Archive,Format-Hex,Get-Hash,help,prompt,Get-Clipboard,Get-Help,Set-Clipboard’. This module ‘Pscx’ may override the existing commands. If you still want to install this module ‘Pscx’, use -AllowClobber parameter.”, “nuget_changed”: false, “output”: “”, “repository_changed”: false}
Please suggest.