Current implementation of loopback preparation has quite significant
overhead, as we are calling exact same roles multiple times in order
to provision all required loopback devices. Moreover, we duplicate
code and logic needed for their provisionment, despite we have
pretty much 2 usecase - either add sparse file as LVM or format
and directly mount with systemd.
Proposed patch unifies approach by generating a variable with
required keys/parameters to create all required devices at once.
This should reduce overhead caused by multiple role imports/includes.
as each time role tries to install packages and verifies dependencies.
Change-Id: I419fdcfa2cfac5b636f817b1d6bdd82b7198e6be
Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com>