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
bfa13a30
Commit
bfa13a30
authored
Feb 27, 2018
by
Pietro Albini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxd: installazione dell'hypervisor
parent
316d1b08
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
111 additions
and
0 deletions
+111
-0
playbooks/roadhouse.yml
playbooks/roadhouse.yml
+4
-0
roles/common/tasks/users.yml
roles/common/tasks/users.yml
+1
-0
roles/lxd/tasks/main.yml
roles/lxd/tasks/main.yml
+3
-0
roles/lxd/tasks/setup.yml
roles/lxd/tasks/setup.yml
+49
-0
roles/lxd/templates/dnsmasq.conf.j2
roles/lxd/templates/dnsmasq.conf.j2
+3
-0
roles/lxd/templates/lxd-bridge-default.j2
roles/lxd/templates/lxd-bridge-default.j2
+51
-0
No files found.
playbooks/roadhouse.yml
View file @
bfa13a30
...
@@ -22,3 +22,7 @@
...
@@ -22,3 +22,7 @@
-
role
:
nginx
-
role
:
nginx
-
role
:
lxd
subnet
:
10.48.14
roles/common/tasks/users.yml
View file @
bfa13a30
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
user
:
user
:
name
:
"
{{
item
}}"
name
:
"
{{
item
}}"
groups
:
allow-ssh,passwordless-sudo,systemd-journal
groups
:
allow-ssh,passwordless-sudo,systemd-journal
append
:
true
state
:
present
state
:
present
shell
:
/bin/bash
shell
:
/bin/bash
...
...
roles/lxd/tasks/main.yml
0 → 100644
View file @
bfa13a30
---
-
include_tasks
:
setup.yml
roles/lxd/tasks/setup.yml
0 → 100644
View file @
bfa13a30
---
-
name
:
Install required packages
apt
:
name
:
"
{{
item
}}"
state
:
present
with_items
:
-
lxd
-
dnsmasq
register
:
lxd_installed
-
name
:
Add lxd-specific dnsmasq configuration
template
:
src
:
dnsmasq.conf.j2
dest
:
/etc/dnsmasq.d/lxd
register
:
lxd_dnsmasq_changed
-
name
:
Restart dnsmasq if needed
service
:
name
:
dnsmasq
state
:
restarted
when
:
lxd_dnsmasq_changed.changed
-
name
:
Upload the lxd-bridge configuration file
template
:
src
:
lxd-bridge-default.j2
dest
:
/etc/default/lxd-bridge
-
name
:
Initialize lxd
command
:
"
lxd
init
--auto"
when
:
lxd_installed.changed
-
name
:
Add all the admin users to the lxd group
user
:
name
:
"
{{
item
}}"
groups
:
lxd
append
:
true
with_items
:
"
{{
facts_common_admin_users
}}"
roles/lxd/templates/dnsmasq.conf.j2
0 → 100644
View file @
bfa13a30
server=/lxd/{{ subnet }}.1
bind-interfaces
except-interface=lxdbr0
roles/lxd/templates/lxd-bridge-default.j2
0 → 100644
View file @
bfa13a30
# Whether to setup a new bridge or use an existing one
USE_LXD_BRIDGE="true"
# Bridge name
# This is still used even if USE_LXD_BRIDGE is set to false
# set to an empty value to fully disable
LXD_BRIDGE="lxdbr0"
# Update the "default" LXD profile
UPDATE_PROFILE="true"
# Path to an extra dnsmasq configuration file
LXD_CONFILE=""
# DNS domain for the bridge
LXD_DOMAIN="lxd"
# IPv4
## IPv4 address (e.g. 10.0.8.1)
LXD_IPV4_ADDR="{{ subnet }}.1"
## IPv4 netmask (e.g. 255.255.255.0)
LXD_IPV4_NETMASK="255.255.255.0"
## IPv4 network (e.g. 10.0.8.0/24)
LXD_IPV4_NETWORK="{{ subnet }}.0/24"
## IPv4 DHCP range (e.g. 10.0.8.2,10.0.8.254)
LXD_IPV4_DHCP_RANGE="{{ subnet }}.2,{{ subnet }}.254"
## IPv4 DHCP number of hosts (e.g. 250)
LXD_IPV4_DHCP_MAX="252"
## NAT IPv4 traffic
LXD_IPV4_NAT="true"
# IPv6
## IPv6 address (e.g. 2001:470:b368:4242::1)
LXD_IPV6_ADDR=""
## IPv6 CIDR mask (e.g. 64)
LXD_IPV6_MASK=""
## IPv6 network (e.g. 2001:470:b368:4242::/64)
LXD_IPV6_NETWORK=""
## NAT IPv6 traffic
LXD_IPV6_NAT="false"
# Run a minimal HTTP PROXY server
LXD_IPV6_PROXY="true"
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