Last active
October 12, 2017 14:40
-
-
Save aoki/aeecfe3ff154d7a4456928e593b98c66 to your computer and use it in GitHub Desktop.
Ansible execution test scripts on docker.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment