Skip to content

Instantly share code, notes, and snippets.

@rajeshapt
rajeshapt / dns.rb
Created August 2, 2018 20:47
Chef 12 dns recipe error on line no. 4
Chef::Log.info("****** DNS reconfig ******")
execute 'Configure hostname2' do
command "echo #{node["opsworks"]["instance"]["hostname"]}.#{node["opsworks"]["stack"]["name"]}.domain_name > /etc/hostname"
ignore_failure true
end
template '/etc/sysconfig/network' do
source 'network.erb'