Last active
March 18, 2016 17:39
-
-
Save oculushut/32f69698e92cdaf11ece to your computer and use it in GitHub Desktop.
Chef Cheat Sheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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