pqwsa 发表于 2015-11-26 07:54:16

Chef之Resource

  file 'motd' do

  content 'hello world'
  end
  

  file 'motd' do

  action :delete
end
  

  file '/etc/motd' do
action :create
mode '0755'
group 'root'
owner 'root'
end

  

  package 'httpd'

service 'httpd' do
action [:enable, :start]
end

  

  template '/var/www/html/index.html' do
source 'index.html.erb'
end

  

  service 'iptables' do
action :stop
end

  

  

  

  
页: [1]
查看完整版本: Chef之Resource