Split out platform specific cleanup in pip test.
This commit is contained in:
parent
89c8eb5a08
commit
11eee1181a
3 changed files with 18 additions and 12 deletions
5
test/integration/targets/pip/tasks/default_cleanup.yml
Normal file
5
test/integration/targets/pip/tasks/default_cleanup.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
- name: remove unwanted packages
|
||||
package:
|
||||
name: git
|
||||
state: absent
|
||||
when: git_install.changed
|
6
test/integration/targets/pip/tasks/freebsd_cleanup.yml
Normal file
6
test/integration/targets/pip/tasks/freebsd_cleanup.yml
Normal file
|
@ -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
|
||||
always:
|
||||
- name: remove unwanted packages
|
||||
package:
|
||||
name: git
|
||||
state: absent
|
||||
when: git_install.changed
|
||||
|
||||
- name: remove auto-installed packages from FreeBSD
|
||||
pkgng:
|
||||
name: git
|
||||
state: absent
|
||||
autoremove: yes
|
||||
when: git_install.changed and ansible_distribution == "FreeBSD"
|
||||
- name: platform specific cleanup
|
||||
include_tasks: "{{ cleanup_filename }}"
|
||||
with_first_found:
|
||||
- "{{ ansible_distribution | lower }}_cleanup.yml"
|
||||
- "default_cleanup.yml"
|
||||
loop_control:
|
||||
loop_var: cleanup_filename
|
||||
when: ansible_fips|bool != True
|
||||
module_defaults:
|
||||
pip:
|
||||
|
|
Loading…
Reference in a new issue