Commit 5bf584c0 authored by Ryan Jones's avatar Ryan Jones
Browse files

updates

parent 95286e32
......@@ -12,4 +12,4 @@ provider "openstack" {
region = "${var.region}"
user_name = "${var.user_name}"
password = "${var.password}"
}
\ No newline at end of file
}
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
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment