Commit d9f5aa2b authored by John Hackett's avatar John Hackett

Changing references to opennebula/onebr0

parent 00129cf9
...@@ -4,6 +4,10 @@ variable "ssh_public_key" {} ...@@ -4,6 +4,10 @@ variable "ssh_public_key" {}
variable "main_nic" {} variable "main_nic" {}
variable "netname" {
default = "opennebula"
}
resource "lxd_container_file" "apt_cache" { resource "lxd_container_file" "apt_cache" {
container_name = "${lxd_container.opennebula.name}" container_name = "${lxd_container.opennebula.name}"
target_file = "/etc/apt/apt.conf.d/01proxy" target_file = "/etc/apt/apt.conf.d/01proxy"
...@@ -21,13 +25,12 @@ resource "lxd_container_file" "authorized_keys" { ...@@ -21,13 +25,12 @@ resource "lxd_container_file" "authorized_keys" {
resource "lxd_container" "opennebula" { resource "lxd_container" "opennebula" {
name = "opennebula" name = "opennebula"
# image = "images:debian/stretch"
image = "opennebula-dev" image = "opennebula-dev"
config { config {
security.privileged = "true" security.privileged = "true"
security.nesting = "true" security.nesting = "true"
user.access_interface = "onebr0" # user.access_interface = "onebr0"
} }
device { device {
...@@ -69,7 +72,6 @@ resource "lxd_container" "opennebula" { ...@@ -69,7 +72,6 @@ resource "lxd_container" "opennebula" {
mode = "0444" mode = "0444"
} }
provisioner "local-exec" { provisioner "local-exec" {
command = "lxc exec ${lxd_container.opennebula.name} -- systemctl restart networking && lxc exec ${lxd_container.opennebula.name} -- systemctl status networking && lxc exec ${lxd_container.opennebula.name} -- systemctl start avahi-daemon" command = "lxc exec ${lxd_container.opennebula.name} -- systemctl restart networking && lxc exec ${lxd_container.opennebula.name} -- systemctl status networking && lxc exec ${lxd_container.opennebula.name} -- systemctl start avahi-daemon"
} }
...@@ -88,7 +90,7 @@ resource "lxd_profile" "opennebula" { ...@@ -88,7 +90,7 @@ resource "lxd_profile" "opennebula" {
properties { properties {
nictype = "bridged" nictype = "bridged"
parent = "${lxd_network.opennebula.name}" parent = "${var.netname}"
} }
} }
...@@ -104,8 +106,7 @@ resource "lxd_storage_pool" "opennebula" { ...@@ -104,8 +106,7 @@ resource "lxd_storage_pool" "opennebula" {
} }
resource "lxd_network" "opennebula" { resource "lxd_network" "opennebula" {
name = "opennebula" name = "${var.netname}"
config { config {
ipv4.address = "none" ipv4.address = "none"
......
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