Skip to content

Instantly share code, notes, and snippets.

@oculushut
Last active March 18, 2016 17:39
Show Gist options
  • Save oculushut/32f69698e92cdaf11ece to your computer and use it in GitHub Desktop.
Save oculushut/32f69698e92cdaf11ece to your computer and use it in GitHub Desktop.
Chef Cheat Sheet
RUN LOCAL RECIPE BOOK
chef-client --local-mode [recipe book filename
REFERENCE FOR FILE RESOURCE
https://docs.chef.io/resource_file.html
DELETE A FILE RECIPE
file 'C:\Users\Administrator\chef-repo\settings.ini' do
action :delete
end
CREATE A FILE
file 'C:\Users\Administrator\chef-repo\settings.ini' do
content 'greeting=hello chef'
end
CREATE A FOLDER STRUCTURE (TEMP and MESSAGES DIRECTORIES)
directory 'C:\temp\messages' do
recursive true
end
SWITCH ON A SERVICE
service 'w3svc' do
action [:enable, :start]
end
CREATE A COOKBOOK CALLED LEARN_CHEF_IIS
chef generate cookbook learn_chef_iis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment