[ansible-test] First attempt at freebsd/11.4 (#72655)

Change:
- Try CI against freebsd 11.4

Test Plan:
- ci_complete

Tickets:
- Fixes #48782

Signed-off-by: Rick Elrod <rick@elrod.me>
pull/73330/head
Rick Elrod 3 years ago committed by GitHub
parent fe792fdcd2
commit 4357a78130
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -93,8 +93,8 @@ stages:
test: rhel/7.9
- name: RHEL 8.3
test: rhel/8.3
- name: FreeBSD 11.1
test: freebsd/11.1
- name: FreeBSD 11.4
test: freebsd/11.4
- name: FreeBSD 12.2
test: freebsd/12.2
groups:
@ -170,8 +170,8 @@ stages:
test: rhel/7.9
- name: RHEL 8.3
test: rhel/8.3
- name: FreeBSD 11.1
test: freebsd/11.1
- name: FreeBSD 11.4
test: freebsd/11.4
- name: FreeBSD 12.2
test: freebsd/12.2
- stage: Incidental_Docker

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - Now supports freebsd/11.4 remote (https://github.com/ansible/ansible/issues/48782).

@ -40,3 +40,14 @@
name: git
state: absent
when: git_install is changed
# This gets dragged in as a dependency of git on FreeBSD.
# We need to remove it too when done.
- name: remove python37 if necessary
package:
name: python37
state: absent
when:
- git_install is changed
- ansible_distribution == 'FreeBSD'
- ansible_python.version.major == 2

@ -3,7 +3,29 @@
set -eux -o pipefail
# make sure git is installed
git --version || ansible-playbook collection-tests/install-git.yml -i ../../inventory "$@"
set +e
git --version
gitres=$?
set -e
if [[ $gitres -ne 0 ]]; then
ansible-playbook collection-tests/install-git.yml -i ../../inventory "$@"
fi
dir="$(pwd)"
uninstall_git() {
cd "$dir"
ansible-playbook collection-tests/uninstall-git.yml -i ../../inventory "$@"
}
# This is kind of a hack. The uninstall playbook has no way to know the result
# of the install playbook to determine if it changed. So instead, we assume
# that if git wasn't found to begin with, it was installed by the playbook and
# and needs to be removed when we exit.
if [[ $gitres -ne 0 ]]; then
trap uninstall_git EXIT
fi
# init sub project
mkdir "${WORK_DIR}/sub"

@ -0,0 +1,18 @@
- hosts: localhost
tasks:
- name: Make sure git is uninstalled
package:
name: git
state: absent
register: git_remove
# This gets dragged in as a dependency of git on FreeBSD.
# We need to remove it too when done.
- name: remove python37 if necessary
package:
name: python37
state: absent
when:
- git_remove is changed
- ansible_distribution == 'FreeBSD'
- ansible_python.version.major == 2

@ -0,0 +1,3 @@
- name: Install Paramiko for Python 3 on FreeBSD 11.4
pkgng:
name: py37-paramiko

@ -0,0 +1,4 @@
- name: Uninstall Paramiko for Python 3 on FreeBSD 11.4
pkgng:
name: py37-paramiko
state: absent

@ -1,4 +1,5 @@
freebsd/11.1 python=2.7,3.6 python_dir=/usr/local/bin
freebsd/11.4 python=2.7,3.7 python_dir=/usr/local/bin
freebsd/12.1 python=3.6,2.7 python_dir=/usr/local/bin
freebsd/12.2 python=3.7,2.7 python_dir=/usr/local/bin
osx/10.11 python=2.7 python_dir=/usr/local/bin

Loading…
Cancel
Save