2023-06-06 20:49:12 +02:00
|
|
|
---
|
|
|
|
# Copyright (c) Ansible Project
|
|
|
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2024-03-25 06:42:04 +01:00
|
|
|
# NOTE This is currently disabled for performance reasons!
|
|
|
|
|
2024-04-26 20:56:08 +02:00
|
|
|
- name: Make sure package is not installed (wisdom)
|
2023-06-06 20:49:12 +02:00
|
|
|
community.general.snap:
|
2024-04-26 20:56:08 +02:00
|
|
|
name: wisdom
|
2023-06-06 20:49:12 +02:00
|
|
|
state: absent
|
|
|
|
|
|
|
|
# Test for https://github.com/ansible-collections/community.general/issues/1606
|
2024-04-26 20:56:08 +02:00
|
|
|
- name: Install package (wisdom)
|
2023-06-06 20:49:12 +02:00
|
|
|
community.general.snap:
|
2024-04-26 20:56:08 +02:00
|
|
|
name: wisdom
|
2023-06-06 20:49:12 +02:00
|
|
|
state: present
|
2024-04-26 20:56:08 +02:00
|
|
|
register: install_wisdom
|
2023-06-06 20:49:12 +02:00
|
|
|
|
2024-04-26 20:56:08 +02:00
|
|
|
- name: Install package with channel (wisdom)
|
2023-06-06 20:49:12 +02:00
|
|
|
community.general.snap:
|
2024-04-26 20:56:08 +02:00
|
|
|
name: wisdom
|
2023-06-06 20:49:12 +02:00
|
|
|
state: present
|
2024-04-26 20:56:08 +02:00
|
|
|
channel: latest/edge
|
|
|
|
register: install_wisdom_chan
|
2023-06-06 20:49:12 +02:00
|
|
|
|
2024-04-26 20:56:08 +02:00
|
|
|
- name: Install package with channel (wisdom) again
|
2023-06-06 20:49:12 +02:00
|
|
|
community.general.snap:
|
2024-04-26 20:56:08 +02:00
|
|
|
name: wisdom
|
2023-06-06 20:49:12 +02:00
|
|
|
state: present
|
2024-04-26 20:56:08 +02:00
|
|
|
channel: latest/edge
|
|
|
|
register: install_wisdom_chan_again
|
2023-06-06 20:49:12 +02:00
|
|
|
|
2024-04-26 20:56:08 +02:00
|
|
|
- name: Remove package (wisdom)
|
2023-06-06 20:49:12 +02:00
|
|
|
community.general.snap:
|
2024-04-26 20:56:08 +02:00
|
|
|
name: wisdom
|
2023-06-06 20:49:12 +02:00
|
|
|
state: absent
|
2024-04-26 20:56:08 +02:00
|
|
|
register: remove_wisdom
|
2023-06-06 20:49:12 +02:00
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
2024-04-26 20:56:08 +02:00
|
|
|
- install_wisdom is changed
|
|
|
|
- install_wisdom_chan is changed
|
|
|
|
- install_wisdom_chan_again is not changed
|
|
|
|
- remove_wisdom is changed
|
2023-07-08 10:10:32 +02:00
|
|
|
|
|
|
|
- name: Install package (shellcheck)
|
|
|
|
community.general.snap:
|
|
|
|
name: shellcheck
|
|
|
|
state: present
|
|
|
|
register: install_shellcheck
|
|
|
|
|
|
|
|
- name: Install package with channel (shellcheck)
|
|
|
|
community.general.snap:
|
|
|
|
name: shellcheck
|
|
|
|
channel: edge
|
|
|
|
state: present
|
|
|
|
register: install_shellcheck_chan
|
|
|
|
|
|
|
|
- name: Install package with channel (shellcheck) again
|
|
|
|
community.general.snap:
|
|
|
|
name: shellcheck
|
|
|
|
channel: edge
|
|
|
|
state: present
|
|
|
|
register: install_shellcheck_chan_again
|
|
|
|
|
|
|
|
- name: Remove package (shellcheck)
|
|
|
|
community.general.snap:
|
|
|
|
name: shellcheck
|
|
|
|
state: absent
|
|
|
|
register: remove_shellcheck
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- install_shellcheck is changed
|
|
|
|
- install_shellcheck_chan is changed
|
|
|
|
- install_shellcheck_chan_again is not changed
|
|
|
|
- remove_shellcheck is changed
|