ansible/test/integration/targets/pull/cleanup.yml
Matt Clay 8774b2f697 Use package for pkgng and zypper in tests.
This allows tests to run on other platforms when `pkgng` or `zypper` are not present.
2020-02-11 13:57:01 -08:00

16 lines
469 B
YAML

- hosts: localhost
vars:
git_install: '{{ lookup("file", lookup("env", "OUTPUT_DIR") + "/git_install.json") | from_json }}'
tasks:
- name: remove unwanted packages
package:
name: git
state: absent
when: git_install.changed
- name: remove auto-installed packages from FreeBSD
package:
name: git
state: absent
autoremove: yes
when: git_install.changed and ansible_distribution == "FreeBSD"