summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/ansible-pull/cleanup.yml
blob: 32a6602f9e1a7d314da3e9c88448c26430dc5449 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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"