- package: Used to manage packages on a node
- service: Used to manage services on a node
- user: Manage users on the node
- group: Manage groups
- template: Manage files with embedded ruby templates
- cookbook_file: Transfer files from the files subdirectory in the cookbook to a location on the node
- file: Manage contents of a file on node
- directory: Manage directories on node
- execute: Execute a command on the node. Use the script resource to execute a script using a specific interpreter (Ruby, Python, Perl, csh, or Bash).
- cron: Edit an existing cron file on the node
- bash: Use the bash resource to execute scripts using the Bash interpreter.
- log: A log resource block adds messages to the log file based on events that occur during a Chef Infra Client run:
Bash vs execute
For a single script, use an execute. The bash resource is for including the script contents inline in the recipe code.
Use the bash resource to execute scripts using the Bash interpreter. Commands that are executed with this resource are (by their nature) not idempotent, as they are typically unique to the environment in which they are run.
Use the execute resource to execute a single command. Commands that are executed with this resource are (by their nature) not idempotent, as they are typically unique to the environment in which they are run.Use the script resource to execute a script using a specific interpreter (Ruby, Python, Perl, csh, or Bash).
Chef in-built and common resource types
- Best AI tools for Software Engineers - November 4, 2024
- Installing Jupyter: Get up and running on your computer - November 2, 2024
- An Introduction of SymOps by SymOps.com - October 30, 2024