terraform-libvirt/Makefile

18 lines
456 B
Makefile
Raw Normal View History

2020-08-10 23:43:24 +00:00
.PHONY: console dhcp-lease ssh
console:
@virsh console --domain db1
ssh:
2021-01-23 20:45:22 +00:00
IP=$(shell virsh domifaddr --domain db1 | tail -2 | awk -F ' ' '{ print $$4 }' | sed 's|/.*||') && \
ssh -o ProxyCommand="ssh -W %h:%p antoine@dx30_remote.localdomain" -i ~/.ssh/pri/id_rsa_bis antoine@"$$IP"
2020-08-10 23:43:24 +00:00
dhcp-lease:
@virsh net-dhcp-leases --network private
get-ip:
@virsh domifaddr --domain db1
destroy_vm:
2021-01-23 20:45:22 +00:00
@terraform destroy -auto-approve -target=libvirt_domain.db1