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

[upd] ansible_host_bastion

parent 8a67255c
No related branches found
No related tags found
No related merge requests found
Pipeline #14908 canceled
......@@ -14,7 +14,7 @@ resource "openstack_compute_instance_v2" "bastion_instance" {
# Copie des IP locales dans un fichier .txt sur la machine hébergeante
# Inventaire Ansible
provisioner "local-exec" {
command = "echo '${self.name} : ${self.access_ip_v4}' > ip_files/private_ips.txt; echo '[admin]' > hosts.ini; echo ${self.name} ansible_host=${openstack_networking_floatingip_v2.floatip_admin.address} ansible_user=ubuntu ansible_ssh_private_key_file='.ssh/${var.INSTANCE_BASTION_KEY_PAIR}.pem' >> hosts.ini; echo '[node]' >> hosts.ini"
command = "echo '${self.name} : ${self.access_ip_v4}' > ip_files/private_ips.txt; echo '[admin]' > hosts.ini; echo ${self.name} ansible_host_bastion=${openstack_networking_floatingip_v2.floatip_admin.address} ansible_user=ubuntu ansible_ssh_private_key_file='.ssh/${var.INSTANCE_BASTION_KEY_PAIR}.pem' >> hosts.ini; echo '[node]' >> hosts.ini"
}
depends_on = [openstack_compute_keypair_v2.keypair_project,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment