# | |
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment