2024-08-26 11:35:39 +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-09-07 09:37:47 +02:00
|
|
|
- name: Ensure application pylint is uninstalled
|
2024-08-26 11:35:39 +02:00
|
|
|
community.general.pipx:
|
|
|
|
name: pylint
|
|
|
|
state: absent
|
|
|
|
|
2024-09-07 09:37:47 +02:00
|
|
|
- name: Install application pylint
|
2024-08-26 11:35:39 +02:00
|
|
|
community.general.pipx:
|
|
|
|
name: pylint
|
|
|
|
register: install_pylint
|
|
|
|
|
2024-09-07 09:37:47 +02:00
|
|
|
- name: Inject packages
|
2024-08-26 11:35:39 +02:00
|
|
|
community.general.pipx:
|
|
|
|
state: inject
|
|
|
|
name: pylint
|
|
|
|
inject_packages:
|
|
|
|
- licenses
|
|
|
|
register: inject_pkgs_pylint
|
|
|
|
|
2024-09-07 09:37:47 +02:00
|
|
|
- name: Inject packages with apps
|
2024-08-26 11:35:39 +02:00
|
|
|
community.general.pipx:
|
|
|
|
state: inject
|
|
|
|
name: pylint
|
|
|
|
inject_packages:
|
|
|
|
- black
|
|
|
|
install_apps: true
|
|
|
|
register: inject_pkgs_apps_pylint
|
|
|
|
|
2024-09-07 09:37:47 +02:00
|
|
|
- name: Cleanup pylint
|
2024-08-26 11:35:39 +02:00
|
|
|
community.general.pipx:
|
|
|
|
state: absent
|
|
|
|
name: pylint
|
|
|
|
register: uninstall_pylint
|
|
|
|
|
2024-09-07 09:37:47 +02:00
|
|
|
- name: Check assertions inject_packages
|
2024-08-26 11:35:39 +02:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- install_pylint is changed
|
|
|
|
- inject_pkgs_pylint is changed
|
|
|
|
- '"pylint" in inject_pkgs_pylint.application'
|
|
|
|
- '"licenses" in inject_pkgs_pylint.application["pylint"]["injected"]'
|
|
|
|
- inject_pkgs_apps_pylint is changed
|
|
|
|
- '"pylint" in inject_pkgs_apps_pylint.application'
|
|
|
|
- '"black" in inject_pkgs_apps_pylint.application["pylint"]["injected"]'
|
|
|
|
- uninstall_pylint is changed
|