-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
53 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
- name: Install ZFS repo | ||
ansible.builtin.dnf: | ||
name: "https://zfsonlinux.org/epel/zfs-release-2-3.el{{ ansible_distribution_major_version }}.noarch.rpm" | ||
disable_gpg_check: true | ||
state: present | ||
|
||
- name: Remove ZFS DKMS | ||
ansible.builtin.dnf: | ||
name: zfs-dkms | ||
state: absent | ||
|
||
- name: Switch ZFS repo to kmod | ||
ansible.builtin.shell: | | ||
dnf config-manager --disable zfs | ||
dnf config-manager --enable zfs-kmod | ||
changed_when: false | ||
|
||
- name: Install ZFS kernel module | ||
ansible.builtin.dnf: | ||
name: zfs-kmod | ||
state: present | ||
|
||
- name: Load ZFS kernel module | ||
community.general.modprobe: | ||
name: zfs | ||
state: present | ||
|
||
- name: Create zfs-tuning.sh | ||
ansible.builtin.copy: | ||
src: zfs-tuning.sh | ||
dest: /usr/local/sbin/zfs-tuning.sh | ||
owner: root | ||
group: root | ||
mode: 0755 | ||
|
||
- name: Install zfs-tuning service | ||
ansible.builtin.copy: | ||
src: zfs-tuning.service | ||
dest: /usr/lib/systemd/system/zfs-tuning.service | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
|
||
- name: Start zfs-tuning service | ||
ansible.builtin.service: | ||
name: zfs-tuning | ||
state: started | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,9 @@ | ||
--- | ||
- name: Install ZFS repo | ||
ansible.builtin.dnf: | ||
name: "https://zfsonlinux.org/epel/zfs-release-2-2.el{{ ansible_distribution_major_version }}.noarch.rpm" | ||
disable_gpg_check: true | ||
state: present | ||
- name: Install ZFS | ||
ansible.builtin.include_tasks: install.yml | ||
when: zpools is defined and zpools != None | ||
|
||
- name: Install ZFS kernel module | ||
ansible.builtin.dnf: | ||
name: | ||
- kernel-headers | ||
- kernel-modules | ||
- kernel-devel | ||
- zfs | ||
state: present | ||
when: zpools is defined and zpools != None | ||
|
||
- name: Load ZFS kernel module | ||
community.general.modprobe: | ||
name: zfs | ||
state: present | ||
when: zpools is defined and zpools != None | ||
|
||
- name: Create zfs-tuning.sh | ||
ansible.builtin.copy: | ||
src: zfs-tuning.sh | ||
dest: /usr/local/sbin/zfs-tuning.sh | ||
owner: root | ||
group: root | ||
mode: 0755 | ||
when: zpools is defined and zpools != None | ||
|
||
- name: Install zfs-tuning service | ||
ansible.builtin.copy: | ||
src: zfs-tuning.service | ||
dest: /usr/lib/systemd/system/zfs-tuning.service | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
when: zpools is defined and zpools != None | ||
|
||
- name: Start zfs-tuning service | ||
ansible.builtin.service: | ||
name: zfs-tuning | ||
state: started | ||
enabled: true | ||
when: zpools is defined and zpools != None | ||
|
||
- name: Create ZFS pool | ||
- name: Create ZFS pools | ||
ansible.builtin.include_tasks: create-pool.yml | ||
with_dict: "{{ zpools | default({}, true) }}" | ||
when: zpools is defined and zpools != None |