Skip to content
Snippets Groups Projects
Commit 5bf584c0 authored by Ryan Jones's avatar Ryan Jones
Browse files

updates

parent 95286e32
No related branches found
No related tags found
No related merge requests found
...@@ -12,4 +12,4 @@ provider "openstack" { ...@@ -12,4 +12,4 @@ provider "openstack" {
region = "${var.region}" region = "${var.region}"
user_name = "${var.user_name}" user_name = "${var.user_name}"
password = "${var.password}" password = "${var.password}"
} }
\ No newline at end of file
resource "ohpc" "vm" { resource "openstack" "vm" {
provisioner "remote-exec" { provisioner "remote-exec" {
inline = [ inline = [
...@@ -7,14 +7,14 @@ resource "ohpc" "vm" { ...@@ -7,14 +7,14 @@ resource "ohpc" "vm" {
"yum install -y ansible git vim bash-completion", "yum install -y ansible git vim bash-completion",
"yum install -y NetworkManager", "yum install -y NetworkManager",
"systemctl restart NetworkManager", "systemctl restart NetworkManager",
"nmcli con mod "Wired connection 1" connection.id "eth1"" "nmcli con mod 'Wired connection 1' connection.id 'eth1'",
] ]
connection { connection {
host = "${self.ipv4_address}" # The `self` variable is like `this` in many programming languages 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). type = "ssh" # in this case, `self` is the resource (the server).
user = "root" user = "root"
private_key = "${file('~/.ssh/id_rsa')}" private_key = "${file("~/.ssh/id_rsa")}"
} }
} }
...@@ -27,4 +27,4 @@ resource "ohpc" "vm" { ...@@ -27,4 +27,4 @@ resource "ohpc" "vm" {
working_dir = "$HOME/terraform-first-instance/terraform-openstack/CRI_XCBC/" working_dir = "$HOME/terraform-first-instance/terraform-openstack/CRI_XCBC/"
command = "ansible-playbook -c local -i hosts -l `hostname` site.yaml -b," command = "ansible-playbook -c local -i hosts -l `hostname` site.yaml -b,"
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment