From 5bf584c0c1be1c6fbe89052a61b2d17be884fc89 Mon Sep 17 00:00:00 2001 From: Ryan Jones <rand11@Atlabs-MacBook-Pro-2.local> Date: Thu, 27 Jun 2019 10:35:11 -0500 Subject: [PATCH] updates --- provider.tf | 2 +- terraform-ssh-remote-exec.tf | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/provider.tf b/provider.tf index 457904d..ba4307e 100644 --- a/provider.tf +++ b/provider.tf @@ -12,4 +12,4 @@ provider "openstack" { region = "${var.region}" user_name = "${var.user_name}" password = "${var.password}" -} \ No newline at end of file +} diff --git a/terraform-ssh-remote-exec.tf b/terraform-ssh-remote-exec.tf index a0cdd3e..ae9407f 100644 --- a/terraform-ssh-remote-exec.tf +++ b/terraform-ssh-remote-exec.tf @@ -1,4 +1,4 @@ -resource "ohpc" "vm" { +resource "openstack" "vm" { provisioner "remote-exec" { inline = [ @@ -7,14 +7,14 @@ resource "ohpc" "vm" { "yum install -y ansible git vim bash-completion", "yum install -y NetworkManager", "systemctl restart NetworkManager", - "nmcli con mod "Wired connection 1" connection.id "eth1"" + "nmcli con mod 'Wired connection 1' connection.id 'eth1'", ] connection { host = "${self.ipv4_address}" # The `self` variable is like `this` in many programming languages type = "ssh" # in this case, `self` is the resource (the server). user = "root" - private_key = "${file('~/.ssh/id_rsa')}" + private_key = "${file("~/.ssh/id_rsa")}" } } @@ -27,4 +27,4 @@ resource "ohpc" "vm" { working_dir = "$HOME/terraform-first-instance/terraform-openstack/CRI_XCBC/" command = "ansible-playbook -c local -i hosts -l `hostname` site.yaml -b," } -} \ No newline at end of file +} -- GitLab