{"id":529,"date":"2017-02-27T18:48:58","date_gmt":"2017-02-27T18:48:58","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2017\/02\/27\/write-10-chef-cookbooks-to-test-your-chef-programming-skills\/"},"modified":"2021-11-19T06:08:05","modified_gmt":"2021-11-19T06:08:05","slug":"write-10-chef-cookbooks-to-test-your-chef-programming-skills","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/write-10-chef-cookbooks-to-test-your-chef-programming-skills\/","title":{"rendered":"Chef Lab and Excercise \u2013 Cookbooks \u2013 Part 5"},"content":{"rendered":"<h3><\/h3>\n<ol>\n<li>\n<h3>Write a cookbook using you can install apache http server in CentOs and Ubuntu, enable the services and start the service.<\/h3>\n<\/li>\n<li>\n<h3>Write a recipe using template resources to create a file, but only if an attribute has a specific value.<\/h3>\n<\/li>\n<li>\n<h3>Write a recipe to create a file using a string, but not if \u201c\/etc\/passwd\u201d exists?<\/h3>\n<\/li>\n<li>\n<h3>Write a cookbook to unzip a file, and then move a files from one location to another using batch, bash chef resources?<\/h3>\n<\/li>\n<li>\n<h3>Create a role and assign any two cookbooks to role and setup a 2 nodes assigned to role and conerse the role.<\/h3>\n<\/li>\n<li>\n<h3>Write a cookbook using install version of latest tomcat and deploy jenkins.war files into war.<\/h3>\n<\/li>\n<li>\n<h3>Write a 4 cookbooks php, mysql, apache and webapp respectively and map a dependency between them and install a sample web application.<\/h3>\n<\/li>\n<li>\n<h3>Write a cookbook to install git, wget, zip in RHEL and Ubuntu.<\/h3>\n<\/li>\n<li>\n<h3>Write a cookbook in which create a file using a string, but only if \u201c\/etc\/passwd\u201d exists<\/h3>\n<\/li>\n<li>\n<h3>Write a coobook to run a batch file that unzips and then moves files from one location to another.<\/h3>\n<\/li>\n<\/ol>\n<h3><\/h3>\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_73833\"><figure class=\"wp-block-embed wp-block-embed-youtube is-type-video is-provider-youtube epyt-figure\"><div class=\"wp-block-embed__wrapper\"><iframe loading=\"lazy\"  id=\"_ytid_38343\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_73833\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><\/div><\/figure><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Write a cookbook using you can install apache http server in CentOs and Ubuntu, enable the services and start the service. Write a recipe using template resources to create a file, but only if an attribute has a specific value. Write a recipe to create a file using a string, but not if \u201c\/etc\/passwd\u201d exists?&#8230;<\/p>\n","protected":false},"author":1,"featured_media":3004,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[88],"tags":[407,642,1053,1054,1055,605,1050,1051,430,1049,1052],"class_list":["post-529","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chef","tag-chef","tag-chef-cookbook","tag-chef-programming","tag-chef-programming-skills","tag-chef-programming-test","tag-chef-recipe","tag-cookbooks","tag-skills","tag-test","tag-write","tag-write-chef-cookbooks"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/529","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=529"}],"version-history":[{"count":4,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/529\/revisions"}],"predecessor-version":[{"id":25769,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/529\/revisions\/25769"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/3004"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=529"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=529"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}