Instance variables to server side scripts

HI,

I'm currently using foreman for server install only, I don't use puppet as
the servers are leased off after install. I've got some "firstboot" scripts
that run (at first boot) and I'm currently using a finish script to grab
the file and a bunch of piped sed's to hand off the values I need.

Is there a way of doing this in a more elegant way ?

or is this method my best option:

/usr/bin/wget -O- --no-check-certificate
https://gist.githubusercontent.com/xxxxx
> sed 's/H_NAME=/H_NAME=<%= @host %>/'
> sed 's/OS_NAME=/OS_NAME=<%= @host.operatingsystem.name %>/'
> sed 's/OS_MAJOR=/OS_MAJOR=<%= @host.operatingsystem.major.to_i %>/'
> sed 's/OS_MINOR=/OS_MINOR=<%= @host.operatingsystem.minor.to_i %>/'
> sed 's/IPV4=/IPV4=<%= @host.ip %>/'
> sed 's/NMASK=/NMASK=<%= @host.subnet.mask %>/'
> sed 's/GWAY=/GWAY=<%= @host.subnet.gateway %>/'
> sed 's/RAIDSET=/RAIDSET=<%= @host.params['RAID'] %>/'> /opt/firstboot
chmod +x /opt/firstboot

Regards, Daniel