mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
pkgng: add test for autoremove=yes
Install package with known dependencies, then remove it and ask autoremove to run.
This commit is contained in:
@@ -253,6 +253,40 @@
|
|||||||
- "(pkgng_example6.stdout | regex_findall('will be affected', multiline=True) | count) == 2"
|
- "(pkgng_example6.stdout | regex_findall('will be affected', multiline=True) | count) == 2"
|
||||||
- pkgng_example6_cleanup.changed
|
- pkgng_example6_cleanup.changed
|
||||||
|
|
||||||
|
##
|
||||||
|
## pkgng - example - autoremove=yes
|
||||||
|
##
|
||||||
|
- name: Install GNU autotools
|
||||||
|
pkgng:
|
||||||
|
name: autotools
|
||||||
|
state: latest
|
||||||
|
register: pkgng_example7_prepare_install
|
||||||
|
|
||||||
|
- name: Remove GNU autotools and run pkg autoremove
|
||||||
|
pkgng:
|
||||||
|
name: autotools
|
||||||
|
state: absent
|
||||||
|
autoremove: yes
|
||||||
|
register: pkgng_example7
|
||||||
|
|
||||||
|
- name: Check if autoremove uninstalled known autotools dependencies
|
||||||
|
pkgng:
|
||||||
|
name:
|
||||||
|
- autoconf
|
||||||
|
- automake
|
||||||
|
- libtool
|
||||||
|
- m4
|
||||||
|
state: absent
|
||||||
|
check_mode: yes
|
||||||
|
register: pkgng_example7_cleanup
|
||||||
|
|
||||||
|
- name: Ensure pkgng autoremove works correctly
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- pkgng_example7_prepare_install.changed
|
||||||
|
- "'autoremoved' is in(pkgng_example7.msg)"
|
||||||
|
- not pkgng_example7_cleanup.changed
|
||||||
|
|
||||||
##
|
##
|
||||||
## pkgng - example - Install single package in jail
|
## pkgng - example - Install single package in jail
|
||||||
##
|
##
|
||||||
|
|||||||
Reference in New Issue
Block a user