From f6ecf2a46569372620220731072ee302d43b3805 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Thu, 11 Mar 2021 15:23:47 +0100 Subject: [PATCH] bundles/nfs-client: support arch linux --- bundles/nfs-client/items.py | 9 +++++++-- bundles/nfs-client/metadata.py | 5 +++++ nodes/home/router.py | 1 - nodes/kunsi-t470.py | 13 +++++++++++++ 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/bundles/nfs-client/items.py b/bundles/nfs-client/items.py index df06881..b2d072a 100644 --- a/bundles/nfs-client/items.py +++ b/bundles/nfs-client/items.py @@ -1,3 +1,8 @@ +if node.has_bundle('pacman'): + package = 'pkg_pacman:nfs-utils' +else: + package = 'pkg_apt:nfs-common' + for mount, data in node.metadata.get('nfs-client/mounts',{}).items(): data['mount'] = mount data['mount_options'] = set(data.get('mount_options', set())) @@ -34,7 +39,7 @@ for mount, data in node.metadata.get('nfs-client/mounts',{}).items(): 'file:/etc/systemd/system/{}.mount'.format(unitname), 'file:/etc/systemd/system/{}.automount'.format(unitname), 'directory:{}'.format(data['mountpoint']), - 'pkg_apt:nfs-common', + package, }, } else: @@ -42,7 +47,7 @@ for mount, data in node.metadata.get('nfs-client/mounts',{}).items(): 'needs': { 'file:/etc/systemd/system/{}.mount'.format(unitname), 'directory:{}'.format(data['mountpoint']), - 'pkg_apt:nfs-common', + package, }, } diff --git a/bundles/nfs-client/metadata.py b/bundles/nfs-client/metadata.py index 00ffd00..13e4ed0 100644 --- a/bundles/nfs-client/metadata.py +++ b/bundles/nfs-client/metadata.py @@ -4,4 +4,9 @@ defaults = { 'nfs-common': {}, }, }, + 'pacman': { + 'packages': { + 'nfs-utils': {}, + }, + }, } diff --git a/nodes/home/router.py b/nodes/home/router.py index 8533bcd..ff91820 100644 --- a/nodes/home/router.py +++ b/nodes/home/router.py @@ -150,7 +150,6 @@ nodes['home.router'] = { 'kunsi': { 'ssh_pubkey': { # work laptop - 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPM68t1Ssf0c9dEkYOEXllUQ0aybPsW3aQAJuWpUHPlt', 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICYst1HK+gJYhNxzqJGnz4iB73pa89Xz2yH+8wufOcsA', }, }, diff --git a/nodes/kunsi-t470.py b/nodes/kunsi-t470.py index 143ff38..cc55fee 100644 --- a/nodes/kunsi-t470.py +++ b/nodes/kunsi-t470.py @@ -5,6 +5,7 @@ nodes['kunsi-t470'] = { 'bundles': { 'basic', 'lldp', + 'nfs-client', 'pacman', 'openssh', 'sudo', @@ -36,6 +37,18 @@ nodes['kunsi-t470'] = { 'locale': { 'default': 'en_DK.UTF-8', }, + 'nfs-client': { + 'mounts': { + 'nas-storage': { + 'mountpoint': '/mnt/nas', + 'serverpath': '172.19.138.20:/storage/nas', + 'mount_options': { + 'retry=0', + 'ro', + }, + }, + }, + }, 'pacman': { 'packages': { 'fish': {},