ansible-edda/playbooks/roles/system/zfs/tasks/include/load_key.yml

21 lines
598 B
YAML
Raw Normal View History

2022-12-18 23:43:40 +01:00
---
2022-12-04 17:24:00 +01:00
- name: "load_key : zfs load key service file"
2022-12-04 17:06:18 +01:00
ansible.builtin.copy:
2022-12-05 22:21:07 +01:00
src: "./load_key/zfs-load-key@.service"
dest: "/etc/systemd/system/zfs-load-key@.service"
2022-12-04 17:06:18 +01:00
mode: 0644
2022-12-08 23:19:54 +01:00
register: system_zfs_load_key_service_file
2022-12-04 17:06:18 +01:00
2022-12-04 17:24:00 +01:00
- name: "load_key : systemd daemon reload"
2022-12-04 17:06:18 +01:00
ansible.builtin.systemd:
daemon_reload: true
when:
2022-12-08 23:19:54 +01:00
system_zfs_load_key_service_file.changed
2022-12-04 17:06:18 +01:00
2022-12-05 22:21:07 +01:00
- name: "load_key : enable service to load key for {{ item }}"
2022-12-04 17:06:18 +01:00
ansible.builtin.systemd:
2022-12-05 22:21:07 +01:00
name: "zfs-load-key@{{ item }}.service"
2022-12-04 17:06:18 +01:00
enabled: true
2022-12-22 01:20:41 +01:00
state: "started"
2022-12-08 23:19:54 +01:00
loop: "{{ system_zfs_zpools_load_key }}"