cjmling / findings

Notes on stuff i finds worth keeping for quick reference later on.
2 stars 0 forks source link

Chef run bash script #227

Open cjmling opened 4 years ago

cjmling commented 4 years ago

Use the execute resource to execute a single command. Commands that are executed with this resource are (by their nature) not idempotent ( unlike package resource which will check first if the package is installed or not before running and installing the package. ), as they are typically unique to the environment in which they are run. Use not_if and only_if to guard this resource for idempotence.

Tutorial : https://www.udemy.com/course/chef-fundamentals-a-recipe-for-automating-infrastructure/learn/lecture/6245444#questions/4401600

cjmling commented 4 years ago

Use <<- EOH to run multiple commands in line

Screen Shot 2562-12-04 at 3 27 37 PM