Support ansible-galaxy test on FreeBSD Python 3.x.

pull/54566/head
Matt Clay 5 years ago
parent 7c57caf8fa
commit 86268b09a1

@ -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'

Loading…
Cancel
Save