diff --git a/bundles/zfs/items.py b/bundles/zfs/items.py index d1789c3..2d4606e 100644 --- a/bundles/zfs/items.py +++ b/bundles/zfs/items.py @@ -82,14 +82,14 @@ zfs_pools = {} for name, attrs in node.metadata.get('zfs/pools', {}).items(): zfs_pools[name] = attrs - # Not yet supported on debian buster - #actions[f'pool_{name}_enable_trim'] = { - # 'command': f'zpool set autotrim=on {name}', - # 'unless': f'zpool get autotrim -H -o value {name} | grep -q on', - # 'needs': [ - # f'zfs_pool:{name}' - # ] - #} + if node.os_version[0] > 10: + actions[f'pool_{name}_enable_trim'] = { + 'command': f'zpool set autotrim=on {name}', + 'unless': f'zpool get autotrim -H -o value {name} | grep -q on', + 'needs': [ + f'zfs_pool:{name}' + ] + } directories = { "/etc/zfs-snapshot-backup-pre.d": {