Ansible playbook that implements https://github.com/zfsonlinux/zfs/wiki/Ubuntu-18.04-Root-on-ZFS
- Edit
ansible/vars.yml
with your desired settings. - Run
packer build -on-error=ask ubuntu-zfs-{{ mbr || efi }}.json
to test the playbook in a Virtualbox machine. - The last provisioner is simply a shell provisioner that runs
false
, so you can examine the resulting system once the playbook has completed. - Playbook hasn't yet been tested on real hardware, will report back with more commits
- it should go without saying, but trying to run this on real hardware will result in data loss
zfsprep_zap_disks: true
- forcibly nuke any partitions on existing diskszfsprep_legacy_device_nodes
- set totrue
to use/dev/sdX
device names instead ofby-id
zfsprep_root_pool
- root pool namezfsprep_data_pool
- data pool name (separate from root pool)zfsprep_efi: true
- Use EFI layout, install grub-efi instead of grub-pc. Set tofalse
to install grub-pc insteadzfsprep_luks
- LUKS supportzfsprep_luks_flags
- flags to pass to luksFormatzfsprep_luks_passphrase
- passphrase for luksFormat/luksOpenzfsprep_hostname
- short and FQDN hostnames to configure in the target OSzfsprep_root_disks
- target disks for root poolzfsprep_data_disks
- target disks for data poolzfsprep_root_pool_type
- pool type for root poolzfsprep_data_pool_type
- pool type for data poolzfsprep_extra_locales
- list of extra locales to install alongsideen_US.UTF-8
zfsprep_lang
-LANG
to set in/etc/default/locale
zfsprep_timezone
- timezone to set in resulting OS (defaults toUTC
)
a few more in ansible/roles/01-system-prep/defaults/main.yml