Split out platform specific cleanup in pip test.

pull/66863/head
Matt Clay 5 years ago
parent 89c8eb5a08
commit 11eee1181a

@ -0,0 +1,5 @@
- name: remove unwanted packages
package:
name: git
state: absent
when: git_install.changed

@ -0,0 +1,6 @@
- name: remove auto-installed packages from FreeBSD
pkgng:
name: git
state: absent
autoremove: yes
when: git_install.changed

@ -20,18 +20,13 @@
- include_tasks: pip.yml - include_tasks: pip.yml
always: always:
- name: remove unwanted packages - name: platform specific cleanup
package: include_tasks: "{{ cleanup_filename }}"
name: git with_first_found:
state: absent - "{{ ansible_distribution | lower }}_cleanup.yml"
when: git_install.changed - "default_cleanup.yml"
loop_control:
- name: remove auto-installed packages from FreeBSD loop_var: cleanup_filename
pkgng:
name: git
state: absent
autoremove: yes
when: git_install.changed and ansible_distribution == "FreeBSD"
when: ansible_fips|bool != True when: ansible_fips|bool != True
module_defaults: module_defaults:
pip: pip:

Loading…
Cancel
Save