feat(encryption): implement AWS KMS integration with encryption provider and update related configurations

This commit is contained in:
2025-05-11 19:41:48 +02:00
parent 3e12b13d95
commit 457f2bd810
17 changed files with 268 additions and 48 deletions
+4 -32
View File
@@ -89,45 +89,17 @@
- name: Create service to fetch key file and open LUKS device
become: true
ansible.builtin.copy:
ansible.builtin.template:
src: key_fetch.service.j2
dest: /etc/systemd/system/{{ key_fetch_service }}
mode: "0644"
content: |
[Unit]
Description={{ item.name }} key fetch service
After={{ fetch_key_service_after }}
Before={{ fetch_key_service_before }}
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/usr/local/bin/open_volume "{{ key_server }}" {{ disk_image_path }} {{ device_name }}
ExecStop=/usr/sbin/cryptsetup close {{ device_name }}
[Install]
WantedBy={{ fetch_key_service_wantedby }}
- name: Create service to mount the local filesystem
become: true
ansible.builtin.copy:
ansible.builtin.template:
src: mount.service.j2
dest: /etc/systemd/system/{{ mount_service }}
mode: "0644"
content: |
[Unit]
Description={{ item.name }} mount service
After={{ key_fetch_service }}
Requires={{ key_fetch_service }}
Before={{ mount_service_before }}
[Mount]
What=/dev/mapper/{{ device_name }}
Where={{ mount_point }}
Type=ext4
Options=defaults
[Install]
WantedBy={{ mount_service_wantedby }}
- name: Reload systemd daemon
become: true