mirror of
https://github.com/khuedoan/homelab.git
synced 2025-02-24 13:41:26 +07:00
build(metal): add target for ansible-console
This commit is contained in:
parent
59a1298fc8
commit
5952b3d208
@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
Use [ansible-console](https://docs.ansible.com/ansible/latest/cli/ansible-console.html):
|
Use [ansible-console](https://docs.ansible.com/ansible/latest/cli/ansible-console.html):
|
||||||
|
|
||||||
```
|
```sh
|
||||||
ansible-console -i metal/inventories/prod.yml -u root
|
cd metal
|
||||||
|
make console
|
||||||
```
|
```
|
||||||
|
|
||||||
For example:
|
Then enter the command(s) you want to run, for example:
|
||||||
|
|
||||||
`root@all (4)[f:5]$ uptime`
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
root@all (4)[f:5]$ uptime
|
||||||
metal0 | CHANGED | rc=0 >>
|
metal0 | CHANGED | rc=0 >>
|
||||||
10:52:02 up 2 min, 1 user, load average: 0.17, 0.15, 0.06
|
10:52:02 up 2 min, 1 user, load average: 0.17, 0.15, 0.06
|
||||||
metal1 | CHANGED | rc=0 >>
|
metal1 | CHANGED | rc=0 >>
|
||||||
|
@ -17,5 +17,9 @@ cluster:
|
|||||||
--inventory inventories/${env}.yml \
|
--inventory inventories/${env}.yml \
|
||||||
cluster.yml
|
cluster.yml
|
||||||
|
|
||||||
|
console:
|
||||||
|
ansible-console \
|
||||||
|
--inventory inventories/${env}.yml
|
||||||
|
|
||||||
vagrant:
|
vagrant:
|
||||||
vagrant up
|
vagrant up
|
||||||
|
Loading…
Reference in New Issue
Block a user