summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/ansible-pull/cleanup.yml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/ansible-pull/cleanup.yml')
-rw-r--r--test/integration/targets/ansible-pull/cleanup.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/integration/targets/ansible-pull/cleanup.yml b/test/integration/targets/ansible-pull/cleanup.yml
new file mode 100644
index 0000000..32a6602
--- /dev/null
+++ b/test/integration/targets/ansible-pull/cleanup.yml
@@ -0,0 +1,16 @@
+- hosts: localhost
+ vars:
+ git_install: '{{ lookup("file", lookup("env", "OUTPUT_DIR") + "/git_install.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"