diff --git a/site-modules/profile/manifests/zfs/rancher.pp b/site-modules/profile/manifests/zfs/rancher.pp new file mode 100644 index 00000000..2f3641fe --- /dev/null +++ b/site-modules/profile/manifests/zfs/rancher.pp @@ -0,0 +1,14 @@ +# Handle /var/lib/rancher partition as zfs mountpoint +# On the vms, to reduce the disk usage and use local storage when the second hard +# drive is configured to a local storage in terraform +class profile::zfs::rancher { + # as it's for rancher, we consider the zpool['data'] is + # already installed by profile::zfs::docker + zfs { 'data/rancher': + ensure => present, + atime => 'off', + compression => 'zstd', + mountpoint => '/var/lib/rancher', + require => Zpool['data'], + } +} diff --git a/site-modules/role/manifests/rancher_node.pp b/site-modules/role/manifests/rancher_node.pp index ccb94f98..046704b6 100644 --- a/site-modules/role/manifests/rancher_node.pp +++ b/site-modules/role/manifests/rancher_node.pp @@ -1,6 +1,7 @@ class role::rancher_node inherits role::swh_base { include profile::docker include profile::zfs::docker include profile::zfs::kubelet + include profile::zfs::rancher include profile::mountpoints }