Skip to content

Latest commit

 

History

History
70 lines (52 loc) · 1.79 KB

README.md

File metadata and controls

70 lines (52 loc) · 1.79 KB

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