Extra settings for hpool
This commit is contained in:
parent
e884b30d08
commit
bc30de48bc
@ -0,0 +1,17 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Load encryption key for ZFS hpool
|
||||||
|
Documentation=man:zfs(8)
|
||||||
|
DefaultDependencies=no
|
||||||
|
After=systemd-udev-settle.service
|
||||||
|
After=zfs-import.target
|
||||||
|
After=systemd-remount-fs.service
|
||||||
|
Before=zfs-mount.service
|
||||||
|
ConditionPathIsDirectory=/sys/module/zfs
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/sbin/zfs load-key hpool
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=zfs.target
|
@ -23,6 +23,7 @@
|
|||||||
- import_tasks: tasks/hosts/systemd-mail.yml
|
- import_tasks: tasks/hosts/systemd-mail.yml
|
||||||
- import_tasks: tasks/hosts/zfs-scrub.yml
|
- import_tasks: tasks/hosts/zfs-scrub.yml
|
||||||
- import_tasks: tasks/hosts/zfs-trim.yml
|
- import_tasks: tasks/hosts/zfs-trim.yml
|
||||||
|
- import_tasks: tasks/hosts/zfs-extra.yml
|
||||||
- import_tasks: tasks/hosts/zfsutils-cron.yml
|
- import_tasks: tasks/hosts/zfsutils-cron.yml
|
||||||
- import_tasks: tasks/hosts/ups.yml
|
- import_tasks: tasks/hosts/ups.yml
|
||||||
- import_tasks: tasks/hosts/smart.yml
|
- import_tasks: tasks/hosts/smart.yml
|
||||||
|
17
playbooks/tasks/hosts/zfs-extra.yml
Normal file
17
playbooks/tasks/hosts/zfs-extra.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
- name: Load hpool keys service file
|
||||||
|
copy:
|
||||||
|
src: ./filesystem/{{ ansible_hostname }}/etc/systemd/system/zfs-load-key-hpool.service
|
||||||
|
dest: /etc/systemd/system/zfs-load-key-hpool.service
|
||||||
|
mode: 0644
|
||||||
|
register: systemd_zfs_load_key_hpool_service_file
|
||||||
|
|
||||||
|
- name: SystemD daemon reload
|
||||||
|
systemd:
|
||||||
|
daemon_reload: true
|
||||||
|
when:
|
||||||
|
systemd_zfs_load_key_hpool_service_file is changed
|
||||||
|
|
||||||
|
- name: Ensure hpool keys are loaded at boot
|
||||||
|
systemd:
|
||||||
|
name: zfs-load-key-hpool.service
|
||||||
|
enabled: yes
|
@ -36,3 +36,9 @@
|
|||||||
name: zfs-scrub-monthly@rpool.timer
|
name: zfs-scrub-monthly@rpool.timer
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
state: started
|
||||||
|
|
||||||
|
- name: Enable zfs scrub of hpool
|
||||||
|
systemd:
|
||||||
|
name: zfs-scrub-monthly@hpool.timer
|
||||||
|
enabled: yes
|
||||||
|
state: started
|
||||||
|
Loading…
Reference in New Issue
Block a user