mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Support ansible-galaxy test on FreeBSD Python 3.x.
This commit is contained in:
16
test/integration/targets/ansible-galaxy/cleanup.yml
Normal file
16
test/integration/targets/ansible-galaxy/cleanup.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
- 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
|
||||
pkgng:
|
||||
name: git
|
||||
state: absent
|
||||
autoremove: yes
|
||||
when: git_install.changed and ansible_distribution == "FreeBSD"
|
||||
@@ -4,6 +4,8 @@ set -eux -o pipefail
|
||||
|
||||
ansible-playbook setup.yml
|
||||
|
||||
trap 'ansible-playbook cleanup.yml' EXIT
|
||||
|
||||
# Need a relative custom roles path for testing various scenarios of -p
|
||||
galaxy_relative_rolespath="my/custom/roles/path"
|
||||
|
||||
|
||||
@@ -4,3 +4,8 @@
|
||||
package:
|
||||
name: git
|
||||
when: ansible_distribution != "MacOSX"
|
||||
register: git_install
|
||||
- name: save install result
|
||||
copy:
|
||||
content: '{{ git_install }}'
|
||||
dest: '{{ lookup("env", "OUTPUT_DIR") }}/git_install.json'
|
||||
|
||||
Reference in New Issue
Block a user