1 2 3 4 5 6 7 8 9 10 11 12 13 | package 'httpd' service 'httpd' do action [:start, :enable] end template '/var/www/html/index.html' do source 'index.html.erb' end service 'iptables' do action :stop end |
1 | knife cookbook site download learn_chef_httpd |
1 2 | tar -zxvf learn_chef_httpd-0.1.0.tar.gz -C cookbooks rm learn_chef_httpd*.tar.gz |
1 | knife cookbook upload learn_chef_httpd |
1 2 3 | knife bootstrap {{address}} --ssh-user {{user}} --ssh-password '{{password}}' \ --sudo --use-sudo-password --node-name node1 \ --run-list 'recipe[learn_chef_httpd]' |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |