diff options
-rw-r--r-- | bashrc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/bashrc b/bashrc index 9382d5e..63a96f1 100644 --- a/bashrc +++ b/bashrc @@ -66,15 +66,34 @@ alias gerp="grep --color=auto" alias grep="grep --color=auto" alias pjson="python -mjson.tool" +alias s="cd ~/src/source" +alias eb="cd ~/src/source/eventbus" +alias ops="cd ~/src/twitter-ops" # tmux alias tmux='tmux -2' alias tmuxl='tmux new -A -s local' alias tmuxr='tmux new -A -s remote' +# local stuff +[ -f "${HOME}/.bash_local" ] && source "${HOME}/.bash_local" + function gitme { git config --local user.email "franckcuny@gmail.com" git config --local user.name "Franck Cuny" } -[ -f "${HOME}/.bash_local" ] && source "${HOME}/.bash_local" +function puppet-master { + local hostlist=$1 + if [[ -z "${hostlist}" ]]; then + echo "host list is missing" + return 1 + fi + + batch_size=$(sed -n '$=' "${hostlist}") + if [[ "${batch_size}" -gt 10 ]]; then + batch_size=10 + fi + loony -F "${hostlist}" -t "${batch_size}" run sudo puppet-util run +} + |