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

19 lines
564 B
YAML
Raw Normal View History

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
register: systemd_zfs_load_key_service_file
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:
systemd_zfs_load_key_service_file.changed
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
loop: "{{ zpools_load_key }}"