The Puppet master will inject variables such as $servername
to the catalog compilation, which are listed at Puppet master variables.
You could include these in reports by using notify { "Compiled on $servername": }
in one of your manifests, or adding it to a file template (e.g. MOTD).
Another mechanism would be to change the config_version
- a unique name/number given to each catalog compilation, often used to show the current git/SCM revision of the manifests being built. By default it shows the current Unix epoch. You could change this to return the epoch and master hostname.
config_version
is usually set per-environment, e.g. using environment.conf: config_version in environment.conf, and can point to a script that you deploy to every master and that outputs a string including the server's hostname.