Created
April 5, 2011 21:11
-
-
Save rcreasey/904564 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Cookbook Name:: cloud | |
# Recipe:: hostname | |
# | |
template "/etc/hosts" do | |
source "hostname/hosts.erb" | |
owner "root" | |
group "root" | |
mode 0644 | |
backup false | |
end | |
execute "Reset Hostname" do | |
command "hostname --file /etc/hostname" | |
action :nothing | |
end | |
file "/etc/hostname" do | |
content node.name | |
notifies :run, resources(:execute => "Reset Hostname"), :immediately | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127.0.0.1 localhost.localdomain localhost | |
<%= node.ipaddress %> <%= node.name %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment