Skip to content
Snippets Groups Projects
Commit f43e5bbc authored by MUNIER Florian's avatar MUNIER Florian
Browse files

[add] ansible.cfg ssh_cfg.tf

parent 1bdd5dfe
No related branches found
No related tags found
No related merge requests found
......@@ -10,3 +10,4 @@ hosts.ini
hosts.ini
*.pem
*.pub
ssh.cfg
\ No newline at end of file
[ssh_connection]
ssh_args = -F ssh.cfg
control_path = .ssh/mux-%r@%h:%p
\ No newline at end of file
resource "null_resource" "ssh_cfg" {
provisioner "local-exec" {
command = "echo 'Host bastion\n Hostname ${openstack_networking_floatingip_v2.floatip_admin.address}\n User ubuntu\n IdentityFile .ssh/${var.INSTANCE_BASTION_KEY_PAIR}.pem\nHost 192.*\n ProxyCommand ssh -F ssh.cfg -W %h:%p bastion\n User ubuntu\n IdentityFile .ssh/${var.INSTANCE_ORCHEST_KEY_PAIR}.pem\nHost *\n ControlMaster auto\n ControlPath .ssh/mux-%r@%h:%p\n ControlPersist 15m' > ssh.cfg"
}
depends_on = [openstack_compute_instance_v2.orchestration_instance]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment