Provisioning Email Reports » History » Revision 2
Revision 1 (Josh Baird, 06/04/2012 03:55 PM) → Revision 2/3 (Josh Baird, 06/04/2012 03:56 PM)
h1. 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: <pre> @#!/bin/sh #!/bin/sh # 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 (eitunixteam@follett.com)" | mail -s "Linux Build Report (<%25= @host %25> [<%25= @host.ip %25>])" -r "Foreman (foreman@domain.com)" tunixteam@domain.com </pre> 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.