diff --git a/tests/integration/targets/pkgng/tasks/freebsd.yml b/tests/integration/targets/pkgng/tasks/freebsd.yml index 9a0f9df020..b7b2a35636 100644 --- a/tests/integration/targets/pkgng/tasks/freebsd.yml +++ b/tests/integration/targets/pkgng/tasks/freebsd.yml @@ -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