ringohub
10/12/2017 - 4:36 AM

Ansible execution test scripts on docker.

Ansible execution test scripts on docker.

#!/bin/bash -eu

read -p "📦  Input component (e.g. web/batch): " component
read -p "🎫  Input task if you want to choice start task (e.g. 'Install docker-compose'): " startAt
read -p "💡  Using --step? (y/n): " step

case $step in
  [yY]|[yY]es|yes|YES)  step='--step';;
  *)                    unset step;;
esac

ansible-playbook -c docker -u root \
  -i test/inventories/docker \
  --vault-password-file ./keys/local.key \
  --skip-tag docker-ignore \
  ${startAt:+--start-at "${startAt}"} \
  ${step:+--step} \
  test/playbooks/docker-${component}.yml