--- - name: install zfs-release package (RHEL/CentOS) yum: name: "http://download.zfsonlinux.org/epel/zfs-release.el7_5.noarch.rpm" state: present when: ansible_distribution in ["CentOS" , "Red Hat Enterprise Linux" ] - name: install zfs-release package (Fedora) dnf: name: "http://download.zfsonlinux.org/fedora/zfs-release.fc29.noarch.rpm" state: present when: ansible_distribution in ["Fedora"] and not is_atomic - name: install zfs and dkms package: name: "{{ item }}" state: present with_items: - kernel-devel - "@Development tools" - dkms - zfs register: zfs_installed when: not is_atomic - name: load zfs module modprobe: name: zfs state: present - name: add zfs to modules-load.d copy: dest: "/etc/modules-load.d/zfs.conf" content: | zfs #- name: set zfs_arc_max to 75% installed memory ({{ arc_size_bytes }} bytes) # lineinfile: # path: "/etc/modprobe.d/zfs.conf" # regexp: '^options zfs zfs_arc_max=' # line: 'options zfs zfs_arc_max="{{ arc_size_bytes }}"' # create: yes # commented out, does not adjust to 75% of each host, leading to disproportionate allocations