crypttab – Encrypted Linux block devices
crypttab – Encrypted Linux block devices
New in version 1.9.
Synopsis
- Control Linux encrypted block devices that are set up during system boot in
/etc/crypttab
.
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
backing_device - |
Path to the underlying block device or file, or the UUID of a block-device prefixed with UUID=. | |
name - / required |
Name of the encrypted block device as it appears in the | |
opts - |
A comma-delimited list of options. See | |
password - |
Default: "none" |
Encryption password, the path to a file containing the password, or |
path - |
Default: "/etc/crypttab" |
Path to file to use instead of |
state - / required |
|
Use present to add a line to |
Examples
- name: Set the options explicitly a device which must already exist
crypttab:
name: luks-home
state: present
opts: discard,cipher=aes-cbc-essiv:sha256
- name: Add the 'discard' option to any existing options for all devices
crypttab:
name: '{{ item.device }}'
state: opts_present
opts: discard
with_items: '{{ ansible_mounts }}'
when: "'/dev/mapper/luks-' in {{ item.device }}"
Status
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors
- Steve (@groks)
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.7/modules/crypttab_module.html