Would love to disable lsblk when gathering facts

Hi,

I posted a comment to https://github.com/ansible/ansible/issues/10779, but it’s been closed, and the advice was to post to the group. So…

At Backblaze, we use Ansible to manage our storage pods. Each storage pod has 45 or 60 data drives, each mounted as an ext4 file system. Running lsblk to get the uuids of the drives frequently takes a full minute, especially when the system is busy. This slows down our deployment process quite a bit.

I would love to have an option to disable running lsblk. I’d be happy to implement it, if somebody can point me in the right direction, and give some advice about fitting in to the Ansible approach. Should it be a new parameter on the setup module to specifically disable it? Or perhaps a more generic way to list exactly the facts needed, and skip gathering the rest?

Thanks,

  • BrianB

I would love to have an option to disable running lsblk. I’d be happy to implement it, if somebody can point me in the right direction, and give some advice about fitting in to the Ansible approach. Should it be a new parameter on the setup module to specifically disable it? Or perhaps a more generic way to list exactly the facts needed, and skip gathering the rest?

Would fact caching help? https://docs.ansible.com/ansible/playbooks_variables.html#fact-caching

Cheers,
Paul

Working on a patch to improve this at the moment.

Attempting to replace the multiple (one per mtab entry) lsblk
invocations with a single 'lsblk' that collects info for all the blk
devices.