mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
593 B
593 B
command(shell) 模块
command或shell模块允许用户执行特定命令。执行何种命令由相关的connector实现
参数
| 参数 | 说明 | 类型 | 必填 | 默认值 |
|---|---|---|---|---|
| command | 执行的命令.可使用模板语法 | 字符串 | 是 | - |
使用示例
- 执行shell命令
connector.type 为
local或ssh
- name: execute shell command
command: echo "aaa"
- 执行kubernetes命令
connector.type 为
kubernetes
- name: executor kubernetes command
command: kubectl get pod