Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible-public
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
system
ansible-public
Commits
a75babb0
Commit
a75babb0
authored
1 year ago
by
Baptiste DE RENZO
Browse files
Options
Downloads
Patches
Plain Diff
Disable masquerade bridge when host bridge configured, Fix
#37651
parent
80f886ef
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
roles/lxc/files/lxc-net.host_bridge
+1
-0
1 addition, 0 deletions
roles/lxc/files/lxc-net.host_bridge
roles/lxc/files/lxc-net.masquerade_bridge
+0
-0
0 additions, 0 deletions
roles/lxc/files/lxc-net.masquerade_bridge
roles/lxc/tasks/main.yml
+29
-23
29 additions, 23 deletions
roles/lxc/tasks/main.yml
with
30 additions
and
23 deletions
roles/lxc/files/lxc-net.host_bridge
0 → 100644
+
1
−
0
View file @
a75babb0
USE_LXC_BRIDGE="false"
This diff is collapsed.
Click to expand it.
roles/lxc/
templat
es/lxc-net.
j2
→
roles/lxc/
fil
es/lxc-net.
masquerade_bridge
+
0
−
0
View file @
a75babb0
File moved
This diff is collapsed.
Click to expand it.
roles/lxc/tasks/main.yml
+
29
−
23
View file @
a75babb0
---
---
-
name
:
Masquerade bridge configuration
-
name
:
LXC packages installation
ansible.builtin.apt
:
force_apt_get
:
true
name
:
-
lxc
-
lxcfs
-
bridge-utils
state
:
present
register
:
apt_status
retries
:
60
until
:
apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)
-
name
:
Host bridge configuration
when
:
lxc_network_type == 'host_bridge'
when
:
lxc_network_type == 'host_bridge'
block
:
block
:
-
name
:
Masquerade bridge configuration disabling
notify
:
restart lxc-net
ansible.builtin.copy
:
src
:
lxc-net.host_bridge
dest
:
/etc/default/lxc-net
mode
:
"
644"
-
name
:
Ask confirmation
-
name
:
Ask confirmation
ansible.builtin.pause
:
ansible.builtin.pause
:
prompt
:
|
prompt
:
|
...
@@ -12,7 +31,6 @@
...
@@ -12,7 +31,6 @@
Documentation (section host device as bridge): https://wiki.debian.org/LXC/SimpleBridge
Documentation (section host device as bridge): https://wiki.debian.org/LXC/SimpleBridge
Continue (yes/no)
Continue (yes/no)
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
when
:
lxc_network_type == 'host_bridge'
register
:
confirm_continue
register
:
confirm_continue
no_log
:
true
no_log
:
true
...
@@ -21,33 +39,21 @@
...
@@ -21,33 +39,21 @@
msg
:
'
Installation
aborted'
msg
:
'
Installation
aborted'
when
:
not ((confirm_continue.user_input | bool) or (confirm_continue.user_input | length == 0))
when
:
not ((confirm_continue.user_input | bool) or (confirm_continue.user_input | length == 0))
-
name
:
LXC packages installation
ansible.builtin.apt
:
force_apt_get
:
true
name
:
-
lxc
-
lxcfs
-
bridge-utils
state
:
present
register
:
apt_status
retries
:
60
until
:
apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)
-
name
:
Default container configuration
notify
:
restart lxc
ansible.builtin.template
:
src
:
lxc-default.j2
dest
:
/etc/lxc/default.conf
mode
:
"
644"
-
name
:
Masquerade bridge configuration
-
name
:
Masquerade bridge configuration
when
:
lxc_network_type == 'masquerade_bridge'
when
:
lxc_network_type == 'masquerade_bridge'
block
:
block
:
-
name
:
Container network configuration
-
name
:
Container network configuration
notify
:
restart lxc-net
notify
:
restart lxc-net
ansible.builtin.
template
:
ansible.builtin.
copy
:
src
:
lxc-net.
j2
src
:
lxc-net.
masquerade_bridge
dest
:
/etc/default/lxc-net
dest
:
/etc/default/lxc-net
mode
:
"
644"
mode
:
"
644"
-
name
:
Default container configuration
notify
:
restart lxc
ansible.builtin.template
:
src
:
lxc-default.j2
dest
:
/etc/lxc/default.conf
mode
:
"
644"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment