Support ansible-galaxy test on FreeBSD Python 3.x.
This commit is contained in:
parent
7c57caf8fa
commit
86268b09a1
3 changed files with 23 additions and 0 deletions
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
|
ansible-playbook setup.yml
|
||||||
|
|
||||||
|
trap 'ansible-playbook cleanup.yml' EXIT
|
||||||
|
|
||||||
# Need a relative custom roles path for testing various scenarios of -p
|
# Need a relative custom roles path for testing various scenarios of -p
|
||||||
galaxy_relative_rolespath="my/custom/roles/path"
|
galaxy_relative_rolespath="my/custom/roles/path"
|
||||||
|
|
||||||
|
|
|
@ -4,3 +4,8 @@
|
||||||
package:
|
package:
|
||||||
name: git
|
name: git
|
||||||
when: ansible_distribution != "MacOSX"
|
when: ansible_distribution != "MacOSX"
|
||||||
|
register: git_install
|
||||||
|
- name: save install result
|
||||||
|
copy:
|
||||||
|
content: '{{ git_install }}'
|
||||||
|
dest: '{{ lookup("env", "OUTPUT_DIR") }}/git_install.json'
|
||||||
|
|
Loading…
Reference in a new issue