first working configuration
This commit is contained in:
8
main.tf
8
main.tf
@@ -77,9 +77,9 @@ resource "libvirt_domain" "domain-ubuntu" {
|
||||
user = var.ssh_username
|
||||
host = libvirt_domain.domain-ubuntu.network_interface[0].addresses[0]
|
||||
private_key = file(var.ssh_private_key)
|
||||
bastion_host = "ams-kvm-remote-host"
|
||||
bastion_user = "deploys"
|
||||
bastion_private_key = file("~/.ssh/deploys.pem")
|
||||
#bastion_host = "my-jump-host."
|
||||
#bastion_user = "deploys"
|
||||
#bastion_private_key = file("~/.ssh/deploys")
|
||||
timeout = "2m"
|
||||
}
|
||||
}
|
||||
@@ -89,7 +89,7 @@ resource "libvirt_domain" "domain-ubuntu" {
|
||||
echo "[nginx]" > nginx.ini
|
||||
echo "${libvirt_domain.domain-ubuntu.network_interface[0].addresses[0]}" >> nginx.ini
|
||||
echo "[nginx:vars]" >> nginx.ini
|
||||
echo "ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ProxyCommand=\"ssh -W %h:%p -q ams-kvm-remote-host\"'" >> nginx.ini
|
||||
echo "ansible_ssh_common_args='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ProxyCommand=\"ssh -W %h:%p -q hqt\"'" >> nginx.ini
|
||||
ansible-playbook -u ${var.ssh_username} --private-key ${var.ssh_private_key} -i nginx.ini ansible/playbook.yml
|
||||
EOT
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user