# Some exports export INFRA=/home/hybris/dev/bearstech/infra export PATH=$INFRA/bin:$INFRA/../xen:$PATH export ANSIBLE_BEARSTECH_LOG_DIR=/var/log/ansible-bearstech # Everyday aliases bt-alerts() {ssh root@pidou monshow | grep -v "none$" | grep -v "^ " | grep -v "^$"} bt-each() {$INFRA/bin/foreach $@} bt-host() {cat $INFRA/host/$1} bt-known_hosts() {scp cloud@pompon:.ssh/known_hosts ~/.ssh/known_hosts.bearstech} bt-release() {ssh root@$1 cat /etc/debian_version} # Google Cloud # The next line updates PATH for the Google Cloud SDK. source '/home/hybris/dev/bearstech/google-cloud-sdk/path.zsh.inc' # The next line enables shell command completion for gcloud. source '/home/hybris/dev/bearstech/google-cloud-sdk/completion.zsh.inc' # OVH cloud nova-env() {source $INFRA/cloud/ovh-$1.env} # Some completion functions _complete_bt-host() {reply=($(ls $INFRA/host))} _complete_nova-env() {reply=($(ls $INFRA/cloud/ovh-*.env | sed "s@$INFRA/cloud/ovh-\(.*\).env@\1@"))} compctl -K _complete_bt-host bt-dom0 compctl -K _complete_bt-host bt-host compctl -K _complete_bt-host bt-release compctl -K _complete_nova-env nova-env