-
-
Save rbramwell/46dc856de1f5781b55cbf9f2b71be543 to your computer and use it in GitHub Desktop.
Append hostname and current timestamp in puppet logs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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