initial commit
This commit is contained in:
commit
800836b2d9
23 changed files with 609 additions and 0 deletions
44
roles/zfs/tasks/main.yml
Normal file
44
roles/zfs/tasks/main.yml
Normal file
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
|
||||
- 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
|
Loading…
Add table
Add a link
Reference in a new issue