Skip to content

Instantly share code, notes, and snippets.

@obazoud
Created September 11, 2013 06:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save obazoud/6520078 to your computer and use it in GitHub Desktop.
Save obazoud/6520078 to your computer and use it in GitHub Desktop.
Append hostname and current timestamp in puppet logs
cd /etc/puppet/ && puppet agent --test --environment=$1 --verbose --debug 2>&1 | awk -v hostname=$(hostname) '{print hostname" - " strftime("%Y-%m-%d %H:%M:%S") " - " $0}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment