mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-27 16:11:03 +07:00
docs(tutorials): run commands on multiple nodes
This commit is contained in:
parent
71e0828297
commit
3b107c28fa
@ -13,6 +13,7 @@
|
||||
- [Tutorials]()
|
||||
- [Single node cluster adjustments](./tutorials/single_node_cluster_adjustments.md)
|
||||
- [Add or remove nodes (scale up or down)](./tutorials/add-or-remove-nodes.md)
|
||||
- [Run commands on multiple nodes](./tutorials/run-commands-on-multiple-nodes.md)
|
||||
- [Install new applications]()
|
||||
- [Reference](./reference/README.md)
|
||||
- [Architecture](./reference/architecture.md)
|
||||
|
22
docs/src/tutorials/run-commands-on-multiple-nodes.md
Normal file
22
docs/src/tutorials/run-commands-on-multiple-nodes.md
Normal file
@ -0,0 +1,22 @@
|
||||
# Run commands on multiple nodes
|
||||
|
||||
Use [ansible-console](https://docs.ansible.com/ansible/latest/cli/ansible-console.html):
|
||||
|
||||
```
|
||||
ansible-console -i metal/inventories/prod.yml -u root
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
`root@all (4)[f:5]$ uptime`
|
||||
|
||||
```
|
||||
metal0 | CHANGED | rc=0 >>
|
||||
10:52:02 up 2 min, 1 user, load average: 0.17, 0.15, 0.06
|
||||
metal1 | CHANGED | rc=0 >>
|
||||
10:52:02 up 2 min, 1 user, load average: 0.14, 0.11, 0.04
|
||||
metal3 | CHANGED | rc=0 >>
|
||||
10:52:02 up 2 min, 1 user, load average: 0.03, 0.02, 0.00
|
||||
metal2 | CHANGED | rc=0 >>
|
||||
10:52:02 up 2 min, 1 user, load average: 0.06, 0.06, 0.02
|
||||
```
|
Loading…
Reference in New Issue
Block a user