Cookbook_file "/tmp/lib-installer.sh" do source "lib-installer.sh" mode 0755 end execute "install my lib" do command "sh /tmp/lib-installer.sh" end. I used both the execute resource or the bash resource. both achieve the same result: bash 'execute my script' do user 'root' cwd '/mydir' code <<-eoh ./myscript.sh eoh end ex.... Demonstrates how to create and test a recipe that runs a script on an instance, as part of the introductory chef cookbooks walkthrough for aws opsworks stacks..
Using knife cookbook sub-command once you’ve done all your work on a particular version of the cookbook, you can execute the following command,. Creating your first chef cookbook; creating your first chef cookbook. add the following execute command above the template resource code to create the a2ensite. If you already have a lot of bash shell-scripting experience, exit defaults to returning the exit status of the last-run command, cookbook; wikijunior.
0 komentar:
Posting Komentar