2cca9176a7
* Added my Docker Machine dynamic inventory plugin (from https://github.com/ximon18/ansible-docker-machine-inventory-plugin) to begin the process of proposing it for inclusion in Ansible core. There are no integration tests yet. The docker_swarm inventory plugin has such tests but has some concerning note in its 'aliases' file about disabling docker due to test instability and also I wouldn't know at his point how to get Docker Machine installed on the integration test platform.
20 lines
555 B
Bash
20 lines
555 B
Bash
#!/usr/bin/env bash
|
|
# Mock Docker Machine wrapper for testing purposes
|
|
|
|
[ "$MOCK_ERROR_IN" == "$1" ] && echo >&2 "Mock Docker Machine error" && exit 1
|
|
case $1 in
|
|
env)
|
|
cat <<'EOF'
|
|
export DOCKER_TLS_VERIFY="1"
|
|
export DOCKER_HOST="tcp://134.209.204.160:2376"
|
|
export DOCKER_CERT_PATH="/root/.docker/machine/machines/routinator"
|
|
export DOCKER_MACHINE_NAME="routinator"
|
|
# Run this command to configure your shell:
|
|
# eval $(docker-machine env --shell=bash routinator)
|
|
EOF
|
|
;;
|
|
|
|
*)
|
|
/usr/bin/docker-machine $*
|
|
;;
|
|
esac
|