salt.modules.cryptdev
Salt module to manage Unix cryptsetup jobs and the crypttab file
New in version 2018.3.0.
-
List existing device-mapper device details.
salt.modules.cryptdev.active()
-
Close a crypt device using
cryptsetup
.CLI Example:
salt '*' cryptdev.close foo
salt.modules.cryptdev.close(name)
-
List the contents of the crypttab
CLI Example:
salt '*' cryptdev.crypttab
salt.modules.cryptdev.crypttab(config='/etc/crypttab')
-
Open a crypt device using
cryptsetup
. Thekeyfile
must not beNone
or'none'
, becausecryptsetup
will otherwise ask for the password interactively.CLI Example:
salt '*' cryptdev.open foo /dev/sdz1 /path/to/keyfile
salt.modules.cryptdev.open(name, device, keyfile)
-
Remove the named mapping from the crypttab. If the described entry does not exist, nothing is changed, but the command succeeds by returning
'absent'
. If a line is removed, it returns'change'
.CLI Example:
salt '*' cryptdev.rm_crypttab foo
salt.modules.cryptdev.rm_crypttab(name, config='/etc/crypttab')
-
Verify that this device is represented in the crypttab, change the device to match the name passed, or add the name if it is not present.
CLI Example:
salt '*' cryptdev.set_crypttab foo /dev/sdz1 mypassword swap,size=256
salt.modules.cryptdev.set_crypttab(name, device, password='none', options='', config='/etc/crypttab', test=False, match_on='name')
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.cryptdev.html