feat(encryption): implement AWS KMS integration with encryption provider and update related configurations
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user