storage
storage copied to clipboard
Duplicate package checks for lvm2
Both lv and vg tasks are checking for lvm2 package to be installed. This results in duplicate checking which can slow down playbook execution.
[tbowling@tbowling storage]$ grep LVM2 */*
tasks/lv-default.yml:- name: Install LVM2 commands as needed
tasks/vg-default.yml:- name: Install LVM2 commmands as needed
It would be better to check for any packages one time at a global level, This would include any other toolings such as lvm2, parted, or others. A WHEN condition could be used so that you are only checking for those packages when that technology is requested. for example, if use_partitions is false, do not verify that package is installed.
#2 should help with this. If you get a chance to test, please provide feedback.