mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02: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:
parent
aa88d68ebc
commit
4f18ef5ba6
1 changed files with 34 additions and 0 deletions
|
@ -253,6 +253,40 @@
|
|||
- "(pkgng_example6.stdout | regex_findall('will be affected', multiline=True) | count) == 2"
|
||||
- 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
|
||||
##
|
||||
|
|
Loading…
Reference in a new issue