ansible-collections / ansible.windows

Windows core collection for Ansible
https://galaxy.ansible.com/ansible/windows
GNU General Public License v3.0
254 stars 171 forks source link

Win_Package uninstallation will exit without doing anything when path is pointing to a URL #667

Open yangxinyun opened 1 month ago

yangxinyun commented 1 month ago
SUMMARY

When win_package path argument is pointing to a URL and state argument is set to absent, this module will exit without doing uninstallation via downloading the URL specified software package and issue uninstall command as per the arguments

ISSUE TYPE
COMPONENT NAME

win_package

ANSIBLE VERSION
ansible-core 2.11
COLLECTION VERSION
Ansible.Windows version 2.5.0
CONFIGURATION
NA
OS / ENVIRONMENT

RedHat Linux

STEPS TO REPRODUCE
- name: Uninstall python 
  ansible.windows.win_package:
    path: https://www.python.org/ftp/python/3.11.0/python-3.11.0-amd64.exe
    arguments:
      - /uninstall
      - /quiet
     state: absent
EXPECTED RESULTS

python installed by https://www.python.org/ftp/python/3.11.0/python-3.11.0-amd64.exe is removed accordingly.

ACTUAL RESULTS
nothing happened, the module exit without any change