MPI – Nice to Haves

Written by Ger Apeldoorn on. Posted in Manageable Puppet Infrastructure, Sysadmin

Intro

Some things are very nice to have when developing Puppet code. Most of them are not Puppet specific, but very helpful.

Bash git prompt

https://github.com/magicmonty/bash-git-prompt

VIM plugins

I’m using several:

  • syntastic
  • tabular
  • tlib_vim
  • vim-addon-mw-utils
  • vim-puppet
  • vim-snipmate
  • vim-snippets

Download them all at once: here. (Extract in homedir if you don’t care about overwriting .vim*)

Screenrc

My .screenrc opens a few screens into different directories. Obviously the name of the developer should be adapted… 🙂

hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m-%d %{W}%c %{g}]'

chdir /etc/puppet/dev/ger
screen -t manifests
chdir /etc/puppet/dev/ger/modules/role
screen -t roles
chdir /etc/puppet/hieradata
screen -t hiera

Script to update hiera-data repos

#!/bin/bash

for i in /etc/puppet/hieradata/*
do
        read -p "Do you want to update environment $i?" -n1 -r
        echo

        if [[ $REPLY =~ ^[Yy]$ ]]
        then
              cd $i
              git pull origin master
        fi
done

Labels:,