Project

General

Profile

Actions

Provisioning Email Reports » History » Revision 1

Revision 1/3 | Next »
Josh Baird, 06/04/2012 03:55 PM


Provisioning Email Reports

Some may find it useful to have a host email you a small report once it has been provisioned. Cobbler does this out of the box. This is how I made it work using Foreman.

1. Browse to More -> Provisioning Templates
2. Click "New Template"
3. Name the report
4. Choose "Finish" for the "Template kind"
5. Paste the following in the box:

@#!/bin/sh
  1. Generate an email report once the host is provisioned

echo "
Foreman build report. ==========================================================
http://foreman.domain.com/

The system has been provisioned and is now ready for use. Additional Puppet modules may be assigned from Foreman.

Hostname: <%25= @host %25> (<%25= @host.ip %25>)
Foreman Host-Group: <%25= @host.hostgroup %25>
MAC: <%25= @host.mac %25>
OS: <%25= @host.os %25>
Puppet Master: <%25= @host.puppetmaster %25>
Puppet Environment: <%25= @host.environment %25>

==========================================================

Questions? Contact EIT UNIX TEAM ()" | mail -s "Linux Build Report (<%25= host %25> [<%25= @host.ip %25>])" -r "Foreman (foreman@domain.com)" tunixteam@domain.com

You can use other variables that Foreman makes available to you as well. This email will be generated FROM the host that you are provisioning, not from the Foreman host.

Updated by Josh Baird over 12 years ago · 3 revisions