Update README.md

This commit is contained in:
NewName
2024-08-14 05:35:25 +08:00
parent afe8581638
commit 5d9c6efb0b

View File

@@ -210,6 +210,12 @@ ansible -m ping all
ansible-playbook renwu.yml
```
执行单个命令
```
ansible all -a "ls"
```
---
---
@@ -222,6 +228,10 @@ ansible-playbook renwu.yml
- **rescued**: 表示在任务失败后被恢复的数量。
- **ignored**: 表示被忽略的任务数量。
-绿色:任务顺利完成
-橙色:任务执行后有变化,比如文件被修改或某些服务被重启。
-红色:任务执行失败,一般会终止剩余的所有任务。
#### 如果所有被控机端口和密码都一样
`/etc/ansible/hosts`配置可以这样写