Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
infra
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Platform Services Coop
infra
Commits
f12087f3
Commit
f12087f3
authored
Mar 10, 2018
by
John Hackett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing bridge creation
parent
8908a173
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
25 deletions
+19
-25
files/interface.onebr0
files/interface.onebr0
+6
-2
main.tf
main.tf
+8
-0
playbook.yml
playbook.yml
+5
-23
No files found.
files/interface.onebr0
View file @
f12087f3
# 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 e
ns6
bridge_ports e
th0
bridge_stp off
main.tf
View file @
f12087f3
...
...
@@ -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"
...
...
playbook.yml
View file @
f12087f3
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment