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

[upd] host.ini

parent 2187b7d2
No related branches found
No related tags found
No related merge requests found
Pipeline #14594 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 '[app]' > 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"
command = "echo '${self.name} : ${self.access_ip_v4}' > ip_files/private_ips.txt; echo '[app]' > 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"
}
depends_on = [openstack_compute_keypair_v2.keypair_project,
......@@ -40,7 +40,7 @@ resource "openstack_compute_instance_v2" "orchestration_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 [node] >> hosts.ini; echo ${self.name} ansible_host=${self.access_ip_v4} ansible_user=ubuntu ansible_ssh_private_key_file='${var.INSTANCE_ORCHEST_KEY_PAIR}.pem'>> hosts.ini"
command = "echo '${self.name} : ${self.access_ip_v4}' >> ip_files/private_ips.txt; echo ${self.name} ansible_host=${self.access_ip_v4} ansible_user=ubuntu ansible_ssh_private_key_file='${var.INSTANCE_ORCHEST_KEY_PAIR}.pem'>> hosts.ini"
}
depends_on = [openstack_compute_instance_v2.bastion_instance,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment