-
Notifications
You must be signed in to change notification settings - Fork 96
Description
Hello,
I think it would be very usefull if the luks_device module could do a luksDump of a luks block device
SUMMARY
cryptsetup luksDump /dev/ gives a lot of usefull information about the device.
By being able to do a luksDump of a device it would become a lot simpler to check all kinds of settings on a device without having to wait on multiple slow queries to the luksdevice.
All the data would become available with only one task.
I then can decide on the output of that task if I need to call other tasks to do the very slow checks if certain settings are set.
ISSUE TYPE
- Feature Idea
COMPONENT NAME
community.crypto.luks_device:
device: /dev/sda1
state: dump
passphrase: secret
register: luksdevice_results
ADDITIONAL INFORMATION
It would reduce the playbook runtime by eliminating the need for multiple time consuming tasks because we can decide on the information gathered by luksDump.
It would be nice if the output would be parsed by the module and returned in a nice json/yaml style,
as it is done by the command 'cryptsetup luksDump /dev/nvme0n1p4 --dump-json-metadata'
yeah I know its trivial to do 2 tasks like
- name: luksDump
ansible.builtin.command: cryptsetup luksDump /dev/nvme0n1p4 --dump-json-metadata
register: commandoutput
- name: Debug
ansible.builtin.set_fact:
luksdump: commandoutput['result'] | from_json
this requires 2 tasks
and will not pass ansible lint without a lot of extra code
(skip_ansible_lint is a statement that will bite you in the future and you can go and figure out what in the blazes you we're thinking when you wrote that play)
community.crypto.luks_device:
device: /dev/sda1
state: dump
passphrase: secret
register: my_luksdevice
ansible.builtin.debug:
var: my_luksdevice