{"id":6924,"date":"2015-01-26T11:30:20","date_gmt":"2015-01-26T02:30:20","guid":{"rendered":"http:\/\/www.creationline.com\/?p=6924"},"modified":"2015-03-12T12:53:57","modified_gmt":"2015-03-12T03:53:57","slug":"%e5%92%8c%e8%a8%b3-bash%e3%82%b9%e3%82%af%e3%83%aa%e3%83%97%e3%83%88%e3%82%92chef-apply%e3%81%ab%e5%a4%89%e6%8f%9b%e3%81%99%e3%82%8b-getchef","status":"publish","type":"post","link":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/6924","title":{"rendered":"[\u548c\u8a33] Bash\u30b9\u30af\u30ea\u30d7\u30c8\u3092chef-apply\u306b\u5909\u63db\u3059\u308b #getchef"},"content":{"rendered":"<p>\u672c\u7a3f\u306f <a href=\"https:\/\/www.chef.io\/blog\/2015\/01\/16\/convert-your-bash-scripts-with-chef-apply\/\">Convert Your Bash Scripts With chef-apply<\/a> (2015\/01\/16) \u306e\u548c\u8a33\u3067\u3059\u3002<\/p>\n<p>Chef\u306f\u30a4\u30f3\u30d5\u30e9\u306e\u81ea\u52d5\u5316\u3068\u691c\u8a3c\u3092\u884c\u3046\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u30bb\u30c3\u30c8\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u3059\u3079\u3066\u306e\u529b\u3092\u7fd2\u5f97\u3059\u308b\u306e\u306f\u5927\u5909\u3067\u3059\u3002\u307b\u3068\u3093\u3069\u306e\u4eba\u306f\u65b0\u3057\u3044\u30c4\u30fc\u30eb\u3092\u5b66\u3076\u306e\u306b1\u301c2\u6642\u9593\u8a66\u3057\u3066\u307f\u3066\u3001\u305d\u308c\u304b\u3089\u3069\u3046\u3059\u308b\u304b\u3092\u6c7a\u3081\u308b\u306e\u304c\u666e\u901a\u3067\u3059\u3002\u672c\u65e5\u306f\u3001\u91d1\u66dc\u65e5\u306e\u5348\u5f8c\u306e\u6570\u6642\u9593\u3092\u5b9f\u9a13\u306b\u4f7f\u3063\u3066\u3001\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3092Chef\u3067\u306e\u5ba3\u8a00\u306b\u7f6e\u304d\u63db\u3048\u308b\u3053\u3068\u3067\u3001Chef\u306e\u771f\u4fa1\u3092\u7d20\u65e9\u304f\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u305d\u308c\u3067\u306f\u3001\u5358\u4e00\u306e\u30d5\u30a1\u30a4\u30eb\u3092Chef\u306erun list\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b<strong>chef-apply<\/strong>\u3092\u7528\u3044\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u6982\u8981<\/h2>\n<p>\u59cb\u3081\u308b\u524d\u306b\u3001Chef\u304c\u30b9\u30af\u30ea\u30d7\u30c8\u8a00\u8a9e\u3067\u3042\u308b\u3068\u898b\u305b\u304b\u3051\u3088\u3046\u3068\u3059\u308b\u3053\u3068\u3055\u3048\u3001\u8a00\u3046\u4fa1\u5024\u304c\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002Chef\u306f\u5b9f\u884c\u3059\u308b\u52d5\u4f5c\u306e\u30ea\u30b9\u30c8\u3092\u63d0\u4f9b\u3059\u308b\u3082\u306e\u3068\u3044\u3046\u3088\u308a\u3080\u3057\u308d\u3001Chef run list\u306f\u30b7\u30b9\u30c6\u30e0\u306e\u671b\u307e\u3057\u3044\u6700\u7d42\u72b6\u614b\u3092<strong>\u8a18\u8ff0\u3059\u308b<\/strong>\u3082\u306e\u3067\u3059\u3002\u8a00\u3044\u63db\u3048\u308b\u3068\u3001Chef\u306e\u5404Resource\u306f\u3001\u6b21\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u306e\u5f15\u304d\u91d1\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<blockquote><p>\n\u3082\u3057\u30b7\u30b9\u30c6\u30e0\u306e\u72b6\u614b\u304cResource\u304c\u8a18\u8ff0\u3057\u3066\u3044\u308b\u3082\u306e\u3068\u65e2\u306b\u4e00\u81f4\u3057\u3066\u3044\u308b\u306a\u3089\u3070\u4f55\u3082\u884c\u308f\u305a\u3001\u305d\u3046\u3067\u306a\u3051\u308c\u3070\u30b7\u30b9\u30c6\u30e0\u3092\u6b63\u3057\u3044\u72b6\u614b\u306b\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u3069\u306e\u3088\u3046\u306a\u52d5\u4f5c\u3082\u5b9f\u884c\u3059\u308b\u3002\n<\/p><\/blockquote>\n<p>\u3067\u306f\u3001Chef\u306b\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3057\u3066\u7279\u5b9a\u306e\u5185\u5bb9\u3067\u3042\u3063\u3066\u307b\u3057\u3044\u306a\u3089\u3001\u6b21\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\nfile \"\/tmp\/foo\" do<br \/>\n  content \"This will be the file's content.\"<br \/>\nend<br \/>\n<\/code><\/p>\n<p>Chef\u306f\u6307\u5b9a\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u305d\u306e\u5185\u5bb9\u3067\u5b58\u5728\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u3001\u5fc5\u8981\u306a\u3089\u66f4\u65b0\u3057\u305f\u308a\u4f5c\u6210\u3057\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30e2\u30c7\u30eb\u306b\u9069\u5408\u3057\u306a\u3044\u306a\u3089\u3001\u30b7\u30a7\u30eb\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e<strong>execute<\/strong> Resource\u304c\u3042\u308a\u307e\u3059\u3002\u3055\u3089\u306b\u3001Chef\u306e\u52d5\u4f5c\u306e\u305f\u3073\u306b\u5b9f\u884c\u3059\u308b\u3053\u3068\u3092\u9632\u3050\u305f\u3081\u306b<strong>not_if<\/strong>\u3084<strong>only_if<\/strong>\u6761\u4ef6\u5f0f\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u8a71\u306e\u9014\u4e2d\u3060\u3051\u3069\u3001\u3069\u308c\u3060\u3051\u4fbf\u5229\u304b\u306f\u308f\u304b\u3063\u305f\u3088<\/h2>\n<p>\u3082\u3046\u5341\u5206\uff01 \u91d1\u66dc\u65e5\u306e\u5348\u5f8c\u306a\u3093\u3060\u304b\u3089\u3001\u8a66\u3057\u306bChef\u306b\u4f55\u304b\u3092\u3084\u3089\u305b\u3066\u307f\u305f\u3044\u3093\u3060\u3088\uff01<\/p>\n<p>\u6211\u304c\u5bb6\u306b\u306f<strong>squeezeboxserver<\/strong>\u3068\u3044\u3046\u540d\u524d\u306e\u97f3\u697d\u30b5\u30fc\u30d0\u304c\u3042\u308a\u3001\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u304a\u6c17\u306b\u5165\u308a\u306e\u6a5f\u80fd\u304c\u524a\u9664\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001Ubuntu 11\u4ee5\u964d\u3067\u306f\u4f55\u3082\u52d5\u4f5c\u3057\u306a\u3044\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002\u305d\u3053\u3067<a href=\"https:\/\/www.virtualbox.org\/\">VirtualBox<\/a>\u4eee\u60f3\u30de\u30b7\u30f3\u3092\u7ba1\u7406\u3059\u308b<a href=\"http:\/\/www.vagrantup.com\/\">Vagrant<\/a>\u3092\u7528\u3044\u3066Ubuntu 10\u4eee\u60f3\u30de\u30b7\u30f3\u3092\u7acb\u3066\u3066\u3044\u307e\u3059\u3002<strong>squeezeboxserver<\/strong>\u306f\u97f3\u697d\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3001\u30d5\u30a1\u30a4\u30eb\u3068\u518d\u751f\u30ea\u30b9\u30c8\u30c7\u30fc\u30bf\u3092MySQL\u306b\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/p>\n<p><strong>squeezeboxserver<\/strong>\u306f\u4f9d\u5b58\u95a2\u4fc2\u3068\u8a2d\u5b9a\u306b\u3068\u3066\u3082\u53e3\u3046\u308b\u3055\u3044\u3067\u3059\u3002Debian\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30d3\u30eb\u30c9\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7528\u3044\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u308c\u306f\u4f9d\u5b58\u95a2\u4fc2\u306b\u3042\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u305b\u3093\u3002MySQL\u30b5\u30fc\u30d0\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u30b7\u30b9\u30c6\u30e0\u30b0\u30ed\u30fc\u30d0\u30eb\u306e<strong>mysqld<\/strong>\u3067\u306f\u306a\u304f\u3001\u81ea\u8eab\u5c02\u7528\u306e<strong>mysqld<\/strong>\u3092\u7528\u3044\u307e\u3059\u3002\u3082\u3068\u3082\u3068\u3001\u3053\u306e\u30de\u30b7\u30f3\u3092\u8a2d\u5b9a\u3059\u308b\u305f\u3081\u306eBash\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u3044\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\nrm \/etc\/localtime<br \/>\nln -s \/usr\/share\/zoneinfo\/America\/Los_Angeles \/etc\/localtime<br \/>\napt-get update<br \/>\nexport DEBIAN_FRONTEND=noninteractive<br \/>\napt-get -y install mysql-server-5.1 libmysqlclient16-dev mysql-client-5.1<br \/>\ndpkg -i \/home\/chris\/squeezebox\/squeezeboxserver_7.5.6~32834_all.deb<br \/>\ntar -C \/ -xf \/home\/chris\/backups\/sbserver_prefs.tar<br \/>\n\/etc\/init.d\/squeezeboxserver restart<br \/>\n<\/code><\/p>\n<p>\u304a\u304a\u3088\u305d\u3046\u307e\u304f\u52d5\u4f5c\u3059\u308b\u3053\u308c\u306f\u3001\u9a5a\u304f\u307b\u3069\u8ca7\u5f31\u306a8\u884c\u306e\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002\u4eee\u60f3\u30de\u30b7\u30f3\u306f\u3055\u3089\u306b\u591a\u304f\u306e\u624b\u52d5\u4f5c\u696d\u3092\u5fc5\u8981\u3068\u3057\u3066\u304a\u308a\u3001\u4eee\u60f3\u30de\u30b7\u30f3\u3092\u8d77\u52d5\u3057\u76f4\u3059\u306e\u304c\u6016\u3044\u306e\u3067\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u306e\u305f\u3081\u306b\u30db\u30b9\u30c8\u30b5\u30fc\u30d0\u3092\u505c\u6b62\u3057\u305f\u304f\u306a\u3044\u307b\u3069\u306b\u3001\u975e\u5e38\u306b\u58ca\u308c\u3084\u3059\u3044\u3082\u306e\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u30b3\u30de\u30f3\u30c9\u304c\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3057\u305f\u969b----\u305d\u308c\u306f\u4e88\u671f\u3057\u3066\u3044\u308b\u3088\u308a\u3082\u3063\u3068\u591a\u304f\u306e\u983b\u5ea6\u3067\u8d77\u304d\u3046\u308b----\u307e\u3063\u305f\u304f\u983c\u308a\u306b\u306a\u3089\u306a\u3044\u3082\u306e\u3067\u3001\u4f55\u3092\u884c\u3063\u3066\u3044\u308b\u304b\u3092\u660e\u78ba\u306b\u4f1d\u3048\u3066\u3044\u307e\u305b\u3093\u3002\u4eee\u60f3\u30de\u30b7\u30f3\u3092\u524a\u9664\u3057\u305f\u308a\u518d\u4f5c\u6210\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u306f\u540c\u69d8\u306b\u5927\u5909\u5371\u967a\u3067\u3059\u3002<\/p>\n<p>\u30db\u30b9\u30c8\u30b5\u30fc\u30d0\u306e\u3064\u3044\u6700\u8fd1\u306e\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u3067\u3001\u3053\u308c\u3067\u6b62\u3081\u306b\u3059\u308b\u3053\u3068\u3092\u6c7a\u3081\u3066\u3001<strong>chef-apply<\/strong>\u306b\u5909\u63db\u3057\u307e\u3057\u305f\u3002<strong>chef-apply<\/strong>\u306fChef\u540c\u68b1\u306e\u30c4\u30fc\u30eb\u3067\u3001\u57fa\u672c\u7684\u306bChef\u3092\u30b9\u30af\u30ea\u30d7\u30c8\u8a00\u8a9e\u3068\u307f\u306a\u305b\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u308c\u307e\u3059\u3002Recipe\u306a\u3057\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u9020\u306a\u3057\u3001Chef\u306eResource\u306e\u5358\u4e00\u306e\u30d5\u30a1\u30a4\u30eb\u3060\u3051\u3067\u3059\u3002\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3084\u308b\u306e\u3068\u540c\u3058\u3088\u3046\u306bshebang\u884c\u306b\u6307\u5b9a\u3057\u3066\u300c<strong>chef-apply<\/strong>\u30b9\u30af\u30ea\u30d7\u30c8\u300d\u3068\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\n#!\/usr\/bin\/env chef-apply<br \/>\n<\/code><\/p>\n<p>\u3082\u3068\u3082\u3068\u306eBash\u30b9\u30af\u30ea\u30d7\u30c8\u30921\u884c\u305a\u3064Chef\u306b\u5909\u63db\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\nrm \/etc\/localtime<br \/>\nln -s \/usr\/share\/zoneinfo\/America\/Los_Angeles \/etc\/localtime<br \/>\n<\/code><\/p>\n<p>\u30de\u30b7\u30f3\u306e\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u3092\u8a2d\u5b9a\u3059\u308b\u65b9\u6cd5\u306f\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u597d\u307f\u306e\u65b9\u6cd5\u3092\u7528\u3044\u3066\u3044\u307e\u3059\u3002\u5341\u5206\u7c21\u5358\u306a\u65b9\u6cd5\u3067\u3001Chef\u306b\u306f<strong>link<\/strong> Resource\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\nlink \"\/etc\/localtime\" do<br \/>\n  to \"\/usr\/share\/zoneinfo\/America\/Los_Angeles\"<br \/>\nend<br \/>\n<\/code><\/p>\n<p>\u3053\u3053\u3067\u3001Chef\u306b\u300c\u30b5\u30fc\u30d0\u306e\u6b63\u3057\u3044\u72b6\u614b\u306f\u3053\u306e\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3092\u6301\u3064\u300d\u3068\u4f1d\u3048\u3066\u3044\u307e\u3059\u3002Chef\u306f\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u304c\u65e2\u306b\u5b58\u5728\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u3001\u3082\u3057\u5b58\u5728\u3057\u3066\u6b63\u3057\u3044\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u3057\u3066\u3044\u308c\u3070\u4f55\u3082\u3057\u307e\u305b\u3093\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\nexport DEBIAN_FRONTEND=noninteractive<br \/>\napt-get -y install mysql-server-5.1 libmysqlclient16-dev mysql-client-5.1<br \/>\n<\/code><\/p>\n<p>Chef\u306e<strong>package<\/strong> Resource\u304c\u3053\u308c\u3092\u30ab\u30d0\u30fc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\npackage \"mysql-server-5.1\"<br \/>\npackage \"libmysqlclient16-dev\"<br \/>\npackage \"mysql-client-5.1\"<br \/>\n<\/code><\/p>\n<p>\u3042\u308b\u3044\u306f\u3001Ruby\u306b\u6163\u308c\u89aa\u3057\u3093\u3067\u3044\u3066\u7e70\u308a\u8fd4\u3057\u3092\u597d\u307e\u306a\u3044\u306a\u3089\u3001\u307e\u3063\u305f\u304f\u540c\u3058\u3053\u3068\u3092\u884c\u3046\u30eb\u30fc\u30d7\u8868\u73fe\u3092\u7528\u3044\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\n[\"mysql-server-5.1\", \"libmysqlclient16-dev\", \"mysql-client-5.1\"].each do |pkg_name|<br \/>\n  package pkg_name<br \/>\nend<br \/>\n<\/code><\/p>\n<p>\u305f\u3060\u3057\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e<strong>mysql-server-5.1<\/strong>\u306f\u30b7\u30b9\u30c6\u30e0\u306e<strong>mysqld<\/strong>\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<strong>service mysql stop<\/strong>\u30b3\u30de\u30f3\u30c9\u3067\u624b\u52d5\u3067\u505c\u6b62\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u4eee\u60f3\u30de\u30b7\u30f3\u3092\u518d\u8d77\u52d5\u3057\u305f\u3089\u4e00\u7dd2\u306b\u8d77\u52d5\u3057\u3066\u304d\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u79c1\u306f\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30a8\u30f3\u30b8\u30cb\u30a2\u3067\u3042\u3063\u3066\u30b7\u30b9\u30c6\u30e0\u7ba1\u7406\u8005\u3067\u306f\u306a\u3044\u306e\u3067\u3001\u30b7\u30b9\u30c6\u30e0\u306e<strong>mysqld<\/strong>\u3092\u3069\u306e\u3088\u3046\u306b\u6c38\u4e45\u306b\u7121\u52b9\u306b\u3059\u308b\u304b\u3092\u8aac\u660e\u3059\u308b\u306e\u306f\u9762\u5012\u3067\u3059\u3002Chef\u306e<strong>service<\/strong> Resource\u304c\u3053\u308c\u3092\u884c\u3063\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\nservice \"mysql\" do<br \/>\n  action :disable<br \/>\nend<br \/>\n<\/code><\/p>\n<p>\u3053\u308c\u3067\u30b7\u30b9\u30c6\u30e0\u8d77\u52d5\u6642\u306b<strong>mysqld<\/strong>\u306f\u8d77\u52d5\u3057\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4e8b\u524d\u6e96\u5099\u304c\u6e08\u3093\u3060\u306e\u3067\u3001<strong>squeezeboxserver<\/strong>\u81ea\u4f53\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u8a2d\u5b9a\u306b\u9032\u307f\u3057\u3087\u3046\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\ndpkg -i \/home\/chris\/squeezebox\/squeezeboxserver_7.5.6~32834_all.deb<br \/>\n<\/code><\/p>\n<p>\u3053\u3053\u3067\u4e88\u5099\u77e5\u8b58\u306e\u305f\u3081\u306e\u4e00\u606f\u3092\u5165\u308c\u307e\u3057\u3087\u3046\u3002Chef\u306e<strong>Resource<\/strong>\u306f\u3001Chef\u306eResource\u306e\u5b9f\u969b\u306e\u4f5c\u696d\u3092\u884c\u3046<strong>Provider<\/strong>\u306b\u3088\u3063\u3066\u652f\u3048\u3089\u308c\u3066\u3044\u307e\u3059\u3002\u5148\u306b\u8a18\u8ff0\u3057\u305f<strong>package \"mysql-client-5.1\"<\/strong>\u3067\u306f\u3001\u3069\u306e\u3088\u3046\u306a\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3067\u5b9f\u884c\u3057\u3066\u3044\u308b\u304b\u3092\u77e5\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002Chef\u306f\u30b7\u30b9\u30c6\u30e0\u3092\u8abf\u3079\u3066\u9069\u5207\u306aProvider\u3092\u547c\u3073\u51fa\u3057\u307e\u3059\u3002Red Hat\u30d9\u30fc\u30b9\u306e\u30b7\u30b9\u30c6\u30e0\u3067\u306f<strong>yum<\/strong> Provider\u3067\u3001Debian\u30d9\u30fc\u30b9\u306e\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u3082\u3061\u308d\u3093<strong>package<\/strong> Resource\u306f<strong>apt<\/strong> Provider\u3068\u3057\u3066\u89e3\u6c7a\u3057\u307e\u3059\u3002\u3053\u306e\u7d50\u679c\u3001<strong>.deb<\/strong>\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306b\u306f\u3001\u660e\u793a\u7684\u306b<strong>dpkg<\/strong> Provider\u3092\u7528\u3044\u308b<strong>dpkg_package<\/strong> Resource\u3092\u7528\u3044\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\ndpkg_package \"squeezeboxserver_7.5.6\" do<br \/>\n  source \"\/home\/chris\/squeezebox\/squeezeboxserver_7.5.6~32834_all.deb\"<br \/>\nend<br \/>\n<\/code><\/p>\n<p>\u3053\u306e<strong>.deb<\/strong>\u30d5\u30a1\u30a4\u30eb\u306f\u30b5\u30fc\u30d0\u3092\u52d5\u4f5c\u3057\u305f\u307e\u307e\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u304c\u3001<strong>squeezeboxserver<\/strong>\u3092\u9577\u3044\u9593\u52d5\u4f5c\u3055\u305b\u3066\u3044\u308b\u306e\u3067\u3001\u7528\u3044\u305f\u3044\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e<strong>.tar<\/strong>\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\ntar -C \/ -xf \/home\/chris\/backups\/sbserver_prefs.tar<br \/>\n<\/code><\/p>\n<p>\u3053\u308c\u306f\u305d\u3093\u306a\u306b\u60aa\u304f\u306a\u3044\u306e\u3067\u3001\u5b9f\u969b\u306b\u306f<strong>tar<\/strong> Resource\u3092\u7528\u3044\u305a\u3001\u3053\u308c\u3092Chef\u306e<strong>execute<\/strong> Resource\u3092\u7528\u3044\u3066\u30d9\u30bf\u66f8\u304d\u3057\u307e\u3059 (<strong>tar<\/strong> Cookbook\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u91d1\u66dc\u65e5\u306e\u5348\u5f8c\u3060\u3057\u8907\u96d1\u306a\u3053\u3068\u3092\u3057\u305f\u304f\u306a\u3044\u306e\u3067)\u3002\u901a\u5e38\u3001Chef\u306eResource\u306f\u671b\u307e\u3057\u3044\u6700\u7d42\u72b6\u614b\u3092\u8a18\u8ff0\u3059\u308b\u305f\u3081\u306b\u7528\u3044\u307e\u3059\u3002\u3068\u304d\u305f\u307e\u5341\u5206\u3067\u306f\u306a\u3044\u306e\u3067\u3001\u30b7\u30a7\u30eb\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b<strong>execute<\/strong>\u3092\u7528\u3044\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\nexecute \"tar -C \/ -xf \/home\/chris\/backups\/squeezeboxserver.tar\"<br \/>\n<\/code><\/p>\n<p>\u3067\u306f\u3001\u30b5\u30fc\u30d0\u3092\u518d\u8d77\u52d5\u3057\u3001\u97f3\u697d\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3066MySQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u683c\u7d0d\u3055\u305b\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n\/etc\/init.d\/squeezeboxserver restart<br \/>\n<\/code><\/p>\n<p>\u5341\u5206\u7c21\u5358\u3067\u3059\u3002Chef\u306b\u30b5\u30fc\u30d3\u30b9\u3092\u7121\u52b9\u5316\u3055\u305b\u3066\u3001\u518d\u5ea6\u6709\u52b9\u5316\u3055\u305b\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\nservice \"squeezeboxserver\" do<br \/>\n  action :restart<br \/>\nend<br \/>\n<\/code><\/p>\n<p>\u3053\u308c\u3067\u3001\u5168\u90e8\u3067\u3059\u3002<\/p>\n<p>\u8abf\u5b50\u304c\u3044\u3044\u306e\u3067\u3001Chef\u306fcron\u30b8\u30e7\u30d6\u306e\u7ba1\u7406\u3092\u7c21\u5358\u306b\u3057\u3066\u304f\u308c\u308b\u304b\u3089\u3001cron\u30b8\u30e7\u30d6\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3092\u6c7a\u3081\u307e\u3057\u305f\u3002Bash\u3067\u5b89\u5168\u306bcrontabs\u3092\u7de8\u96c6\u3059\u308b\u306e\u306f\u9aa8\u304c\u6298\u308c\u308b\u306e\u3067\u3001\u3084\u308d\u3046\u3068\u601d\u3063\u3066\u3044\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\ncron \"backup_config\" do<br \/>\n  minute \"0\"<br \/>\n  hour \"0\"<br \/>\n  user \"vagrant\"<br \/>\n  command \"tar -C \/ -cf \/home\/chris\/backups\/sbserver_prefs.tar \/var\/lib\/squeezeboxserver\/prefs\"<br \/>\nend<br \/>\n<\/code><\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u3059\u308c\u3070\u3001\u8a2d\u5b9a\u3001\u518d\u751f\u30ea\u30b9\u30c8\u3001MySQL\u30c7\u30fc\u30bf\u306e\u6700\u65b0\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002\u6700\u9ad8\u3060\u306d\u3002\u4eee\u60f3\u30de\u30b7\u30f3\u306e\u524a\u9664\u3084\u518d\u69cb\u6210\u3082\u308f\u305a\u304b\u306a\u6642\u9593\u3067\u4f55\u56de\u3082\u3001\u5358\u306a\u308b\u8208\u5473\u672c\u4f4d\u3067\u3067\u304d\u307e\u3059\u3002Chef\u306f\u6bce\u56de\u540c\u4e00\u306b\u518d\u69cb\u7bc9\u3057\u307e\u3059\u3002\u3082\u3057\u4f55\u304b\u9055\u3046\u3053\u3068\u304c\u8d77\u304d\u305f\u308a\u3001\u307e\u3063\u305f\u304f\u4e0d\u601d\u8b70\u306a\u3053\u3068\u306b\u3001\u6b62\u307e\u3063\u3066\u3057\u307e\u3063\u305f\u3089\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u308c\u304c\u672c\u5f53\u306a\u3089\u3001<strong>chef-apply<\/strong>\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u4f55\u884c\u304b\u8ffd\u52a0\u3057\u307e\u3059\u3002\u30aa\u30ea\u30b8\u30ca\u30eb\u3088\u308a\u78ba\u5b9f\u3067\u3088\u308a\u512a\u308c\u3066\u3044\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>Chef\u306e\u771f\u610f\u306f\u3001\u4f55\u304b\u3092\u884c\u3046\u3068\u304d\u306b\u6c17\u3092\u5229\u304b\u305b\u306a\u3044\u3001\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\u300c\u6c17\u3092\u5229\u304b\u305b\u3089\u308c\u308b\u300d\u3068\u300c\u30c7\u30d0\u30c3\u30b0\u3057\u3065\u3089\u3044\u300d\u3068\u8003\u3048\u308b\u4eba\u3005\u306b\u5bfe\u3057\u3066\u672c\u5f53\u306b\u5b89\u5fc3\u3067\u304d\u308b\u3053\u3068\u3067\u3059\u3002\u300c\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3057\u3066\u6b63\u3057\u3044\u5185\u5bb9\u304b\uff1f\u300d\u3068\u3044\u3046\u3059\u3079\u3066\u3092\u8abf\u3079\u308b\u3053\u3068\u3092\u5358\u7d14\u306b\u5b9f\u884c\u3067\u304d\u3001\u300cDebian\u3067\u306fapt-get\u3092\u3001RHEL\u3067\u306fYum\u3092\u3001FreeBSD\u3067\u306fpkg_add\/pkgng\u3092\u4f7f\u3063\u3066...\u300d\u3068\u3044\u3046\u30af\u30ed\u30b9\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u5b9f\u88c5\u306f\u9000\u5c48\u3067\u9593\u9055\u3044\u3084\u3059\u3044\u3068\u3044\u3046\u3053\u3068\u304c\u308f\u304b\u308b\u3067\u3057\u3087\u3046\u3002Chef\u306f\u3044\u3064\u3082\u3059\u3079\u3066\u6307\u793a\u3057\u305f\u3053\u3068\u3060\u3051\u3092\u3084\u3063\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<p><strong>chef-apply<\/strong>\u306f\u300cChef Lite\u300d\u306e\u4e00\u7a2e\u3067\u3059\u3002Chef\u306e\u30af\u30a4\u30c3\u30af\u30cf\u30c3\u30af\u3067\u3001\u4ed5\u4e8b\u3092\u7247\u4ed8\u3051\u308b\u305f\u3081\u306e\u30c4\u30fc\u30eb\u3067\u3059\u3002\u3053\u308c\u3092\u30a4\u30f3\u30d5\u30e9\u5168\u4f53\u306b\u5bfe\u3057\u3066\u306f\u307e\u3063\u305f\u304f\u52d5\u304b\u3057\u305f\u304f\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u3002\u3053\u308c\u306f\u5358\u4e00\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u3001Cookbook\u3001Template\u3001Role\u3001User\u3001Org\u306a\u3069\u81ea\u52d5\u5316\u306b\u7528\u3044\u305f\u3044Chef\u306e\u6a5f\u80fd\u304c\u3042\u308a\u307e\u305b\u3093\u3002Chef\u306e\u5b8c\u5168\u306a\u529b\u306b\u5bfe\u3057\u3066\u6e96\u5099\u304c\u3067\u304d\u305f\u3068\u304d\u306b\u306f\u3001Recipe\u306b\u30b3\u30d4\u30fc\u3067\u304d\u308b\u3088\u3046\u306a\u30af\u30ed\u30b9\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u30b3\u30fc\u30c9\u57fa\u76e4\u3092\u6301\u3063\u3066\u3044\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u6b21\u306b\u5b8c\u5168\u306a<strong>chef-apply<\/strong>\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u793a\u3057\u307e\u3059\u3002Happy hacking\uff01<\/p>\n<p><code lang=\"ruby\"><br \/>\nlink \"\/etc\/localtime\" do<br \/>\n  to \"\/usr\/share\/zoneinfo\/America\/Los_Angeles\"<br \/>\nend<br \/>\npackage \"mysql-server-5.1\"<br \/>\npackage \"libmysqlclient16-dev\"<br \/>\npackage \"mysql-client-5.1\"<br \/>\nservice \"mysql\" do<br \/>\n  action :disable<br \/>\nend<br \/>\ndpkg_package \"squeezeboxserver_7.5.6\" do<br \/>\n  source \"\/home\/chris\/squeezebox\/#{DEB}\"<br \/>\nend<br \/>\n# o\/~ meet the new server \/ same as the old server o\/~<br \/>\nexecute \"tar -C \/ -xf \/home\/chris\/backups\/sbserver_prefs.tar\"<br \/>\nservice \"squeezeboxserver\" do<br \/>\n  action :restart<br \/>\nend<br \/>\n# ---- end app setup ----<br \/>\ncron \"nightly_rescan\" do<br \/>\n  minute \"30\"<br \/>\n  hour \"0\"<br \/>\n  user \"vagrant\"<br \/>\n  command \"\/usr\/sbin\/squeezeboxserver-scanner --rescan\"<br \/>\nend<br \/>\ncron \"backup_config\" do<br \/>\n  minute \"0\"<br \/>\n  hour \"0\"<br \/>\n  user \"vagrant\"<br \/>\n  command \"tar -C \/ -cf \/home\/chris\/backups\/sbserver_prefs.tar \/var\/lib\/squeezeboxserver\/prefs\"<br \/>\nend<br \/>\ncron \"backup_mysql\" do<br \/>\n  minute \"5\"<br \/>\n  hour \"0\"<br \/>\n  user \"vagrant\"<br \/>\n  command \"sudo mysqldump -S #{MYSQL_SOCK} slimserver | gzip -c > \/home\/chris\/backups\/sbserver_sql.tgz\"<br \/>\nend<br \/>\ncron \"backup_playlists\" do<br \/>\n  minute \"10\"<br \/>\n  hour \"0\"<br \/>\n  user \"vagrant\"<br \/>\n  command \"tar -cf \/home\/chris\/backups\/playlists.tar \/home\/chris\/music\/playlists\"<br \/>\nend<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u7a3f\u306f Convert Your Bash Scripts With chef-apply (2015\/01\/16) \u306e\u548c\u8a33\u3067\u3059\u3002 Chef\u306f\u30a4\u30f3\u30d5\u30e9\u306e\u81ea\u52d5\u5316\u3068\u691c\u8a3c\u3092\u884c\u3046\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u30bb\u30c3\u30c8\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u3059\u3079\u3066\u306e\u529b\u3092\u7fd2\u5f97\u3059 [&#8230;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[36],"tags":[],"class_list":["post-6924","post","type-post","status-publish","format-standard","hentry","category-chef"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>[\u548c\u8a33] Bash\u30b9\u30af\u30ea\u30d7\u30c8\u3092chef-apply\u306b\u5909\u63db\u3059\u308b #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3<\/title>\n<meta name=\"description\" content=\"Chef |\u672c\u7a3f\u306f Convert Your Bash Scripts With chef-apply (2015\/01\/16) \u306e\u548c\u8a33\u3067\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.creationline.com\/tech-blog\/6924\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[\u548c\u8a33] Bash\u30b9\u30af\u30ea\u30d7\u30c8\u3092chef-apply\u306b\u5909\u63db\u3059\u308b #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\" \/>\n<meta property=\"og:description\" content=\"Chef |\u672c\u7a3f\u306f Convert Your Bash Scripts With chef-apply (2015\/01\/16) \u306e\u548c\u8a33\u3067\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.creationline.com\/tech-blog\/6924\" \/>\n<meta property=\"og:site_name\" content=\"Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/creationline\" \/>\n<meta property=\"article:published_time\" content=\"2015-01-26T02:30:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-03-12T03:53:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2026\/01\/screenshot.png\" \/>\n\t<meta property=\"og:image:width\" content=\"470\" \/>\n\t<meta property=\"og:image:height\" content=\"394\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Daisuke Higuchi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@creationline\" \/>\n<meta name=\"twitter:site\" content=\"@creationline\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daisuke Higuchi\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"2\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/6924#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/6924\"},\"author\":{\"name\":\"Daisuke Higuchi\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#\\\/schema\\\/person\\\/16f1373831fb6fd17387f16ae1195206\"},\"headline\":\"[\u548c\u8a33] Bash\u30b9\u30af\u30ea\u30d7\u30c8\u3092chef-apply\u306b\u5909\u63db\u3059\u308b #getchef\",\"datePublished\":\"2015-01-26T02:30:20+00:00\",\"dateModified\":\"2015-03-12T03:53:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/6924\"},\"wordCount\":152,\"commentCount\":0,\"articleSection\":[\"Chef\"],\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/6924#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/6924\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/6924\",\"name\":\"[\u548c\u8a33] Bash\u30b9\u30af\u30ea\u30d7\u30c8\u3092chef-apply\u306b\u5909\u63db\u3059\u308b #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#website\"},\"datePublished\":\"2015-01-26T02:30:20+00:00\",\"dateModified\":\"2015-03-12T03:53:57+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#\\\/schema\\\/person\\\/16f1373831fb6fd17387f16ae1195206\"},\"description\":\"Chef |\u672c\u7a3f\u306f Convert Your Bash Scripts With chef-apply (2015\\\/01\\\/16) \u306e\u548c\u8a33\u3067\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/6924#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/6924\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/6924#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"HOME\",\"item\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u30af\u30e9\u30a6\u30c9\u30cd\u30a4\u30c6\u30a3\u30d6\",\"item\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Chef\",\"item\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"[\u548c\u8a33] Bash\u30b9\u30af\u30ea\u30d7\u30c8\u3092chef-apply\u306b\u5909\u63db\u3059\u308b #getchef\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#website\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/\",\"name\":\"Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\",\"description\":\"\u30a2\u30b8\u30e3\u30a4\u30eb\uff06DevOps\u3001\u30af\u30e9\u30a6\u30c9\u30cd\u30a4\u30c6\u30a3\u30d6\u3001AI\uff06LLM\u306e\u5148\u7aef\u6280\u8853\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#\\\/schema\\\/person\\\/16f1373831fb6fd17387f16ae1195206\",\"name\":\"Daisuke Higuchi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/d-higuchi-wp-icon-230x230.png\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/d-higuchi-wp-icon-230x230.png\",\"contentUrl\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/d-higuchi-wp-icon-230x230.png\",\"caption\":\"Daisuke Higuchi\"},\"description\":\"Chef\u30fbDocker\u30fbMirantis\u88fd\u54c1\u306a\u3069\u306e\u6280\u8853\u8981\u7d20\u306b\u52a0\u3048\u3066\u3001\u4f1a\u8b70\u306e\u9032\u3081\u65b9\u30fb\u6587\u7ae0\u306e\u66f8\u304d\u65b9\u306a\u3069\u306e\u696d\u52d9\u6539\u5584\u306b\u3082\u53d6\u308a\u7d44\u3093\u3067\u3044\u307e\u3059\u3002\u300cChef\u6d3b\u7528\u30ac\u30a4\u30c9\u300d\u5171\u8457\u306e\u307b\u304b\u3001Debian Official Developer\u3082\u3084\u3063\u3066\u3044\u307e\u3059\u3002\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[\u548c\u8a33] Bash\u30b9\u30af\u30ea\u30d7\u30c8\u3092chef-apply\u306b\u5909\u63db\u3059\u308b #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","description":"Chef |\u672c\u7a3f\u306f Convert Your Bash Scripts With chef-apply (2015\/01\/16) \u306e\u548c\u8a33\u3067\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.creationline.com\/tech-blog\/6924","og_locale":"ja_JP","og_type":"article","og_title":"[\u548c\u8a33] Bash\u30b9\u30af\u30ea\u30d7\u30c8\u3092chef-apply\u306b\u5909\u63db\u3059\u308b #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","og_description":"Chef |\u672c\u7a3f\u306f Convert Your Bash Scripts With chef-apply (2015\/01\/16) \u306e\u548c\u8a33\u3067\u3059\u3002","og_url":"https:\/\/www.creationline.com\/tech-blog\/6924","og_site_name":"Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","article_publisher":"https:\/\/www.facebook.com\/creationline","article_published_time":"2015-01-26T02:30:20+00:00","article_modified_time":"2015-03-12T03:53:57+00:00","og_image":[{"width":470,"height":394,"url":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2026\/01\/screenshot.png","type":"image\/png"}],"author":"Daisuke Higuchi","twitter_card":"summary_large_image","twitter_creator":"@creationline","twitter_site":"@creationline","twitter_misc":{"\u57f7\u7b46\u8005":"Daisuke Higuchi","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"2\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.creationline.com\/tech-blog\/6924#article","isPartOf":{"@id":"https:\/\/www.creationline.com\/tech-blog\/6924"},"author":{"name":"Daisuke Higuchi","@id":"https:\/\/www.creationline.com\/tech-blog\/#\/schema\/person\/16f1373831fb6fd17387f16ae1195206"},"headline":"[\u548c\u8a33] Bash\u30b9\u30af\u30ea\u30d7\u30c8\u3092chef-apply\u306b\u5909\u63db\u3059\u308b #getchef","datePublished":"2015-01-26T02:30:20+00:00","dateModified":"2015-03-12T03:53:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.creationline.com\/tech-blog\/6924"},"wordCount":152,"commentCount":0,"articleSection":["Chef"],"inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.creationline.com\/tech-blog\/6924#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.creationline.com\/tech-blog\/6924","url":"https:\/\/www.creationline.com\/tech-blog\/6924","name":"[\u548c\u8a33] Bash\u30b9\u30af\u30ea\u30d7\u30c8\u3092chef-apply\u306b\u5909\u63db\u3059\u308b #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","isPartOf":{"@id":"https:\/\/www.creationline.com\/tech-blog\/#website"},"datePublished":"2015-01-26T02:30:20+00:00","dateModified":"2015-03-12T03:53:57+00:00","author":{"@id":"https:\/\/www.creationline.com\/tech-blog\/#\/schema\/person\/16f1373831fb6fd17387f16ae1195206"},"description":"Chef |\u672c\u7a3f\u306f Convert Your Bash Scripts With chef-apply (2015\/01\/16) \u306e\u548c\u8a33\u3067\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.creationline.com\/tech-blog\/6924#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.creationline.com\/tech-blog\/6924"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.creationline.com\/tech-blog\/6924#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"HOME","item":"https:\/\/www.creationline.com\/tech-blog"},{"@type":"ListItem","position":2,"name":"\u30af\u30e9\u30a6\u30c9\u30cd\u30a4\u30c6\u30a3\u30d6","item":"https:\/\/www.creationline.com\/tech-blog\/cloudnative"},{"@type":"ListItem","position":3,"name":"Chef","item":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef"},{"@type":"ListItem","position":4,"name":"[\u548c\u8a33] Bash\u30b9\u30af\u30ea\u30d7\u30c8\u3092chef-apply\u306b\u5909\u63db\u3059\u308b #getchef"}]},{"@type":"WebSite","@id":"https:\/\/www.creationline.com\/tech-blog\/#website","url":"https:\/\/www.creationline.com\/tech-blog\/","name":"Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","description":"\u30a2\u30b8\u30e3\u30a4\u30eb\uff06DevOps\u3001\u30af\u30e9\u30a6\u30c9\u30cd\u30a4\u30c6\u30a3\u30d6\u3001AI\uff06LLM\u306e\u5148\u7aef\u6280\u8853","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.creationline.com\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.creationline.com\/tech-blog\/#\/schema\/person\/16f1373831fb6fd17387f16ae1195206","name":"Daisuke Higuchi","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2023\/08\/d-higuchi-wp-icon-230x230.png","url":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2023\/08\/d-higuchi-wp-icon-230x230.png","contentUrl":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2023\/08\/d-higuchi-wp-icon-230x230.png","caption":"Daisuke Higuchi"},"description":"Chef\u30fbDocker\u30fbMirantis\u88fd\u54c1\u306a\u3069\u306e\u6280\u8853\u8981\u7d20\u306b\u52a0\u3048\u3066\u3001\u4f1a\u8b70\u306e\u9032\u3081\u65b9\u30fb\u6587\u7ae0\u306e\u66f8\u304d\u65b9\u306a\u3069\u306e\u696d\u52d9\u6539\u5584\u306b\u3082\u53d6\u308a\u7d44\u3093\u3067\u3044\u307e\u3059\u3002\u300cChef\u6d3b\u7528\u30ac\u30a4\u30c9\u300d\u5171\u8457\u306e\u307b\u304b\u3001Debian Official Developer\u3082\u3084\u3063\u3066\u3044\u307e\u3059\u3002","url":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi"}]}},"_links":{"self":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts\/6924","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/comments?post=6924"}],"version-history":[{"count":0,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts\/6924\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/media?parent=6924"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/categories?post=6924"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/tags?post=6924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}