bundles/zfs: support arch linux
This commit is contained in:
parent
961a2891a0
commit
c1bb43286d
2 changed files with 39 additions and 23 deletions
|
@ -3,25 +3,26 @@ from json import dumps
|
||||||
|
|
||||||
from bundlewrap.metadata import MetadataJSONEncoder
|
from bundlewrap.metadata import MetadataJSONEncoder
|
||||||
|
|
||||||
actions = {
|
if node.os == 'debian':
|
||||||
# For some reason, this module doesn't get auto-loaded on debian,
|
actions = {
|
||||||
# even if installation of zfsutils-linux tries to start
|
# For some reason, this module doesn't get auto-loaded on debian,
|
||||||
# zfs-mount.service. We have no choice but to do it manually.
|
# even if installation of zfsutils-linux tries to start
|
||||||
'modprobe_zfs': {
|
# zfs-mount.service. We have no choice but to do it manually.
|
||||||
'command': 'modprobe zfs',
|
'modprobe_zfs': {
|
||||||
'unless': 'lsmod | grep ^zfs',
|
'command': 'modprobe zfs',
|
||||||
'needs': {
|
'unless': 'lsmod | grep ^zfs',
|
||||||
'pkg_apt:zfs-dkms',
|
'needs': {
|
||||||
|
'pkg_apt:zfs-dkms',
|
||||||
|
},
|
||||||
|
'needed_by': {
|
||||||
|
'pkg_apt:zfs-zed',
|
||||||
|
'pkg_apt:zfsutils-linux',
|
||||||
|
'zfs_dataset:',
|
||||||
|
'zfs_pool:',
|
||||||
|
},
|
||||||
|
'comment': 'If this fails, do a dist-upgrade, reinstall zfs-dkms, reboot',
|
||||||
},
|
},
|
||||||
'needed_by': {
|
}
|
||||||
'pkg_apt:zfs-zed',
|
|
||||||
'pkg_apt:zfsutils-linux',
|
|
||||||
'zfs_dataset:',
|
|
||||||
'zfs_pool:',
|
|
||||||
},
|
|
||||||
'comment': 'If this fails, do a dist-upgrade, reinstall zfs-dkms, reboot',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
files = {
|
files = {
|
||||||
'/etc/modprobe.d/zfs.conf': {
|
'/etc/modprobe.d/zfs.conf': {
|
||||||
|
@ -69,11 +70,7 @@ files = {
|
||||||
}
|
}
|
||||||
|
|
||||||
svc_systemd = {
|
svc_systemd = {
|
||||||
'zfs-zed': {
|
'zfs-zed': {},
|
||||||
'needs': {
|
|
||||||
'pkg_apt:zfs-zed'
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for name, attrs in node.metadata.get('zfs/datasets', {}).items():
|
for name, attrs in node.metadata.get('zfs/datasets', {}).items():
|
||||||
|
|
|
@ -16,6 +16,7 @@ defaults = {
|
||||||
},
|
},
|
||||||
'zfs-zed': {
|
'zfs-zed': {
|
||||||
'needed_by': {
|
'needed_by': {
|
||||||
|
'svc_systemd:zfs-zed',
|
||||||
'zfs_dataset:',
|
'zfs_dataset:',
|
||||||
'zfs_pool:',
|
'zfs_pool:',
|
||||||
},
|
},
|
||||||
|
@ -58,6 +59,24 @@ defaults = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'pacman': {
|
||||||
|
'additional_config': {
|
||||||
|
'[archzfs]\nServer = http://archzfs.com/archzfs/x86_64',
|
||||||
|
},
|
||||||
|
'packages': {
|
||||||
|
'zfs-linux-lts': {
|
||||||
|
'needed_by': {
|
||||||
|
'zfs_dataset:',
|
||||||
|
'zfs_pool:',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'zfs-utils': {
|
||||||
|
'needed_by': {
|
||||||
|
'svc_systemd:zfs-zed',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
'zfs': {
|
'zfs': {
|
||||||
'datasets': {},
|
'datasets': {},
|
||||||
'pools': {},
|
'pools': {},
|
||||||
|
|
Loading…
Reference in a new issue