Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
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
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
Arnaud Véron
slapos.package
Commits
be4eea75
Commit
be4eea75
authored
Sep 11, 2023
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playbook/ors: use systemd-networkd instead of ifupdown
parent
a484c07d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
23 deletions
+21
-23
playbook/roles/ors/files/interfaces
playbook/roles/ors/files/interfaces
+0
-20
playbook/roles/ors/files/systemd-dhcp-network
playbook/roles/ors/files/systemd-dhcp-network
+5
-0
playbook/roles/ors/files/systemd-wait-online-override
playbook/roles/ors/files/systemd-wait-online-override
+3
-0
playbook/roles/ors/meta/main.yml
playbook/roles/ors/meta/main.yml
+1
-0
playbook/roles/ors/tasks/main.yml
playbook/roles/ors/tasks/main.yml
+11
-2
playbook/sha256sum
playbook/sha256sum
+1
-1
No files found.
playbook/roles/ors/files/interfaces
deleted
100644 → 0
View file @
a484c07d
auto lo
iface lo inet loopback
auto enp2s0
iface enp2s0 inet dhcp
post-up echo 1 > /proc/sys/net/ipv4/conf/all/forwarding
post-up iptables -t nat -A POSTROUTING -o enp2s0 -j MASQUERADE
post-up iptables -t nat -A POSTROUTING -p udp -m udp --sport 5353 -j SNAT --to-source :53
post-up iptables -t nat -A PREROUTING -p udp -m udp --dport 53 -j DNAT --to-destination :5353
post-up ip6tables -t nat -A POSTROUTING -o enp2s0 -j MASQUERADE
auto enp0s31f6
iface enp0s31f6 inet dhcp
post-up echo 1 > /proc/sys/net/ipv4/conf/all/forwarding
post-up iptables -t nat -A POSTROUTING -o enp0s31f6 -j MASQUERADE
post-up iptables -t nat -A POSTROUTING -p udp -m udp --sport 5353 -j SNAT --to-source :53
post-up iptables -t nat -A PREROUTING -p udp -m udp --dport 53 -j DNAT --to-destination :5353
post-up ip6tables -t nat -A POSTROUTING -o enp0s31f6 -j MASQUERADE
source /etc/network/interfaces.d/*
playbook/roles/ors/files/systemd-dhcp-network
0 → 100644
View file @
be4eea75
[Match]
Name=en*
[Network]
DHCP=yes
playbook/roles/ors/files/systemd-wait-online-override
0 → 100644
View file @
be4eea75
[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --any
playbook/roles/ors/meta/main.yml
View file @
be4eea75
...
@@ -4,3 +4,4 @@ dependencies:
...
@@ -4,3 +4,4 @@ dependencies:
-
{
role
:
package
,
package_name
:
patchelf
,
package_state
:
present
}
-
{
role
:
package
,
package_name
:
patchelf
,
package_state
:
present
}
-
{
role
:
package
,
package_name
:
util-linux
,
package_state
:
present
}
-
{
role
:
package
,
package_name
:
util-linux
,
package_state
:
present
}
-
{
role
:
package
,
package_name
:
grub-efi-amd64-signed
,
package_state
:
present
}
-
{
role
:
package
,
package_name
:
grub-efi-amd64-signed
,
package_state
:
present
}
-
{
role
:
package
,
package_name
:
ifupdown
,
package_state
:
absent
}
playbook/roles/ors/tasks/main.yml
View file @
be4eea75
...
@@ -95,8 +95,17 @@
...
@@ -95,8 +95,17 @@
# Network
# Network
-
name
:
Configure /etc/network/interfaces
-
name
:
Configure /etc/systemd/network/dhcp.network
copy
:
src=interfaces dest=/etc/network/interfaces owner=root mode=644
copy
:
src=systemd-dhcp-network dest=/etc/systemd/network/dhcp.network owner=root mode=644
-
name
:
Create a directory if it does not exist
file
:
path=/etc/systemd/system/systemd-networkd-wait-online.service.d state=directory mode=0755
-
name
:
Configure /etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf
copy
:
src=systemd-wait-online-override dest=/etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf owner=root mode=644
-
name
:
Enable and start systemd-networkd
systemd
:
name=systemd-networkd.service enabled=yes state=started
-
name
:
Configure dhcp timeout
-
name
:
Configure dhcp timeout
lineinfile
:
dest=/etc/dhcp/dhclient.conf regexp="^timeout (.*)" line="timeout 15" state=present
lineinfile
:
dest=/etc/dhcp/dhclient.conf regexp="^timeout (.*)" line="timeout 15" state=present
...
...
playbook/sha256sum
View file @
be4eea75
55ce33d3e89f0093de552d8de66e306b6c142c06a4aa3e36e03954785f720047
-
6f816c3e09af4f17f266a55b1e0a91c844110239bb877e60a6d5087b7ce5fd73
-
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