Last active
December 11, 2019 19:25
-
-
Save kidbrax/0542890fe4c8ca22cbcf13b8d8229a71 to your computer and use it in GitHub Desktop.
kitchen alias to keep from retyping regex
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
# Provides an alias for the kitchen cli - https://docs.chef.io/ctl_kitchen.html | |
# place the following into your ~/.bashrc or similar | |
kitchen_specific_instances() { | |
if [ -z "$WORKING_INSTANCES" ] | |
then | |
echo "\$WORKING_INSTANCES is empty" | |
else | |
echo "\$WORKING_INSTANCES=$WORKING_INSTANCES" | |
fi | |
echo $1 | |
echo "kitchen $1 '$WORKING_INSTANCES'" | |
kitchen $1 "'$WORKING_INSTANCES'" | |
} | |
alias kit=kitchen_specific_instances | |
# then you could use something like this | |
# export WORKING_INSTANCES="client.*(2016|7).*" | |
# kit list | |
# kit create | |
# kit converge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment