Skip to content

Commit cac281e

Browse files
committed
fix: install kmod-tun via package resource
Signed-off-by: Sidharth Jawale <sidharth@obmondo.com>
1 parent 7a24222 commit cac281e

File tree

1 file changed

+12
-22
lines changed
  • modules/enableit/profile/manifests/network

1 file changed

+12
-22
lines changed

modules/enableit/profile/manifests/network/netbird.pp

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,31 +38,21 @@
3838
# Install NetBird service
3939
if $enable {
4040
$_checksum = lookup('common::network::netbird::checksums')
41-
$_arch = profile::arch()
4241

43-
if $_os_name == 'TurrisOS' {
44-
# NOTE: only tested on TurrisOS which has only armv6 packages
45-
# even though TurrisOS comes with armv7
46-
if $_arch == 'armv7' {
47-
$_arch = 'armv6'
48-
}
42+
# NOTE: There are few TurrisOS routers which run on armv7l architecture.
43+
# However, netbird officially don't release armv7, but armv6 binaries.
44+
# Coincidentally, we tested the armv6 netbird binaries run perfectly fine.
45+
# Hence, we're using that in this case.
46+
$_arch = profile::arch() == 'armv7' ? {
47+
true => 'armv6',
48+
default => profile::arch(),
49+
}
4950

50-
exec { 'update_package_repo':
51-
command => 'opkg update; opkg install kmod-tun',
52-
path => '/usr/bin:/usr/sbin:/bin:/sbin',
53-
unless => 'opkg list-installed | grep kmod-tun >/dev/null',
54-
noop => $noop_value,
51+
if $_os_name == 'TurrisOS' {
52+
package { 'kmod-tun':
53+
ensure => ensure_present($enable),
54+
noop => $noop_value,
5555
}
56-
57-
# Uncomment the following piece of code when
58-
# https://github.com/OpenVoxProject/openvox/pull/221 is merged
59-
# and we've migrated from Puppet to OpenVox.
60-
# package { 'kmod-tun':
61-
# ensure => ensure_present($enable),
62-
# provider => 'opkg',
63-
# noop => $noop_value,
64-
# require => Exec['update_package_repo'],
65-
# }
6656
}
6757

6858
# Download and extract NetBird binary from GitHub releases

0 commit comments

Comments
 (0)