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,36 +256,43 @@
## ##
## pkgng - example - autoremove=yes ## pkgng - example - autoremove=yes
## ##
- name: Install GNU autotools - name: "Test autoremove=yes"
pkgng: #
name: autotools # NOTE: FreeBSD 12.0 test runner receives a "connection reset by peer" after ~20% downloaded so we are
state: latest # only running this on 12.1 or higher
register: pkgng_example7_prepare_install #
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 - 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
- automake - automake
- libtool - libtool
- m4 - m4
state: absent state: absent
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
- "'autoremoved' is in(pkgng_example7.msg)" - "'autoremoved' is in(pkgng_example7.msg)"
- not pkgng_example7_cleanup.changed - not pkgng_example7_cleanup.changed
## ##
## pkgng - example - Install single package in jail ## pkgng - example - Install single package in jail