robertdebock.luks

Ansible Role LUKS

This role creates encrypted devices using LUKS (Linux Unified Key Setup) and sets them to unlock automatically at boot.

GitHub GitLab Downloads Version
github gitlab downloads Version

Example Playbook

Here's a simple example from the file molecule/default/converge.yml. It is verified each time there is a change.

---
- name: Converge
  hosts: all
  become: true
  gather_facts: true

  roles:
    - role: robertdebock.luks

Before running this role, prepare the machine using this file: molecule/default/prepare.yml:

---
- name: Prepare
  hosts: all
  become: true
  gather_facts: false

  roles:
    - role: robertdebock.bootstrap

For more detailed instructions and examples, check out this guide.

Role Variables

Default variable values are defined in defaults/main.yml:

---
# default settings for luks

# The status of luks devices if not specifically set.
luks_default_state: opened

# List of devices to encrypt.
luks_devices: []

# Example configuration:
# luks_devices:
#   - device: /dev/loop0
#     name: luksdisk0
#     keyfile: /etc/luksdisk0.keyfile

Requirements

Make sure you have the pip packages listed in requirements.txt.

Role Dependencies

This role works along with other roles to prepare your system. You can also prepare it in other ways.

Requirement GitHub GitLab
robertdebock.bootstrap Build Status GitHub Build Status GitLab

Context

This role is part of multiple compatible roles. For more information, visit the documentation of these roles.

Here's a diagram showing the related roles: dependencies

Compatibility

This role has been tested with the following container images:

Container Tags
Alpine all
Amazon Candidate
EL 9
Debian all
Fedora all
Ubuntu all

You need at least Ansible version 2.12. Tests have been performed for:

  • The previous version.
  • The current version.
  • The development version.

If you encounter any issues, please report them on GitHub.

License

This project is licensed under Apache-2.0.

Author Information

Created by robertdebock.

Feel free to consider sponsoring me.

Informazioni sul progetto

Create encrypted devices using luks and open them at boot.

Installa
ansible-galaxy install robertdebock.luks
Licenza
apache-2.0
Download
976
Proprietario
I know my way around (Linux) infrastructure, have a passion for automation, Docker, Ansible, Molecule and ci/cd.