naggen2: fix ensure_resource

ensure_packages has been removed from stdlib in favour of the more
general function ensure_resource.

Change-Id: Ic0dd3c7d2b85c74aa26446eaf9f5633cfb87fbbe
Signed-off-by: Giuseppe Lavagetto <glavagetto@wikimedia.org>