mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 09:32:52 +00:00
- 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>
26 lines
691 B
Markdown
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
|
|
```
|