kubekey/docs/en/modules/command.md
liujian 192af7bb7e
feat: add Chinese README and documentation updates (#2791)
- Introduced a new Chinese version of the README file (README_zh-CN.md) to enhance accessibility for Chinese-speaking users.
- Updated the English README to reflect new features and installation instructions.
- Added detailed documentation for project structure, playbooks, roles, tasks, and modules to improve user understanding and usability.

Signed-off-by: [Your Name] <[Your Email]>
Signed-off-by: redscholar <blacktiledhouse@gmail.com>
2025-09-30 10:00:07 +08:00

26 lines
691 B
Markdown

# command (shell) Module
The command or shell module allows users to execute specific commands. The type of command executed is determined by the corresponding connector implementation.
## Parameters
| Parameter | Description | Type | Required | Default |
|-----------|------------|------|---------|---------|
| command | The command to execute. Template syntax can be used. | string | yes | - |
## Usage Examples
1. Execute a shell command
Connector type is `local` or `ssh`:
```yaml
- name: execute shell command
command: echo "aaa"
```
2. Execute a Kubernetes command
Connector type is `kubernetes`:
```yaml
- name: execute kubernetes command
command: kubectl get pod
```