ansible-edda/plays/roles/system_zfs/tasks/include/load_key.yml

19 lines
564 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: systemd_zfs_load_key_service_file
- name: "load_key : systemd daemon reload"
ansible.builtin.systemd:
daemon_reload: true
when:
systemd_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
loop: "{{ zpools_load_key }}"