Files
a13labs.infra/ansible/roles/encryption/tasks/main.yml
T

33 lines
677 B
YAML

---
- name: Install cryptsetup and curl
become: true
ansible.builtin.apt:
name:
- cryptsetup
- curl
state: present
when: ansible_os_family == 'Debian'
- name: Create folder to store volume
become: true
ansible.builtin.file:
path: "{{ encryption_volumes_path }}"
state: directory
mode: "0750"
- name: Copy required scripts
become: true
ansible.builtin.copy:
src: "{{ item }}"
dest: "/usr/local/bin/"
mode: "0750"
with_items:
- "open_volume"
- "read_system_id"
- name: Create encrypted volumes
ansible.builtin.include_tasks: volume.yml
loop: "{{ encryption_volumes }}"
loop_control:
loop_var: item