build(metal): add target for ansible-console

This commit is contained in:
Khue Doan 2022-02-25 01:38:53 +07:00
parent 59a1298fc8
commit 5952b3d208
2 changed files with 9 additions and 5 deletions

View File

@ -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 >>

View File

@ -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