I use chef it does not work. Kinda shocked. Why is chef having a problem with line of code?Why is happening in chef?If I run the below command line in the shell...the replace works sed -i 's/^\(127\)/#\1/' /etc/hosts
bash "comment_hostname" do
user "root"
code <<-EOH
sed -i 's/^\(127\)/#\1/' /etc/hosts
EOH
action :run
not_if {File.exists?("#{Chef::Config[:file_cache_path]}/hostname_test")}
end
Archive powered by MHonArc 2.6.16.