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.
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