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
commit a803240941

View file

@ -256,20 +256,27 @@
## ##
## pkgng - example - autoremove=yes ## pkgng - example - autoremove=yes
## ##
- name: Install GNU autotools - 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: pkgng:
name: autotools name: autotools
state: latest state: latest
register: pkgng_example7_prepare_install register: pkgng_example7_prepare_install
- name: Remove GNU autotools and run pkg autoremove - name: Remove GNU autotools and run pkg autoremove
pkgng: pkgng:
name: autotools name: autotools
state: absent state: absent
autoremove: yes autoremove: yes
register: pkgng_example7 register: pkgng_example7
- name: Check if autoremove uninstalled known autotools dependencies - name: Check if autoremove uninstalled known autotools dependencies
pkgng: pkgng:
name: name:
- autoconf - autoconf
@ -280,7 +287,7 @@
check_mode: yes check_mode: yes
register: pkgng_example7_cleanup register: pkgng_example7_cleanup
- name: Ensure pkgng autoremove works correctly - name: Ensure pkgng autoremove works correctly
assert: assert:
that: that:
- pkgng_example7_prepare_install.changed - pkgng_example7_prepare_install.changed