mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
027ffcae56
* Fix permissions. * Fix more FQCNs. * Adjust more ansible_pkg_mgr usages. * Fix plugin FQCN. * Change port 12345 -> 12347. * Print port usage first. * Support both short and long name. * Revert "Print port usage first." This reverts commit ea1dbc60f08a2664a8b01abba7aa7610bc2a23f1. * Revert "Change port 12345 -> 12347." This reverts commit cbc13510ee9f855110b4134517b2a548745a1fb0. * Fix cleanup. * Add more FQCNs. * Allow short name as well. ci_complete * Add remaining ignore.txt entries for ipaddress. * Remove kubevirt ignore.txt entries. * Added missing entries, and sorted. * Remove superfluous fact gathering. * Fix FQCNs. * Temporarily disable supervisorctl (fails on OSX because socket path is too long) * Add missing file. * Fix permissions. ci_complete
66 lines
1.4 KiB
Bash
Executable file
66 lines
1.4 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
if [[ $(python --version 2>&1) =~ 2\.6 ]]
|
|
then
|
|
echo "Openshift client is not supported on Python 2.6"
|
|
exit 0
|
|
fi
|
|
|
|
set -eux
|
|
|
|
source virtualenv.sh
|
|
pip install openshift -c constraints.txt
|
|
|
|
./server.py &
|
|
|
|
cleanup() {
|
|
kill -9 "$(jobs -p)"
|
|
}
|
|
|
|
trap cleanup INT TERM EXIT
|
|
|
|
# Fake auth file
|
|
mkdir -p ~/.kube/
|
|
cat <<EOF > ~/.kube/config
|
|
apiVersion: v1
|
|
clusters:
|
|
- cluster:
|
|
insecure-skip-tls-verify: true
|
|
server: http://localhost:12345
|
|
name: development
|
|
contexts:
|
|
- context:
|
|
cluster: development
|
|
user: developer
|
|
name: dev-frontend
|
|
current-context: dev-frontend
|
|
kind: Config
|
|
preferences: {}
|
|
users:
|
|
- name: developer
|
|
user:
|
|
token: ZDNg7LzSlp8a0u0fht_tRnPMTOjxqgJGCyi_iy0ecUw
|
|
EOF
|
|
|
|
#################################################
|
|
# RUN THE PLUGIN
|
|
#################################################
|
|
|
|
# run the plugin second
|
|
export ANSIBLE_INVENTORY_ENABLED=community.general.kubevirt
|
|
export ANSIBLE_INVENTORY=test.kubevirt.yml
|
|
|
|
cat << EOF > "$OUTPUT_DIR/test.kubevirt.yml"
|
|
plugin: community.general.kubevirt
|
|
connections:
|
|
- namespaces:
|
|
- default
|
|
EOF
|
|
|
|
ANSIBLE_JINJA2_NATIVE=1 ansible-inventory -vvvv -i "$OUTPUT_DIR/test.kubevirt.yml" --list --output="$OUTPUT_DIR/plugin.out"
|
|
|
|
#################################################
|
|
# DIFF THE RESULTS
|
|
#################################################
|
|
|
|
./inventory_diff.py "$(pwd)/test.out" "$OUTPUT_DIR/plugin.out"
|