Skip to content

Instantly share code, notes, and snippets.

@rcreasey
Created May 21, 2010 19:54
Show Gist options
  • Select an option

  • Save rcreasey/409337 to your computer and use it in GitHub Desktop.

Select an option

Save rcreasey/409337 to your computer and use it in GitHub Desktop.
127.0.0.1 localhost localhost.localdomain
10.93.54.53 someserver.example.com someserver
10.93.55.250 filer5-dd
10.93.55.250 filer5-dd
default[:mount_aliases] = Array.new
template "/etc/hosts" do
source "hosts.erb"
owner "root"
group "root"
mode 0644
backup false
variables(:mount_aliases => node[:mount_aliases])
not_if { node[:mount_aliases].empty? }
end
127.0.0.1 localhost localhost.localdomain
<%= node[:ipaddress] %> <%= node[:fqdn] %> <%= node[:hostname] %>
<% @mount_aliases.each do |host| %>
<%= host[:ip] %> <%= host[:names] %>
<% end %>
name "some role"
description "blah blah"
recipes "mounts"
override_attributes(
"mount_aliases" => [
{'ip' => '10.93.55.250', 'names' => 'filer5-dd'}
]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment