Tasks
Writing Terminal Commands
Execute shell commands and scripts directly from your runbooks to interact with your infrastructure.
Supported Shells
- Bash
- Sh
- Zsh
Command Format
Examples
Basic Command
Piped Commands
Environment Variables
Best Practices
- Keep commands simple and focused
- Use full paths to binaries when possible
- Handle errors with
||
operator - Use
set -e
at the start of scripts to fail fast
Security Considerations
- Avoid using root privileges unless necessary
- Never include sensitive data directly in commands
- Use environment variables for secrets
- Validate all user inputs