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

19 lines
573 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
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-08 23:19:54 +01:00
loop: "{{ system_zfs_zpools_load_key }}"