zfs

Ansible Role: ZFS Ansible Role GitHub tag (latest SemVer) Ansible Role Ansible Role

Install ZFS, configure zpool and datasets.

Role Variables

List of variables from defaults/main.yml.

zfs_pools: {}

ZFS pools to define. Example configration of an encrypted pool might look like this:

zfs_pools:
  - name: tank
    devices: []
    ashift: 13
    compression: zstd
    encryption: aes-256-gcm
    keylocation: prompt
    keyformat: passphrase
    passphrase: mysecret

ZFS datasets are defined in the following:

zfs_datasets: {}

All parameters are passed as extra options, so an example dataset configuration might look like this:

zfs_datasets:
  - name: tank/media
    mountpoint: /media
    records_size: 1M
  - name: tank/photos
    mountpoint: /mnt/photos
    compression: off

Example Playbook

- hosts: all

  vars:
    zfs_pools:
      - name: tank
        devices: []
        ashift: 13
        compression: zstd
        encryption: aes-256-gcm
        keylocation: prompt
        keyformat: passphrase
        passphrase: mysecret
    zfs_datasets:
      - name: tank/media
        mountpoint: /media
        records_size: 1M
      - name: tank/photos
        mountpoint: /mnt/photos
        compression: off
    
  roles:
     - radek-sprta.zfs

License

MIT

Author Information

Radek Sprta mail@radeksprta.eu

About

Install ZFS, configure zpool and datasets.

Install
ansible-galaxy install radek-sprta/ansible-role-zfs
GitHub repository
License
mit
Downloads
48