1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

pkgng: test autoremove=yes only on FreeBSD > 12

The CI test runner on FreeBSD 12.0 times out when
downloading large packages.
This commit is contained in:
Ross Williams 2021-10-12 01:52:30 +00:00
parent 4f18ef5ba6
commit a803240941

View file

@ -256,36 +256,43 @@
##
## pkgng - example - autoremove=yes
##
- name: Install GNU autotools
pkgng:
name: autotools
state: latest
register: pkgng_example7_prepare_install
- name: "Test autoremove=yes"
#
# NOTE: FreeBSD 12.0 test runner receives a "connection reset by peer" after ~20% downloaded so we are
# only running this on 12.1 or higher
#
when: ansible_distribution_version is version('12.01', '>=')
block:
- 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: 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: 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
- 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