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

21 lines
598 B
YAML

---
- name: "load_key : zfs load key service file"
ansible.builtin.copy:
src: "./load_key/zfs-load-key@.service"
dest: "/etc/systemd/system/zfs-load-key@.service"
mode: 0644
register: system_zfs_load_key_service_file
- name: "load_key : systemd daemon reload"
ansible.builtin.systemd:
daemon_reload: true
when:
system_zfs_load_key_service_file.changed
- name: "load_key : enable service to load key for {{ item }}"
ansible.builtin.systemd:
name: "zfs-load-key@{{ item }}.service"
enabled: true
state: "started"
loop: "{{ system_zfs_zpools_load_key }}"