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

This commit is contained in:
Matt Clay 2019-03-28 14:05:56 -07:00
parent 7c57caf8fa
commit 86268b09a1
3 changed files with 23 additions and 0 deletions

View 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"

View file

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

View file

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