https://github.com/wikimedia/operations-puppet
Raw File
Tip revision: e57932207a1306a1bb14616fe5b48b40f61dde73 authored by Guillaume Lederrey on 08 February 2016, 10:44:39 UTC
Ship Elasticsearch logs to logstash
Tip revision: e579322
localrun
#!/bin/bash
usage ()
{
  echo "${0} -- running puppet locally"
  echo ''
  echo '        ./localrun [lint] [-h] -- runs puppet against local host'
  echo ''
  exit
}

PUPPET_BINARY=/usr/bin/puppet
#test -x $PUPPET_BINARY || { echo "$PUPPET_BINARY not installed";
#        if [ "$1" = "-h" ]; then exit 0;
#        else usage; exit 1; fi; }

if [ "$1" == "-h" ]
  then
    usage
    exit 0
fi

if [ "$1" == "lint" ]
  then
  "$PWD""/linter"
fi

puppet apply --modulepath=../modules $@ ../manifests/site.pp 2>&1 | grep  -v 'exported resources'
back to top