mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Win deprecate 2.8 (#45473)
* Remove deprecated/expired functionality * win:_msi: Remove the win_msi module * removed some missed deprecated return options and added porting guide reference Co-authored-by: dagwieers <dagwieers@users.noreply.github.com>
This commit is contained in:
@@ -1 +0,0 @@
|
||||
shippable/windows/group1
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
|
||||
msi_url: https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_win_msi/7z922-x64.msi
|
||||
msi_download_path: "C:\\Program Files\\7z922-x64.msi"
|
||||
msi_install_path: "C:\\Program Files\\7-Zip"
|
||||
msi_product_code: "{23170F69-40C1-2702-0922-000001000000}"
|
||||
@@ -1,70 +0,0 @@
|
||||
# test code for the win_msi module
|
||||
# (c) 2014, Chris Church <chris@ninemoreminutes.com>
|
||||
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# Ansible is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
- name: use win_get_url module to download msi
|
||||
win_get_url:
|
||||
url: "{{msi_url}}"
|
||||
dest: "{{msi_download_path}}"
|
||||
register: win_get_url_result
|
||||
|
||||
- name: make sure msi is uninstalled
|
||||
win_msi:
|
||||
path: "{{msi_product_code|default(msi_download_path,true)}}"
|
||||
state: absent
|
||||
wait: true
|
||||
ignore_errors: true
|
||||
|
||||
- name: install msi
|
||||
win_msi:
|
||||
path: "{{msi_download_path}}"
|
||||
wait: true
|
||||
register: win_msi_install_result
|
||||
|
||||
- name: check win_msi install result
|
||||
assert:
|
||||
that:
|
||||
- "win_msi_install_result is not failed"
|
||||
- "win_msi_install_result is changed"
|
||||
|
||||
- name: install msi again with creates argument
|
||||
win_msi:
|
||||
path: "{{msi_download_path}}"
|
||||
wait: true
|
||||
creates: "{{msi_install_path}}"
|
||||
register: win_msi_install_again_result
|
||||
|
||||
- name: check win_msi install again result
|
||||
# ignore errors because test/module is unreliable
|
||||
ignore_errors: true
|
||||
assert:
|
||||
that:
|
||||
- "win_msi_install_again_result is not failed"
|
||||
- "win_msi_install_again_result is not changed"
|
||||
|
||||
- name: uninstall msi
|
||||
win_msi:
|
||||
path: "{{msi_download_path}}"
|
||||
wait: true
|
||||
state: absent
|
||||
register: win_msi_uninstall_result
|
||||
|
||||
- name: check win_msi uninstall result
|
||||
assert:
|
||||
that:
|
||||
- "win_msi_uninstall_result is not failed"
|
||||
- "win_msi_uninstall_result is changed"
|
||||
Reference in New Issue
Block a user