Commit f12087f3 authored by John Hackett's avatar John Hackett

Fixing bridge creation

parent 8908a173
# interface definition based upon default vagrant setup of 192.168.121.1/24 for its interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
auto onebr0
iface onebr0 inet dhcp
bridge_ports ens6
bridge_ports eth0
bridge_stp off
......@@ -11,6 +11,14 @@ resource "lxd_container_file" "apt_cache" {
create_directories = true
}
resource "lxd_container_file" "bridge" {
container_name = "${lxd_container.opennebula.name}"
target_file = "/etc/network/interfaces"
source = "files/interface.onebr0"
create_directories = true
}
resource "lxd_container_file" "authorized_keys" {
container_name = "${lxd_container.opennebula.name}"
target_file = "/root/.ssh/authorized_keys"
......
......@@ -45,10 +45,6 @@
- python-docker
- python-mysqldb
- mysql-client
# - name: create bridge
# openvswitch_bridge:
# bridge: onebr0
# state: present
- name: Set opennebula password
copy:
src: ./files/one_auth
......@@ -196,11 +192,6 @@
become_user: oneadmin
register: acl_create
failed_when: acl_create.rc == 1
# - name: create private network template
# command: "onevnet create /vagrant/vnet_private.tmpl"
# become_user: oneadmin
# failed_when: host_create.rc == 1
- name: ipv4 forward
sysctl:
name: net.ipv4.ip_forward
......@@ -210,20 +201,11 @@
reload: yes
- name: Install bridge-utils
apt: name=bridge-utils state=present
# - name: Setup bridge onebr0 where eth0 connects to this bridge
# template: src=files/interface.onebr0 dest=/etc/network/interfaces.d/onebr0
# notify:
# - restart networking
# - name: Install libvirt bridge
# copy:
# src: files/opennebula-bridge.xml
# dest: /etc/libvirt/qemu/networks/opennebula.xml
# notify:
# - libvirt network
- name: Setup bridge onebr0 where eth0 connects to this bridge
template: src=files/interface.onebr0 dest=/etc/network/interfaces.d/onebr0
notify:
- restart networking
handlers:
- name: restart networking
service: name=networking state=restarted
- name: libvirt network
command: virsh net-create /etc/libvirt/qemu/networks/opennebula.xml
become: true
service: name=networking state=restarted
\ 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