recipes/setup.rb:
...
template '/etc/motd' do
source 'motd.erb'
variables(:name => 'Dmitri')
action :create
owner 'root'
group 'root'
end
...
templates/motd.erb:
This vagrant instance is property of <%= @name %>
HOSTNAME: <%= node['hostname'] %>
IPADDRESS: <%= node['ipaddress'] %>
CPU: <%= node['cpu']['0']['mhz'] %>
Memory: <%= node['memory']['total'] %>