Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
servers-config
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Sistemisti
servers-config
Commits
a9be0e38
Commit
a9be0e38
authored
Mar 02, 2018
by
Pietro Albini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxd-container: assign static IPv4 addresses to containers
parent
25d38b13
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
1 deletion
+44
-1
playbooks/roadhouse.yml
playbooks/roadhouse.yml
+2
-0
roles/lxd-container/handlers/main.yml
roles/lxd-container/handlers/main.yml
+6
-0
roles/lxd-container/tasks/main.yml
roles/lxd-container/tasks/main.yml
+1
-0
roles/lxd-container/tasks/networking.yml
roles/lxd-container/tasks/networking.yml
+13
-0
roles/lxd/handlers/main.yml
roles/lxd/handlers/main.yml
+6
-0
roles/lxd/tasks/setup.yml
roles/lxd/tasks/setup.yml
+15
-0
roles/lxd/templates/lxd-bridge-default.j2
roles/lxd/templates/lxd-bridge-default.j2
+1
-1
No files found.
playbooks/roadhouse.yml
View file @
a9be0e38
...
@@ -31,9 +31,11 @@
...
@@ -31,9 +31,11 @@
-
role
:
lxd-container
-
role
:
lxd-container
name
:
spock
name
:
spock
ip
:
10.0.0.2
image
:
debian/jessie/amd64
image
:
debian/jessie/amd64
-
role
:
lxd-container
-
role
:
lxd-container
name
:
bromuro
name
:
bromuro
ip
:
10.0.0.3
image
:
ubuntu/trusty/amd64
image
:
ubuntu/trusty/amd64
roles/lxd-container/handlers/main.yml
0 → 100644
View file @
a9be0e38
---
-
name
:
"
lxd-container.restart-{{
name
}}"
lxd_container
:
name
:
"
{{
name
}}"
state
:
restarted
roles/lxd-container/tasks/main.yml
View file @
a9be0e38
---
---
-
include_tasks
:
creation.yml
-
include_tasks
:
creation.yml
-
include_tasks
:
networking.yml
roles/lxd-container/tasks/networking.yml
0 → 100644
View file @
a9be0e38
---
-
name
:
"
Assign
a
static
IP
address
to
the
{{
name
}}
container"
lineinfile
:
line
:
"
dhcp-host={{
name
}},{{
ip
}}"
regexp
:
"
^dhcp
\\
-host={{
name
}}"
state
:
present
path
:
/etc/lxd_dnsmasq.conf
notify
:
-
lxd.restart-bridge
-
"
lxd-container.restart-{{
name
}}"
roles/lxd/handlers/main.yml
0 → 100644
View file @
a9be0e38
---
-
name
:
lxd.restart-bridge
service
:
name
:
lxd-bridge
state
:
restarted
roles/lxd/tasks/setup.yml
View file @
a9be0e38
...
@@ -33,6 +33,21 @@
...
@@ -33,6 +33,21 @@
src
:
lxd-bridge-default.j2
src
:
lxd-bridge-default.j2
dest
:
/etc/default/lxd-bridge
dest
:
/etc/default/lxd-bridge
notify
:
-
lxd.restart-bridge
-
name
:
Create the lxd dnsmasq configuration file
lineinfile
:
line
:
"
"
path
:
/etc/lxd_dnsmasq.conf
create
:
yes
state
:
present
notify
:
-
lxd.restart-bridge
-
name
:
Initialize lxd
-
name
:
Initialize lxd
command
:
"
lxd
init
--auto"
command
:
"
lxd
init
--auto"
...
...
roles/lxd/templates/lxd-bridge-default.j2
View file @
a9be0e38
...
@@ -10,7 +10,7 @@ LXD_BRIDGE="lxdbr0"
...
@@ -10,7 +10,7 @@ LXD_BRIDGE="lxdbr0"
UPDATE_PROFILE="true"
UPDATE_PROFILE="true"
# Path to an extra dnsmasq configuration file
# Path to an extra dnsmasq configuration file
LXD_CONFILE=""
LXD_CONFILE="
/etc/lxd_dnsmasq.conf
"
# DNS domain for the bridge
# DNS domain for the bridge
LXD_DOMAIN="lxd"
LXD_DOMAIN="lxd"
...
...
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